folly
folly copied to clipboard
Exception specification in declaration does not match previous declaration
When I compile folly (commit 689ef9
, Nov 17 2018) with Clang 6.0.0 on Ubuntu 16.04, I get this error:
$ make
Scanning dependencies of target folly_base
[ 0%] Building CXX object CMakeFiles/folly_base.dir/folly/IPAddressV6.cpp.o
In file included from /mnt/freezedisk/conmemssa/folly/folly/IPAddressV6.cpp:17:
In file included from /mnt/freezedisk/conmemssa/folly/folly/IPAddressV6.h:28:
In file included from /mnt/freezedisk/conmemssa/folly/folly/FBString.h:61:
In file included from /mnt/freezedisk/conmemssa/folly/folly/memory/Malloc.h:100:
/usr/include/malloc.h:59:14: error: exception specification in declaration does not match previous declaration
extern void *memalign (size_t __alignment, size_t __size)
^
/usr/include/jemalloc/jemalloc.h:167:24: note: previous declaration is here
JEMALLOC_EXPORT void * je_memalign(size_t alignment, size_t size)
^
/usr/include/jemalloc/jemalloc.h:57:23: note: expanded from macro 'je_memalign'
# define je_memalign memalign
^
cmake
was done with CMAKE_CXX_COMPILER and DCMAKE_C_COMPILER parameters set as clang++
/clang
but no other additional options set.
how did you solve it , dude, i come to the same problem.
Well, I couldn't solve the problem :/
2019년 1월 18일 (금) 오후 4:06에 Tony Tong [email protected]님이 작성:
how did you solve it , dude, i come to the same problem.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebook/folly/issues/976#issuecomment-455576771, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLzmXxx5MF1bum1aMHLILi7kaUO6XR4ks5vEeMQgaJpZM4Y4C6E .
Well, I couldn't solve the problem :/ 2019년 1월 18일 (금) 오후 4:06에 Tony Tong [email protected]님이 작성: … how did you solve it , dude, i come to the same problem. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#976 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLzmXxx5MF1bum1aMHLILi7kaUO6XR4ks5vEeMQgaJpZM4Y4C6E .
OK thank you for the reply, I switch to gcc to compile the project, that's what i can only do for now.
I think there is a workaround by setting FOLLY_USE_JEMALLOC=0
here: https://github.com/facebook/folly/blob/master/CMake/folly-config.h.cmake#L38
Also seeing this with clang 8 on ubuntu 16.04.
using gcc instead solve this problem
build with clang is broken
jemalloc 5.x is required