-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Platforms 18 (08/05/16)
This scons invocation
scons --ssl MONGO_DISTMOD=suse11 -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy mongod
fails with these errors
/opt/mongodbtoolchain/v2/bin/g++ -o build/opt/third_party/gperftools-2.5/src/tcmalloc.o -c -Woverloaded-virtual -Wno-maybe-uninitialized -std=c++11 -fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread -Wno-unknown-pragmas -Winvalid-pch -O2 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fstack-protector-strong -fno-builtin-memcmp -fPIE -DPCRE_STATIC -DNDEBUG -D_FORTIFY_SOURCE=2 -DBOOST_THREAD_VERSION=4 -DBOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS -DBOOST_THREAD_HAS_NO_EINTR_BUG -DMONGO_ENTERPRISE_VERSION=1 -DNETSNMP_NO_INLINE -DMALLOC_HOOK_MAYBE_VOLATILE= -DNO_TCMALLOC_SAMPLES -DNO_HEAP_CHECK -DNDEBUG -Ibuild/opt/third_party/gperftools-2.5/src -Isrc/third_party/gperftools-2.5/src -Isrc/third_party/gperftools-2.5/src -Ibuild/opt -Isrc -Ibuild/opt/third_party/gperftools-2.5/build_linux_s390x -Isrc/third_party/gperftools-2.5/build_linux_s390x src/third_party/gperftools-2.5/src/tcmalloc.cc In file included from src/third_party/gperftools-2.5/src/tcmalloc.cc:90:0: src/third_party/gperftools-2.5/build_linux_s390x/config.h:221:0: warning: "MALLOC_HOOK_MAYBE_VOLATILE" redefined #define MALLOC_HOOK_MAYBE_VOLATILE volatile ^ <command-line>:0:0: note: this is the location of the previous definition In file included from src/third_party/gperftools-2.5/src/libc_override.h:79:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:156: src/third_party/gperftools-2.5/src/libc_override_glibc.h:132:71: error: conflicting declaration 'void* (* volatile __malloc_hook)(size_t, const void*)' void* (* MALLOC_HOOK_MAYBE_VOLATILE __malloc_hook)(size_t, const void*) ^ In file included from src/third_party/gperftools-2.5/src/gperftools/tcmalloc.h:49:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:91: /usr/include/malloc.h:165:16: note: previous declaration as 'void* (* __malloc_hook)(size_t, const void*)' extern void *(*__malloc_hook) __MALLOC_PMT ((size_t __size, ^ In file included from src/third_party/gperftools-2.5/src/libc_override.h:79:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:156: src/third_party/gperftools-2.5/src/libc_override_glibc.h:134:79: error: conflicting declaration 'void* (* volatile __realloc_hook)(void*, size_t, const void*)' void* (* MALLOC_HOOK_MAYBE_VOLATILE __realloc_hook)(void*, size_t, const void*) ^ In file included from src/third_party/gperftools-2.5/src/gperftools/tcmalloc.h:49:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:91: /usr/include/malloc.h:167:16: note: previous declaration as 'void* (* __realloc_hook)(void*, size_t, const void*)' extern void *(*__realloc_hook) __MALLOC_PMT ((void *__ptr, size_t __size, ^ In file included from src/third_party/gperftools-2.5/src/libc_override.h:79:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:156: src/third_party/gperftools-2.5/src/libc_override_glibc.h:136:67: error: conflicting declaration 'void (* volatile __free_hook)(void*, const void*)' void (* MALLOC_HOOK_MAYBE_VOLATILE __free_hook)(void*, const void*) ^ In file included from src/third_party/gperftools-2.5/src/gperftools/tcmalloc.h:49:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:91: /usr/include/malloc.h:163:15: note: previous declaration as 'void (* __free_hook)(void*, const void*)' extern void (*__free_hook) __MALLOC_PMT ((void *__ptr, ^ In file included from src/third_party/gperftools-2.5/src/libc_override.h:79:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:156: src/third_party/gperftools-2.5/src/libc_override_glibc.h:138:80: error: conflicting declaration 'void* (* volatile __memalign_hook)(size_t, size_t, const void*)' void* (* MALLOC_HOOK_MAYBE_VOLATILE __memalign_hook)(size_t,size_t, const void*) ^ In file included from src/third_party/gperftools-2.5/src/gperftools/tcmalloc.h:49:0, from src/third_party/gperftools-2.5/src/tcmalloc.cc:91: /usr/include/malloc.h:169:16: note: previous declaration as 'void* (* __memalign_hook)(size_t, size_t, const void*)' extern void *(*__memalign_hook) __MALLOC_PMT ((size_t __alignment, ^ src/third_party/gperftools-2.5/src/tcmalloc.cc: In function 'void {anonymous}::ReportLargeAlloc(Length, void*)': src/third_party/gperftools-2.5/src/tcmalloc.cc:1132:47: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result] write(STDERR_FILENO, buffer, strlen(buffer)); ^ src/third_party/gperftools-2.5/src/tcmalloc.cc: In function 'void PrintStats(int)': src/third_party/gperftools-2.5/src/tcmalloc.cc:487:47: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result] write(STDERR_FILENO, buffer, strlen(buffer)); ^ scons: *** [build/opt/third_party/gperftools-2.5/src/tcmalloc.o] Error 1 /opt/mongodbtoolchain/v2/bin/g++ -o build/opt/third_party/icu4c-57.1/source/common/brkeng.o -c -Woverloaded-virtual -Wno-maybe-uninitialized -std=c++11 -fno-omit-frame-pointer -fno-strict-aliasing -ggdb -pthread -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O2 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fstack-protector-strong -fno-builtin-memcmp -Wno-sign-compare -fPIE -DPCRE_STATIC -DNDEBUG -D_FORTIFY_SOURCE=2 -DBOOST_THREAD_VERSION=4 -DBOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS -DBOOST_THREAD_HAS_NO_EINTR_BUG -DMONGO_ENTERPRISE_VERSION=1 -DNETSNMP_NO_INLINE -DUCONFIG_ONLY_COLLATION=1 -DU_CHARSET_IS_UTF8=1 -DU_DISABLE_RENAMING=1 -DU_STATIC_IMPLEMENTATION=1 -DU_USING_ICU_NAMESPACE=0 -DU_COMMON_IMPLEMENTATION=1 -Isrc/third_party/icu4c-57.1/source/common -Isrc/third_party/icu4c-57.1/source/i18n src/third_party/icu4c-57.1/source/common/brkeng.cpp scons: building terminated because of errors. build/opt/third_party/gperftools-2.5/src/tcmalloc.o failed: Error 1
If I undef this line, the compile succeeds.