Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.4.1
-
None
Description
When building arrow with clang 4.0.0 I see the following error when building the plasma store:
In file included from /home/phillip/code/cpp/arrow/cpp/src/plasma/malloc.cc:45: /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:592:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined] #if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */ ^ /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:588:22: note: expanded from macro 'USE_LOCKS' #define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
and this error when building with clang 4.0.0 and gcc 7.1.1:
In file included from /home/phillip/code/cpp/arrow/cpp/src/plasma/malloc.cc:45:0: /home/phillip/code/cpp/arrow/cpp/src/plasma/thirdparty/dlmalloc.c:648:0: error: "_GNU_SOURCE" redefined [-Werror] #define _GNU_SOURCE /* Turns on mremap() definition */ <command-line>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors make[2]: *** [src/plasma/CMakeFiles/plasma_objlib.dir/build.make:207: src/plasma/CMakeFiles/plasma_objlib.dir/malloc.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:657: src/plasma/CMakeFiles/plasma_objlib.dir/all] Error 2 make: *** [Makefile:141: all] Error 2