~ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F1713
~ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
Failure message:
libtool: compile: g++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/local/include -std=gnu++0x -g -O2 -MT portability/Malloc.lo -MD -MP -MF portability/.deps/Malloc.Tpo -c portability/Malloc.cpp -fno-common -DPIC -o portability/.libs/Malloc.o
In file included from portability/Malloc.cpp:17:
./../folly/portability/Malloc.h:27:12: error: unknown type name 'size_t'
extern "C" size_t malloc_usable_size(void* ptr);
^
1 error generated.
make[4]: ** [portability/Malloc.lo] Error 1
make[3]: ** [all-recursive] Error 1
make[2]: ** [all] Error 2
make[1]: ** [all-recursive] Error 1
make: *** [all] Error 2
I added #include <stddef.h> to /third_party/folly/folly/portability/Malloc.h; seems to do the trick. I suppose one ought to fix that in Folly itself, and not here.
yep. just noticed an issue was filed here: https://github.com/facebook/folly/issues/385
I added #include
to /third_party/folly/folly/portability/Malloc.h
This did not work for me. I still get
In file included from portability/Malloc.cpp:17:
./../folly/portability/Malloc.h:28:12: error: unknown type name 'size_t'
extern "C" size_t malloc_usable_size(void* ptr);
^
ingConverter::DtoaMode, unsigned int) in redex_all-SingleImplAnalyze.o
...
"double_conversion::StringToDoubleConverter::StringToIeee(char const_, int, int_, bool) const", referenced from:
std::__1::enable_ifstd::is_floating_point
std::__1::enable_ifstd::is_floating_point
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: _* [redex-all] Error 1
make[1]: ** [all-recursive] Error 1
make: *** [all] Error 2
This is fixed by https://github.com/facebook/redex/commit/ea85ed63611dd614937d94456d5e70241b7a8715, please rebase and try again!
I can confirm this is fixed on latest master
Most helpful comment
I added
#include <stddef.h>to /third_party/folly/folly/portability/Malloc.h; seems to do the trick. I suppose one ought to fix that in Folly itself, and not here.