Compiler errors using boost/program_options with Boost v 1.53 and v 1.59

Dear all, I had to reinstall my boost version as the cluster environment I'm working on has switched from Scientific Linux 6 to CentOS 7. When I'm now compiling my code including the header "#include <boost/program_options>", I will receive the following error message: In file included from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/mpl/aux_/arithmetic_op.hpp:34:0, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/mpl/times.hpp:19, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/mpl/multiplies.hpp:17, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/numeric/conversion/detail/is_subranged.hpp:17, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/numeric/conversion/detail/conversion_traits.hpp:21, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/numeric/conversion/conversion_traits.hpp:13, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/numeric/conversion/converter.hpp:13, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/numeric/conversion/cast.hpp:33, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/lexical_cast/detail/converter_numeric.hpp:37, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/lexical_cast/try_lexical_convert.hpp:34, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/lexical_cast.hpp:32, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/program_options/value_semantic.hpp:14, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/program_options/options_description.hpp:13, from /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/program_options.hpp:15, from /home/cp652127/EclipseWorkspace/AMD-Geant4.10/amd/externals/g4sipm/sample/include/ParticleSourceMessenger.hh:24, from /home/cp652127/EclipseWorkspace/AMD-Geant4.10/amd/externals/g4sipm/sample/include/AsciiPersistencyHandler.hh:20, from /home/cp652127/EclipseWorkspace/AMD-Geant4.10/amd/externals/g4sipm/sample/include/RunAction.hh:16, from /home/cp652127/EclipseWorkspace/AMD-Geant4.10/amd/externals/g4sipm/sample/src/RunAction.cc:9: /home/phys3aauger/tine/ApeInstalled/External/boost/1_59_0/include/boost/mpl/aux_/include_preprocessed.hpp:37:90: fatal error: boost/mpl/aux_/preprocessed/gcc/ostimes.hpp: No such file or directory # include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) ^ compilation terminated. This fatal error occurs with my own boost installation (version 1.59.0) but also with the system default boost (version 1.53.0). It worked properly on Scientific Linux 6. Now, I'm using gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), CPU codename Intel Nehalem EX, LINUX, CENTOS 7.2 environment. I would be very glad if someone could help me. It seems that somehow the AUX778076 parameter defined in "boost/1_59_0/include/boost/mpl/times.hpp" is converted to ostimes during the compilation: I've changed, just for testing reasons!, in file "/boost/1_59_0/include/boost/mpl/times.hpp" the line "#define AUX778076_OP_NAME times" to "#define AUX778076_OP_NAME timestest" and then boost is searching for the correct header "timestest.hpp" but in the case of "#define AUX778076_OP_NAME times" it is searching for "ostimes.hpp" instead of "times.hpp". Thanks in advance for your help! Cheers, Christine

On 25/04/2016 21:36, Christine Peters wrote:
I would be very glad if someone could help me. It seems that somehow the AUX778076 parameter defined in "boost/1_59_0/include/boost/mpl/times.hpp" is converted to ostimes during the compilation: I've changed, just for testing reasons!, in file "/boost/1_59_0/include/boost/mpl/times.hpp" the line "#define AUX778076_OP_NAME times" to "#define AUX778076_OP_NAME timestest" and then boost is searching for the correct header "timestest.hpp" but in the case of "#define AUX778076_OP_NAME times" it is searching for "ostimes.hpp" instead of "times.hpp".
Search through your previously included files for anything similar to this: #define times ostimes (This is just a guess, but it would match your reported symptoms.)

Thanks for the help! You were totally right, in the following Geant4 headers there is hardcoded the definition of times as ostimes. ./Geant4.10.2/geant4.10.02.p01-install/include/Geant4/G4SliceTimer.hh:#define times ostimes ./Geant4.10.2/geant4.10.02.p01-install/include/Geant4/G4Timer.hh:#define times ostimes ./Geant4.10.2/geant4.10.02.p01/source/global/management/include/G4Timer.hh:#define times ostimes ./Geant4.10.2/geant4.10.02.p01/source/global/management/include/G4SliceTimer.hh:#define times ostimes I hope now I'm able to fix the error message. Thanks again! Cheers, Christine On 04/26/2016 07:23 AM, Gavin Lambert wrote:
On 25/04/2016 21:36, Christine Peters wrote:
I would be very glad if someone could help me. It seems that somehow the AUX778076 parameter defined in "boost/1_59_0/include/boost/mpl/times.hpp" is converted to ostimes during the compilation: I've changed, just for testing reasons!, in file "/boost/1_59_0/include/boost/mpl/times.hpp" the line "#define AUX778076_OP_NAME times" to "#define AUX778076_OP_NAME timestest" and then boost is searching for the correct header "timestest.hpp" but in the case of "#define AUX778076_OP_NAME times" it is searching for "ostimes.hpp" instead of "times.hpp".
Search through your previously included files for anything similar to this:
#define times ostimes
(This is just a guess, but it would match your reported symptoms.)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Christine Peters
-
Gavin Lambert