[SERVER-17137] Trying to compile mongodb-src-r3.0.0-rc7 Created: 30/Jan/15  Updated: 31/Jan/15  Resolved: 31/Jan/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.0.0-rc7
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: egezon Berisha Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Trying to compile mongodb-src-r3.0.0-rc7 on CentOS6, I get the following error:

Env info:

$ uname -a
Linux test1 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
 
$ gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Error:

$ scons all --jobs=4 --ssl
scons: Reading SConscript files ...
scons version: 2.3.4
python version: 2 6 6 '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
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 target architecture is 32-bit x86...(cached) no
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 we are using libstdc++... (cached) yes
Checking for libstdc++ 4.6.0 or better... (cached) yes
Checking if C++ compiler supports -std=c++11... (cached) yes
Checking if __cplusplus >= 201103L to auto-enable C++11... (cached) yes
Checking if C compiler supports -std=c99... (cached) yes
Checking if we are on a POSIX system... (cached) yes
Checking if the POSIX monotonic clock is supported... (cached) yes
Checking if C compiler supports -fno-builtin-memcmp... (cached) yes
Checking for __thread... (cached) yes
Checking for C++11 <atomic> support... (cached) yes
Checking for C++11 is_trivially_copyable 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 __malloc_hook is declared volatile... (cached) no
scons: done reading SConscript files.
 
scons: warning: Support for pre-2.7.0 Python version (2.6.6) is deprecated.
    If this will cause hardship, contact scons-dev@scons.org
File "/usr/bin/scons", line 199, in <module>
scons: Building targets ...
g++ -o build/linux2/ssl/mongo/shell/dbshell.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Isrc/third_party/boost -Ibuild/linux2/ssl -Isrc src/mongo/shell/dbshell.cpp
g++ -o build/linux2/ssl/mongo/base/error_codes.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Isrc/third_party/boost -Ibuild/linux2/ssl -Isrc build/linux2/ssl/mongo/base/error_codes.cpp
g++ -o build/linux2/ssl/mongo/base/validate_locale.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Isrc/third_party/boost -Ibuild/linux2/ssl -Isrc src/mongo/base/validate_locale.cpp
g++ -o build/linux2/ssl/mongo/base/status.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_SSL -DMONGO_HAVE___THREAD -DMONGO_HAVE_CXX11_ATOMICS -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.30 -Isrc/third_party/boost -Ibuild/linux2/ssl -Isrc src/mongo/base/status.cpp
{standard input}: Assembler messages:
{standard input}:790: Error: expecting string instruction after `rep'
scons: *** [build/linux2/ssl/mongo/base/status.o] Error 1
{standard input}: Assembler messages:
{standard input}:128: Error: expecting string instruction after `rep'
scons: *** [build/linux2/ssl/mongo/base/validate_locale.o] Error 1
{standard input}: Assembler messages:
{standard input}:6716: Error: expecting string instruction after `rep'
scons: *** [build/linux2/ssl/mongo/base/error_codes.o] Error 1
{standard input}: Assembler messages:
{standard input}:128: Error: expecting string instruction after `rep'
{standard input}:2548: Error: expecting string instruction after `rep'
{standard input}:3687: Error: expecting string instruction after `rep'
{standard input}:3722: Error: expecting string instruction after `rep'
{standard input}:3733: Error: expecting string instruction after `rep'
scons: *** [build/linux2/ssl/mongo/shell/dbshell.o] Error 1
scons: building terminated because of errors.
 



 Comments   
Comment by egezon Berisha [ 31/Jan/15 ]

Awesome! Yes its being build right now, thank you very much.

I came across that page before, but didn't pay much attention.

Here is the link (http://linuxsoft.cern.ch/cern/devtoolset/slc6X/x86_64/RPMS/repoview/devtoolset-2-binutils.html) were I downloaded newer version of binutil tools for CentOS6, in case somebody has the same issue.

Comment by Adam Midvidy [ 31/Jan/15 ]

Egezon, can you confirm that you were successfully able to compile MongoDB?

Comment by Adam Midvidy [ 30/Jan/15 ]

Hey Egezon,

I am sorry you are having trouble compiling MongoDB. It appears that GCC 4.8 is emitting "rep; ret" instructions, which older assemblers treat as an error.

I recommend that you upgrade binutils and then recompile.

See this relevant GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57017

Hope that helps!

Generated at Thu Feb 08 03:43:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.