[gmx-developers] compilation error in poscalc.c in master branch

Roland Schulz roland at utk.edu
Wed Dec 21 09:47:56 CET 2011


On Wed, Dec 21, 2011 at 3:42 AM, David van der Spoel
<spoel at xray.bmc.uu.se> wrote:
> On 2011-12-21 09:38, Roland Schulz wrote:
>> On Wed, Dec 21, 2011 at 3:33 AM, David van der Spoel
>> <spoel at xray.bmc.uu.se>  wrote:
>>> Any clue? This is with a boost installation from the MacPorts code on
>>> OSX Lion.
>> What boost version is that?
>> You should be able to compile with cmake -DGMX_INTERNAL_BOOST=ON
>>
>
> -- Boost version: 1.47.0
>
> The gmx cmake information discourages the use of the internal boost...
But only if Gromacs is used as a library for a non-Gromacs program.
And also only if the Gromacs C++ API is used. So it is pretty much a
non-issue at the moment. Maybe the warning should be clearer.

Roland

>
>> Roland
>>
>>>
>>> [  9%] Building CXX object
>>> src/gromacs/CMakeFiles/libgromacs.dir/selection/poscalc.cpp.o
>>> In file included from
>>> /opt/local/include/boost/mpl/aux_/include_preprocessed.hpp:37,
>>>                   from
>>> /opt/local/include/boost/mpl/aux_/template_arity.hpp:43,
>>>                   from /opt/local/include/boost/mpl/aux_/full_lambda.hpp:29,
>>>                   from /opt/local/include/boost/mpl/lambda.hpp:22,
>>>                   from /opt/local/include/boost/mpl/apply.hpp:25,
>>>                   from
>>> /opt/local/include/boost/iterator/iterator_facade.hpp:34,
>>>                   from
>>> /opt/local/include/boost/range/iterator_range_core.hpp:23,
>>>                   from /opt/local/include/boost/range/iterator_range.hpp:13,
>>>                   from
>>> /opt/local/include/boost/algorithm/string/replace.hpp:16,
>>>                   from /opt/local/include/boost/units/detail/utility.hpp:25,
>>>                   from
>>> /opt/local/include/boost/exception/detail/type_info.hpp:19
>>> ,
>>>                   from
>>> /opt/local/include/boost/exception/detail/object_hex_dump.hpp:15,
>>>                   from
>>> /opt/local/include/boost/exception/to_string_stub.hpp:16,
>>>                   from /opt/local/include/boost/exception/info.hpp:16,
>>>                   from
>>> /Users/spoel/GG/master/gromacs/src/gromacs/fatalerror/exceptions.h:46,
>>>                   from
>>> /Users/spoel/GG/master/gromacs/src/gromacs/selection/poscalc.cpp:120:
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:19: error:
>>> redefinition of 'int* c'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:19: error:
>>> 'int* c' previously declared here
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> template parameter 'c' of type 'int*' is not allowed in an integral
>>> constant expression because it is not of integral or enumeration type
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> an array reference cannot appear in a constant-expression
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> template parameter 'c' of type 'int*' is not allowed in an integral
>>> constant expression because it is not of integral or enumeration type
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> an array reference cannot appear in a constant-expression
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> template parameter 'c' of type 'int*' is not allowed in an integral
>>> constant expression because it is not of integral or enumeration type
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> an array reference cannot appear in a constant-expression
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> template parameter 'c' of type 'int*' is not allowed in an integral
>>> constant expression because it is not of integral or enumeration type
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:23: error:
>>> an array reference cannot appear in a constant-expression
>>>
>>> and later
>>>
>>> In file included from
>>> /opt/local/include/boost/mpl/aux_/include_preprocessed.hpp:37,
>>>                   from /opt/local/include/boost/mpl/aux_/full_lambda.hpp:44,
>>>                   from /opt/local/include/boost/mpl/lambda.hpp:22,
>>>                   from /opt/local/include/boost/mpl/apply.hpp:25,
>>>                   from
>>> /opt/local/include/boost/iterator/iterator_facade.hpp:34,
>>>                   from
>>> /opt/local/include/boost/range/iterator_range_core.hpp:23,
>>>                   from /opt/local/include/boost/range/iterator_range.hpp:13,
>>>                   from
>>> /opt/local/include/boost/algorithm/string/replace.hpp:16,
>>>                   from /opt/local/include/boost/units/detail/utility.hpp:25,
>>>                   from
>>> /opt/local/include/boost/exception/detail/type_info.hpp:19,
>>>                   from
>>> /opt/local/include/boost/exception/detail/object_hex_dump.hpp:15,
>>>                   from
>>> /opt/local/include/boost/exception/to_string_stub.hpp:16,
>>>                   from /opt/local/include/boost/exception/info.hpp:16,
>>>                   from
>>> /Users/spoel/GG/master/gromacs/src/gromacs/fatalerror/exceptions.h:46,
>>>                   from
>>> /Users/spoel/GG/master/gromacs/src/gromacs/selection/poscalc.cpp:120:
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:17:
>>> error: redefinition of 'bool* c'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:17:
>>> error: 'bool* c' previously declared here
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:26:
>>> error: could not convert template argument 'false' to 'bool*'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:26:
>>> error: could not convert template argument 'false' to 'bool*'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:127:
>>> error: could not convert template argument 'false' to 'bool*'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:
>>> In instantiation of 'const int
>>> boost::mpl::aux::template_arity<mpl_::na>::value':
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:94:
>>>   instantiated from 'boost::mpl::aux::template_arity<mpl_::na>'
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:555:
>>>    instantiated from here
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:91: error:
>>> 'boost::mpl::aux::template_arity_impl<mpl_::na, 1>::value' is not a
>>> valid template argument because
>>> 'boost::mpl::aux::template_arity_impl<mpl_::na, 1>::value' is a
>>> variable, not the address of a variable
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:91: error:
>>> 'boost::mpl::aux::template_arity_impl<mpl_::na, 2>::value' is not a
>>> valid template argument because
>>> 'boost::mpl::aux::template_arity_impl<mpl_::na, 2>::value' is a
>>> variable, not the address of a variable
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:
>>> In instantiation of 'boost::mpl::aux::template_arity<mpl_::na>':
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:555:
>>>    instantiated from here
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:94: error:
>>> 'boost::mpl::aux::template_arity<mpl_::na>::value' is not a valid
>>> template argument for type 'int' because it is a non-constant expression
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:555:
>>> error: 'boost::mpl::aux::template_arity<mpl_::na>::value' is not a valid
>>> template argument for type 'int' because it is a non-constant expression
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:555:
>>> error: template argument 3 is invalid
>>> /opt/local/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp:555:
>>> error: template argument 1 is invalid
>>> make[2]: ***
>>> [src/gromacs/CMakeFiles/libgromacs.dir/selection/poscalc.cpp.o] Error 1
>>> make[2]: *** Waiting for unfinished jobs....
>>> make[1]: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>> --
>>> David van der Spoel, Ph.D., Professor of Biology
>>> Dept. of Cell&  Molec. Biol., Uppsala University.
>>> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
>>> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
>>> --
>>> gmx-developers mailing list
>>> gmx-developers at gromacs.org
>>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>>> Please don't post (un)subscribe requests to the list. Use the
>>> www interface or send it to gmx-developers-request at gromacs.org.
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> spoel at xray.bmc.uu.se    http://folding.bmc.uu.se
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
>
>
>
>



-- 
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309



More information about the gromacs.org_gmx-developers mailing list