lexliy / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

MongoDB version 3.0 build from source fails due to gperftools 2.2 on PPC64 #691

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Git clone MongoDB 3.0 source and install dependencies mentioned including 
SCONS 2.3.4 and python 2.7.5
2.In shell, Run command "scons --all --allocator=system -j40"

What is the expected output? What do you see instead?
MongoDB version 3.0 should be built along with all tests successfully

What version of the product are you using? On what operating system?
1. MongoDB version 3.0
2. gperftools 2.2
3. Red Hat Enterprise Linux 7.1 on PPC64LE

Please provide any additional information below.
1. MongoDB version 3.0 is not officially built for PPC64LE on RHEL

Please find the log below.

scons: Reading SConscript files ...
scons version: 2.3.4
python version: 2 7 5 'final' 0
Checking whether the C++ compiler works... (cached) yes
Checking whether the C compiler works... (cached) yes
Checking if C++ compiler "g++" is GCC... (cached) yes
Checking if C compiler "gcc" is GCC... (cached) yes
Detected a PowerPC processor
Checking if target OS linux is supported by the toolchain (cached) yes
Checking if C compiler is GCC 4.8.2 or newer...(cached) yes
Checking if C++ compiler is GCC 4.8.2 or newer...(cached) yes
Checking if C compiler supports -Wno-unused-local-typedefs... (cached) yes
Checking if C compiler supports -Wno-unused-function... (cached) yes
Checking if C compiler supports -Wno-unused-private-field... (cached) no
Checking if C compiler supports -Wno-deprecated-declarations... (cached) yes
Checking if C compiler supports 
-Wno-tautological-constant-out-of-range-compare... (cached) no
Checking if C compiler supports -Wno-unused-const-variable... (cached) no
Checking if C compiler supports -Wno-unused-but-set-variable... (cached) yes
Checking if C compiler supports -Wno-missing-braces... (cached) yes
Checking if C compiler supports -Wno-inconsistent-missing-override... (cached) 
no
Checking if C compiler supports -Wno-potentially-evaluated-expression... 
(cached) no
Checking if we are using libstdc++... (cached) yes
Checking if C++ compiler supports -std=c++11... (cached) yes
Checking if C compiler supports -std=c99... (cached) yes
Checking for C++11... (cached) yes
Checking for libstdc++ 4.8.2 or better... (cached) yes
Checking if we are on a POSIX system... (cached) yes
Checking if the POSIX monotonic clock is supported... (cached) yes
Checking off_t is 8 bytes... (cached) yes
Checking if C compiler supports -fno-builtin-memcmp... (cached) yes
Checking for __thread... (cached) yes
Checking for C++11 is_trivially_copyable support... (cached) no
Checking for C++14 std::make_unique support... (cached) no
Checking for C library rt... (cached) yes
Checking for C library dl... (cached) yes
Checking for C++ header file execinfo.h... (cached) yes
Checking whether backtrace is declared... (cached) yes
Checking whether backtrace_symbols is declared... (cached) yes
Checking whether backtrace_symbols_fd is declared... (cached) yes
Checking for C library pcap... (cached) no
Checking for C library wpcap... (cached) no
Checking if std::atomic<int64_t> works... (cached) yes
Checking if std::atomic<uint64_t> works... (cached) yes
Checking if std::atomic<int32_t> works... (cached) yes
Checking if std::atomic<uint32_t> works... (cached) yes
Checking if __malloc_hook is declared volatile... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/PowerPC/normal/mongo/util/tcmalloc_server_status_section.o -c 
-Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing 
-ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror 
-O2 -Wno-unused-local-typedefs -Wno-unused-function 
-Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces 
-fno-builtin-memcmp -DPCRE_STATIC -DMONGO_HAVE_GPERFTOOLS_GET_THREAD_CACHE_SIZE 
-Isrc/third_party/s2 -Isrc/third_party/pcre-8.37 -Isrc/third_party/boost-1.56.0 
-Ibuild/PowerPC/normal -Isrc -Isrc/third_party/gperftools-2.2/src 
src/mongo/util/tcmalloc_server_status_section.cpp
g++ -o 
build/PowerPC/normal/third_party/gperftools-2.2/src/base/spinlock_internal.o -c 
-Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -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 -fno-builtin-memcmp 
-DPCRE_STATIC -DMALLOC_HOOK_MAYBE_VOLATILE=volatile -DNO_TCMALLOC_SAMPLES 
-DNO_HEAP_CHECK -DNDEBUG -Ibuild/PowerPC/normal/third_party/gperftools-2.2/src 
-Isrc/third_party/gperftools-2.2/src -Isrc/third_party/gperftools-2.2/src 
-Ibuild/PowerPC/normal -Isrc 
src/third_party/gperftools-2.2/src/base/spinlock_internal.cc
In file included from 
src/third_party/gperftools-2.2/src/base/spinlock_internal.cc:52:0:
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h: In constructor 
'{anonymous}::InitModule::InitModule()':
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h:59:49: error: 
'sys_futex' was not declared in this scope
                   sys_futex(&x, FUTEX_WAKE, 1, 0) >= 0);
                                                 ^
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h: In function 'void 
base::internal::SpinLockDelay(volatile Atomic32*, int32, int)':
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h:88:71: error: 
'sys_futex' was not declared in this scope
                 value, reinterpret_cast<struct kernel_timespec *>(&tm));
                                                                       ^
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h: In function 'void 
base::internal::SpinLockWake(volatile Atomic32*, bool)':
src/third_party/gperftools-2.2/src/base/spinlock_linux-inl.h:99:67: error: 
'sys_futex' was not declared in this scope
               FUTEX_WAKE | futex_private_flag, all? INT_MAX : 1, 0);
                                                                   ^
scons: *** 
[build/PowerPC/normal/third_party/gperftools-2.2/src/base/spinlock_internal.o] 
Error 1
scons: building terminated because of errors.

--------------------------------------------------------------
Will appreciate your inputs on the above.

Thanks in advance,
Anup

Original issue reported on code.google.com by anup.hal...@gmail.com on 21 May 2015 at 4:04

GoogleCodeExporter commented 9 years ago
Typo
The SCONS command is "scons mongod -j32" for which I get this error. 

Original comment by anup.hal...@gmail.com on 21 May 2015 at 6:53

GoogleCodeExporter commented 9 years ago
Try gperftools 2.4 (you may have to forward-port mongodb-specific patches to 
gperftools though). AFAIK ppc64le support was added relatively recently.

Original comment by alkondratenko on 23 May 2015 at 6:35