@schobepr reports the following issue when trying to compile SG++ on his MacBook:
Gerade versuche ich, SGpp auf dem MacBook zu kompilieren. Ein kleiner Hinweis für die Doku:
Wenn man macports installiert hat und nicht Clang nutzen will, gibt es folgenden Fehler
Peter-Schobers-MacBook-Air:SGpp Peter$ scons -j 2 COMPILER="gnu" VERBOSE=0 SG_ALL=0 SG_BASE=1 SG_OPTIMIZATION=1 USE_EIGEN=1 BUILD_STATICLIB=1
scons: Reading SConscript files ...
Info: Platform: Darwin, peterscobersair.hof.uni-frankfurt.de, 15.5.0, Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64, x86_64, i386
Info: Using SCons 2.4.1 on Python 2.7.12
Info: SCons command line: /opt/local/bin/scons -j 2 COMPILER=gnu VERBOSE=0 SG_ALL=0 SG_BASE=1 SG_OPTIMIZATION=1 USE_EIGEN=1 BUILD_STATICLIB=1
Info: Available modules: SG_BASE, SG_COMBIGRID, SG_DATADRIVEN, SG_FINANCE, SG_MISC, SG_OPTIMIZATION, SG_PARALLEL, SG_PDE, SG_QUADRATURE, SG_SOLVER
Info: Available language support: SG_JAVA, SG_PYTHON
Checking programs and libraries:
Info: Using g++ 4.2.1
Checking for g++...(cached) /usr/bin/g++
Checking for gcc...(cached) /usr/bin/gcc
Checking for $SMARTLINK...(cached) /usr/bin/gcc
Checking for flag "-std=c++11"... no
Error: The compiler doesn't seem to support the C++11 standard. Abort!
# ------------------------------------------------------------------------
# An error occurred while compiling SG++.
# If you believe this is a bug in SG++, please attach the build.log and
# the config.log file when contacting the SG++ developers.
# ------------------------------------------------------------------------
Peter-Schobers-MacBook-Air:SGpp Peter$ cat config.log
file /Users/Peter/Documents/MATLAB/SparseGridsLifecycle/Libraries/SGpp/site_scons/SGppConfigure.py,line 21:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for g++...
scons: Configure: (cached) /usr/bin/g++
scons: Configure: Checking for gcc...
scons: Configure: (cached) /usr/bin/gcc
scons: Configure: Checking for $SMARTLINK...
scons: Configure: (cached) /usr/bin/gcc
scons: Configure: Checking for flag "-std=c++11"...
..clang: error: unsupported argument '-q' to option 'Wa,'
scons: Configure: no
Den ich durch auskommentieren von Zeile 21 beheben konnte:
#env.AppendUnique(CPPFLAGS=["-Wa,-q"])
Was unschön ist, ist, dass scons -—help in diesem Falle gar nicht erst die Liste aller möglichen Commands anzeigt.
Alternativ müsste ich eigentlich auch das Xcode clang nutzen können, aber war mir jetzt zu umständlich, den symlink von clang von dem macports clang auf das Xcode clang umzusetzen.
This looks more like a bug in our SCons files (not a bug in the docs).