[cctbxbb] Compiling CCTBX with newer GCC on Mac

Gabor Bunkoczi gabor.bunkoczi at googlemail.com
Tue Aug 22 02:28:20 PDT 2017


Hi Lance,

this may be relevant, since you are on Boost 1.56

https://stackoverflow.com/questions/25395805/compile-error-with-boost-graph-1-56-0-and-g-4-6-4

(I am on Boost 1.62, but have not tried compiling with c++11.)

BW, Gabor

On Tue, Aug 22, 2017 at 10:21 AM, Gabor Bunkoczi <
gabor.bunkoczi at googlemail.com> wrote:

> Hi Lance,
>
> apologies for the late response. I was not aware that C++11 setting is
> deliberate, in this case my suggestion is clearly not helpful.
>
> Could you send me the entire error message from the compiler? It looks
> like this has been clipped at the outermost stack (perhaps you need to
> enable more verbose output to get this - for this you can just run directly
> the command that failed, i.e. "g++ -o boost_adaptbx/graph/maximum_clique_ext.o
> -c -DBOOST_ALL_NO_LIB -std=c++11 -DBOOST_PYTHON_MAX_BASES=2
> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/modules/boost
> -fPIC -fno-strict-aliasing -w -DNDEBUG -O3 -ffast-math
> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/modules/cctbx_project
> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/build/include
> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/build/include
> -I/opt/python/Python-2.7.9-01292015/include/python2.7
> /private/var/lib/jenkins-release/workspace/tmp/newbuild-
> 1131/modules/cctbx_project/boost_adaptbx/graph/maximum_clique_ext.cpp")
> Also, can you clarify which versions of CCTBX you are trying to build (with
> the revision hash), and whether this is a problem on both Linux and Mac.
>
> Unfortunately, my knowledge of C++11 is somewhat hazy (to put it in a mild
> way), and I am unsure whether I will be able to help further, but I am
> happy to have a good look.
>
> To answer your last question, you can try using --use_environment_flags at
> the configure stage, after setting CXXFLAGS, etc (I have not checked
> whether this works, but the option exists).
>
> BW, Gabor
>
> On Fri, Aug 18, 2017 at 5:24 PM, Lance Westerhoff <lance at quantumbioinc.com
> > wrote:
>
>>
>> Hi Gabor-
>>
>> Actually, the whole reason we chose to build CCTBX on Mac was to get a
>> library which can take C++11 strings, etc. (since we shifted to C++11 years
>> ago - hence the requirement that we rebuild CCTBX using gcc6.x)
>>
>> I can’t [yet] speak for the Mac version of CCTBX, but the Linux version -
>> at least for the functions we use - have been working great for some time.
>> I guess we shall see if that carries forward with the Mac version. I think
>> we should know within hours.
>>
>> For a test and to help you debug, even though we can’t use the library
>> w/o C++11, I’m glad to try it and send you the results. How does one pass a
>> compiler flag into the CCTBX build system? (the default for gcc-6.3 is to
>> build with C++11 so indeed I will need to pass in -std=c++98 in order to
>> complete the test)
>>
>> -Lance
>>
>>
>> On Aug 18, 2017, at 5:08 AM, Gabor Bunkoczi <
>> gabor.bunkoczi at googlemail.com> wrote:
>>
>> Hi Lance,
>>
>> presumably the Boost Graph Library is not C++11 compliant, so I would
>> first try to remove the "-std=c++11" flag from your command line (to be
>> safe, you can set it explicitly to -std=c++98). Can you try and let me know
>> whether it works?
>>
>> BTW, I am unsure whether the entire cctbx is c++11 compliant.
>>
>> BW, Gabor
>>
>>
>> On Thu, Aug 17, 2017 at 10:03 PM, Lance Westerhoff <
>> lance at quantumbioinc.com> wrote:
>>
>>> Hi Billy-
>>>
>>> That one worked - thanks!
>>>
>>> Now, whether it compiles with the much newer compiler: yes and no. We
>>> have two different versions of cctbx on site here. We have been using a
>>> version approximating #992 on the Linux side for months. That was our last
>>> pull and for our needs, it seems to be working well on linux. That one
>>> builds just fine on Mac OS X as well when I perform the following steps.
>>> However, when I try to build the much more recent version (#1131), that is
>>> when I run into trouble and I I get the following errors. For the most
>>> part, because #992 seems to work for Linux for what we need, we should be
>>> ok but I wanted to send a report in case this is something you would like
>>> to fix. At the moment, we are moving forward. I’ll let you know how things
>>> pan out as we actually start to use the Mac CCTBX as hard as we already use
>>> the Linux CCTBX.
>>>
>>> Thanks for your help!
>>>
>>>
>>> mac-build64:build jenkins$ which gcc
>>> /opt/gcc/current/bin/gcc
>>>
>>> mac-build64:build jenkins$ gcc -v
>>> Using built-in specs.
>>> COLLECT_GCC=gcc
>>> 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 iotbx --compiler=gcc
>>> --enable-cxx11
>>> Python: 2.7.9 "/opt/python/current/bin/python"
>>> Compiler: gcc
>>> Build mode: release
>>> Warning level: 0
>>> Precompiled Headers: False
>>> Static libraries: False
>>> Static exe: False
>>> Scan Boost headers: False
>>> Write full flex_fwd.h files: False
>>> Build Boost.Python extensions: True
>>> Define BOOST_PYTHON_NO_PY_SIGNATURES: False
>>> Define BOOST_PYTHON_BOOL_INT_STRICT: True
>>> Enable OpenMP if possible: False
>>> Boost threads enabled: False
>>> Enable CUDA: False
>>> Use opt_resources if available: False
>>> Use environment flags: False
>>> Enable C++11: True
>>> Force true division: True
>>> command_version_suffix: None
>>> .....
>>>
>>> mac-build64:build jenkins$ make
>>> ./bin/libtbx.scons -j "`./bin/libtbx.show_number_of_processors`"
>>> scons: Reading SConscript files ...
>>> On MacOS, using  gcc 6.3.0Xcode 4.6.3
>>> Build version 4H1503
>>>
>>> libtbx.scons: OpenMP is disabled.
>>> BOOST_VERSION: 105600
>>> ......
>>>
>>> /private/var/lib/jenkins-release/workspace/tmp/newbuild-1131
>>> /modules/cctbx_project/boost_adaptbx/graph/graph_ext.cpp:337:5:
>>> required from here
>>> /opt/gcc/gcc-6.3.0-08092017/include/c++/6.3.0/bits/stl_construct.h:75:7:
>>> error: use of deleted function ‘boost::detail::stored_edge_property<long
>>> unsigned int, boost::property<boost::edge_weight_t,
>>> boost::python::api::object> >::stored_edge_property(const
>>> boost::detail::stored_edge_property<long unsigned int,
>>> boost::property<boost::edge_weight_t, boost::python::api::object> >&)’
>>>      { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...);
>>> }
>>>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> ~~~~~~
>>> In file included from /private/var/lib/jenkins-relea
>>> se/workspace/tmp/newbuild-1131/modules/boost/boost/graph/
>>> adjacency_list.hpp:246:0,
>>>                  from /private/var/lib/jenkins-relea
>>> se/workspace/tmp/newbuild-1131/modules/cctbx_project/boost_
>>> adaptbx/graph/graph_type.hpp:5,
>>>                  from /private/var/lib/jenkins-relea
>>> se/workspace/tmp/newbuild-1131/modules/cctbx_project/boost_
>>> adaptbx/graph/graph_ext.cpp:1:
>>> /private/var/lib/jenkins-release/workspace/tmp/newbuild-1131
>>> /modules/boost/boost/graph/detail/adjacency_list.hpp:290:11: note:
>>> ‘boost::detail::stored_edge_property<long unsigned int,
>>> boost::property<boost::edge_weight_t, boost::python::api::object>
>>> >::stored_edge_property(const boost::detail::stored_edge_property<long
>>> unsigned int, boost::property<boost::edge_weight_t,
>>> boost::python::api::object> >&)’ is implicitly declared as deleted because
>>> ‘boost::detail::stored_edge_property<long unsigned int,
>>> boost::property<boost::edge_weight_t, boost::python::api::object> >’
>>> declares a move constructor or move assignment operator
>>>      class stored_edge_property : public stored_edge<Vertex> {
>>>            ^~~~~~~~~~~~~~~~~~~~
>>> g++ -o boost_adaptbx/graph/maximum_clique_ext.o -c -DBOOST_ALL_NO_LIB
>>> -std=c++11 -DBOOST_PYTHON_MAX_BASES=2 -I/private/var/lib/jenkins-rel
>>> ease/workspace/tmp/newbuild-1131/modules/boost -fPIC
>>> -fno-strict-aliasing -w -DNDEBUG -O3 -ffast-math
>>> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/modules/cctbx_project
>>> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/build/include
>>> -I/private/var/lib/jenkins-release/workspace/tmp/newbuild-1131/build/include
>>> -I/opt/python/Python-2.7.9-01292015/include/python2.7
>>> /private/var/lib/jenkins-release/workspace/tmp/newbuild-1131
>>> /modules/cctbx_project/boost_adaptbx/graph/maximum_clique_ext.cpp
>>> scons: *** [boost_adaptbx/graph/graph_ext.o] Error 1
>>> scons: building terminated because of errors.
>>> usr+sys time: 4.25 seconds
>>> wall clock time: 2 minutes 15.94 seconds (135.94 seconds total)
>>> make: *** [default] Error 2
>>>
>>>
>>>
>>>
>>>
>>> -Lance
>>> ____________________
>>> Lance M. Westerhoff, Ph.D.
>>> President and General Manager
>>> QuantumBio Inc.
>>>
>>> WWW:    http://www.quantumbioinc.com
>>> Email:    lance at quantumbioinc.com
>>>
>>> Phone:   814-235-6908 <(814)%20235-6908>
>>> Fax:        814-235-6909 <(814)%20235-6909>
>>>
>>>
>>> This message and any attachments are solely for the intended recipient
>>> and
>>> should be considered confidential. If you are not the intended recipient,
>>> please immediately and permanently delete.
>>>
>>> On Aug 16, 2017, at 6:42 PM, Billy Poon <BKPoon at lbl.gov> wrote:
>>>
>>> Hi Lance,
>>>
>>> Can try adding the "--compiler=gcc" flag to your configure.py command?
>>> That should use your custom gcc compiler since it's the first one that's
>>> found on your path. When you run "make," you should see a line that looks
>>> like "On MacOS, using  gcc 4.8.5", but with your version of gcc. The latest
>>> gcc that I have tested is 5.4.0 on Ubuntu 16.04, so I do not know if
>>> everything will compile with gcc 6.3.0
>>>
>>> --
>>> Billy K. Poon
>>> Research Scientist, Molecular Biophysics and Integrated Bioimaging
>>> Lawrence Berkeley National Laboratory
>>> 1 Cyclotron Road, M/S 33R0345
>>> Berkeley, CA 94720
>>> Tel: (510) 486-5709
>>> Fax: (510) 486-5909
>>> Web: https://phenix-online.org
>>>
>>> On Wed, Aug 16, 2017 at 2:49 PM, Lance Westerhoff <
>>> lance at quantumbioinc.com> wrote:
>>>
>>>>
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cctbxbb mailing list
>>>> cctbxbb at phenix-online.org
>>>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>>>
>>>
>>> _______________________________________________
>>> cctbxbb mailing list
>>> cctbxbb at phenix-online.org
>>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>>
>>>
>>>
>>> _______________________________________________
>>> cctbxbb mailing list
>>> cctbxbb at phenix-online.org
>>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>>
>>>
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>
>>
>>
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20170822/801ad9df/attachment-0001.htm>


More information about the cctbxbb mailing list