-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.2.0
-
Component/s: Build
-
None
-
Fully Compatible
-
OS X
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I have installed various versions of gcc (4.8.4, 4.9, 5.0, 5.1...) and I can no longer use them to build with. I get an error about libstdc++ being too old.
$ alias scons-gcc48 = scons-base CC=gcc-4.8 CXX=g++-4.8 $ scons-gcc48 --config force scons: Reading SConscript files ... scons version: 2.4.1 python version: 2 7 10 'final' 0 Checking whether the C++ compiler works... yes Checking whether the C compiler works... yes Checking if C++ compiler "g++-4.8" is GCC... yes Checking if C compiler "gcc-4.8" is GCC... yes Detected a x86_64 processor Checking if target OS osx is supported by the toolchain yes Checking if C compiler is GCC 4.8.2 or newer...yes Checking if C++ compiler is GCC 4.8.2 or newer...yes Checking if C compiler supports -Wno-unused-local-typedefs... yes Checking if C compiler supports -Wno-unused-function... yes Checking if C compiler supports -Wno-unused-private-field... no Checking if C compiler supports -Wno-deprecated-declarations... yes sChecking if C compiler supports -Wno-tautological-constant-out-of-range-compare... no Checking if C compiler supports -Wno-unused-const-variable... no cChecking if C compiler supports -Wno-unused-but-set-variable... yes Checking if C compiler supports -Wno-missing-braces... yes Checking if C compiler supports -Wno-inconsistent-missing-override... no Checking if C compiler supports -Wno-potentially-evaluated-expression... no Checking if C++ compiler supports -Wpessimizing-move... no Checking if C++ compiler supports -Wredundant-move... no Checking if we are using libstdc++... yes Checking if C++ compiler supports -std=c++11... yes Checking if C compiler supports -std=c99... yes Checking for C++11... yes Checking for memset_s... no Checking for C function strnlen()... no Checking for libstdc++ 4.8.2 or better... no When using libstdc++, MongoDB requires libstdc++ 4.8.2 or newer See /Users/scotthernandez/git/mongo/build/scons/config.log for details
config.log tail:
...
scons: Configure: Checking for C function strnlen()...
build/scons/sconf_temp/conftest_25.c <-
|
|
|#include <assert.h>
|
|#ifdef __cplusplus
|extern "C"
|#endif
|char strnlen();
|
|int main() {
|#if defined (__stub_strnlen) || defined (__stub___strnlen)
| fail fail fail
|#else
| strnlen();
|#endif
|
| return 0;
|}
|
Compiling build/scons/sconf_temp/conftest_25.o
build/scons/sconf_temp/conftest_25.c:3:20: fatal error: assert.h: No such file or directory
#include <assert.h>
^
compilation terminated.
scons: Configure: no
file /Users/scotthernandez/git/mongo/SConstruct,line 1876:
Configure(confdir = build/scons/sconf_temp)
scons: Configure: Checking for libstdc++ 4.8.2 or better...
build/scons/sconf_temp/conftest_26.cpp <-
|
|#define _GLIBCXX_PROFILE
|#include <unordered_map>
|#if !defined(_GLIBCXX_PROFILE_UNORDERED)
|#error libstdc++ older than 4.8.2
|#endif
|
Compiling build/scons/sconf_temp/conftest_26.o
In file included from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/bits/char_traits.h:40,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/string:40,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/stdexcept:39,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/array:38,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/tuple:39,
from /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/unordered_map:41,
from build/scons/sconf_temp/conftest_26.cpp:3:
/usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
^
compilation terminated.
scons: Configure: no