[cctbxbb] Compiling CCTBX with newer GCC on Mac

Lance Westerhoff lance at quantumbioinc.com
Wed Aug 16 14:49:22 PDT 2017


Hello All-

How does one introduce an alternate gcc compiler for CCTBX on Mac? I must be missing it in the documentation.

I don’t want to use the old one in /usr/bin (and instead I want to you my newer one in /opt/gcc). I’ve tried all of the standard methods used by other build systems (change the $PATH, set $CXX and $CC, etc) but to no avail. These environment variables seem to be disregarded. We do use this compiler for building CCTBX on linux without too much trouble, so I think the support should be there.

Specifically:

mac-build64:build jenkins$ env | grep CXX
CXX=/opt/gcc/current/bin/g++

mac-build64:build jenkins$ env | grep CC
CC=/opt/gcc/current/bin/gcc

mac-build64:build jenkins$ which gcc
/opt/gcc/current/bin/gcc

mac-build64:build jenkins$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/gcc/gcc-6.3.0-08092017/libexec/gcc/x86_64-apple-darwin11.4.2/6.3.0/lto-wrapper
Target: x86_64-apple-darwin11.4.2
Configured with: ../gcc-6.3.0/configure --prefix=/opt/gcc/gcc-6.3.0-08092017 --enable-languages=c,c++,fortran,objc --with-gmp=/opt/gcc/gcc-6.3.0-08092017 --with-mpfr=/opt/gcc/gcc-6.3.0-08092017 --with-mpc=/opt/gcc/gcc-6.3.0-08092017 --enable-libgomp --disable-multilib
Thread model: posix
gcc version 6.3.0 (GCC) 

mac-build64:build jenkins$ /opt/python/current/bin/python ../modules/cctbx_project/libtbx/configure.py cctbx 
Python: 2.7.9 "/opt/python/current/bin/python"
Compiler: default
....
This script is only applicable to Linux - exiting.
Done.

mac-build64:build jenkins$ make
./bin/libtbx.scons -j "`./bin/libtbx.show_number_of_processors`"
scons: Reading SConscript files ...
On MacOS, using  clang 4.2.0
Xcode 4.6.3
Build version 4H1503
...


Thanks for your help!

-Lance
____________________
Lance M. Westerhoff, Ph.D.
President and General Manager
QuantumBio Inc. 

WWW:    http://www.quantumbioinc.com
Email:    lance at quantumbioinc.com






More information about the cctbxbb mailing list