Opened 9 years ago

Last modified 9 years ago

#49868 closed defect

py-bob-blitz: build fails on 10.6, error: unrecognized command line option "-std=c++0x" — at Initial Version

Reported by: dbevans (David B. Evans) Owned by: tiago.pereira@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: andre.anjos@…, laurent.el-shafey@…
Port: py-bob-blitz

Description

building 'bob.blitz.version' extension
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/bob
creating build/temp.macosx-10.6-x86_64-2.7/bob/blitz
/usr/bin/gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -Wno-strict-aliasing -DBOB_EXT_MODULE_PREFIX="bob.blitz" -DBOB_EXT_MODULE_NAME="version" -DBOB_EXT_ENTRY_NAME=initversion -DBOB_EXT_MODULE_VERSION="2.0.8" -DHAVE_BOOST=1 -DBOOST_VERSION="1.59.0" -DHAVE_BLITZ=1 -DBLITZ_VERSION="0.10" -DPY_ARRAY_UNIQUE_SYMBOL=BOB_BLITZ_NUMPY_C_API -DNO_IMPORT_ARRAY=1 -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/opt/local/var/macports/build/_opt_mports_dports_python_py-bob-blitz/py27-bob-blitz/work/bob.blitz-2.0.8/bob/blitz/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bob/extension/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c bob/blitz/version.cpp -o build/temp.macosx-10.6-x86_64-2.7/bob/blitz/version.o -std=c++0x -Wno-#warnings -isystem /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -isystem /opt/local/include
cc1plus: error: unrecognized command line option "-std=c++0x"
error: command '/usr/bin/gcc-4.2' failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_dports_python_py-bob-blitz/py27-bob-blitz/work/bob.blitz-2.0.8" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build
Exit code: 1

Default compilers on 10.6 and earlier (gcc-4.2, llvm-gcc-4.2, early clang < 3.0) don't support -std=c++0x.

Possible remedy is to use PortGroup compiler_blacklist_versions to blacklist these compilers.

PortGroup           compiler_blacklist_versions 1.0
...
compiler.blacklist  *gcc* {clang < 300}

This will cause the compiler selection to fall back to a more recent compiler (MacPorts clang34 in this case).

Change History (0)

Note: See TracTickets for help on using tickets.