Closed ustczxf closed 7 years ago
Yes I am getting the same issue. I was also able to compile folly without any issues. I am using MAC OS X 10.11.6 and gcc 6. This is happening after pulling the latest master branch after about few months on both folly and wangle.
/git/wangle/wangle/concurrent/ThreadPoolExecutor.cpp:68:58: required from here /usr/local/include/folly/small_vector.h:619:32: error: 'malloc_usable_size' was not declared in this scope return malloc_usablesize(u.pdata.heap_) / sizeof(value_type);
make[2]: **\* [CMakeFiles/wangle.dir/concurrent/ThreadPoolExecutor.cpp.o] Error 1
make[1]: **\* [CMakeFiles/wangle.dir/all] Error 2
make: **\* [all] Error 2
It turns out it has something to do with jemalloc. when I checked the configure output of compiling folly it had checked and said malloc_usable_size yes but for malloc.h check it had said false. Then when I uninstalled jemalloc from my system , recompiled folly, it said malloc_usable_size as false and after this I could build wangle fine.
Thanks @mohnishkodnani , after I removed jemalloc, it works now.
It still not work after i removed jemalloc from my system(OSX 10.12).
I am having problem with this too. Installed folly with homebrew, got back luck with small_vector.h.
I got the same problem. No difference with removing jemalloc, installing folly by homebrew / compiling source in macOS 10.12.1.
I am getting the same issue. My machine is OS X 10.12. Any update?
folly/portability/Malloc.cpp provides a defintion for malloc_usable_size for apple platforms. Can you check why that code is not being executed on your platform (e.g., put a #error "check") inside the APPLE guard.
@anirudhvr I was able to resolve this issue using @mohnishkodnani method.
When I tried to build wangle, it reported: In file included from /project/opensource/source/wangle/wangle/../wangle/concurrent/ThreadPoolExecutor.h:19: In file included from /project/opensource/source/wangle/wangle/../wangle/deprecated/rx/Observable.h:20: /usr/local/include/folly/small_vector.h:619:14: error: use of undeclared identifier 'malloc_usable_size' return malloc_usablesize(u.pdata.heap_) / sizeof(value_type);
I've built "folly" successfully, did anyone encounter the same issue? Thanks!