DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
368 stars 111 forks source link

Compilation fails #148

Closed dagonzalez closed 12 years ago

dagonzalez commented 12 years ago

Compilation fails on ArchLinux kernel 3.0.

Cmake output:

-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done


-- DGtal Version 0.4.beta


-- Source DIR is /home/damien/DGTAL/DGtal -- Binary DIR is /home/damien/DGTAL/DGtal -- Build type is -- Installation prefix directory is /usr/local -- Host system is Linux-3.0-ARCH with processor i686 -- Target system is Linux-3.0-ARCH with processor i686 CMake Warning at cmake/doxygen.cmake:11 (message): Note: dot program not found in environment. If you wish to use it in doxygen, you should add its path to the variable PATH. Call Stack (most recent call first): CMakeLists.txt:66 (INCLUDE)

-- disabling dot. -- Found Doxygen: /usr/bin/doxygen -- configured /home/damien/DGTAL/DGtal/doc/doxy.config.in --> /home/damien/DGTAL/DGtal/doxy.config -- configured /home/damien/DGTAL/DGtal/doc/doxy.config.Board.in --> /home/damien/DGTAL/DGtal/doxy.config.Board -- [c++0x] with initializer_list -- [c++0x] with auto -- Boost version: 1.47.0 -- Found the following Boost libraries: -- program_options -- Boost and boost_program_options found.


-- DGtal Library optional configuration: -- (to change these values, use ccmake, a graphical -- cmake frontend, or define cmake commandline variables -- -e.g. '-DWITH_GMP:string=true'-, cf documentation)


-- WITH_ALL false

-- WITH_GMP false -- WITH_ITK false -- WITH_CAIRO false -- WITH_COIN3D-SOQT false -- WITH_QGLVIEWER false -- WITH_MAGICK false


-- Configuring done -- Generating done -- Build files have been written to: /home/damien/DGTAL/DGtal

make output:

[ 1%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/base/Common.cpp.o [ 2%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/base/OrderedAlphabet.cpp.o [ 3%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/math/MeasureOfStraightLines.cpp.o [ 4%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/topology/SurfelAdjacency.cpp.o [ 5%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/io/boards/Board2D.cpp.o [ 6%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/io/Color.cpp.o [ 7%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/helpers/StdDefs.cpp.o In file included from /home/damien/DGTAL/DGtal/src/DGtal/kernel/CInteger.h:47:0, from /home/damien/DGTAL/DGtal/src/DGtal/kernel/CSpace.h:49, from /home/damien/DGTAL/DGtal/src/DGtal/kernel/domains/HyperRectDomain.h:49, from /home/damien/DGTAL/DGtal/src/DGtal/helpers/StdDefs.h:46, from /home/damien/DGTAL/DGtal/src/DGtal/helpers/StdDefs.cpp:30: /home/damien/DGTAL/DGtal/src/DGtal/kernel/IntegerTraits.h: In instantiation of ‘DGtal::IntegerTraits’: /home/damien/DGTAL/DGtal/src/DGtal/kernel/CInteger.h:139:43: instantiated from ‘DGtal::CInteger’ /usr/include/boost/concept/detail/has_constraints.hpp:42:5: instantiated from ‘const bool boost::concepts::not_satisfiedDGtal::CInteger::value’ /usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfiedDGtal::CInteger’ /usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_boost::concepts::notsatisfied<DGtal::CInteger, boost::concepts::constraintDGtal::CInteger, boost::concepts::requirement<boost::concepts::failed**** DGtal::CInteger::***> >’ /usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement<void ()(DGtal::CInteger)>’ /home/damien/DGTAL/DGtal/src/DGtal/kernel/PointVector.h:133:1: instantiated from ‘DGtal::PointVector<2u, double>’ /home/damien/DGTAL/DGtal/src/DGtal/kernel/RealPointVector.h:80:9: instantiated from ‘DGtal::RealPointVector<2u>’ /home/damien/DGTAL/DGtal/src/DGtal/geometry/2d/ArithmeticalDSS.ih:1029:85: instantiated from here /home/damien/DGTAL/DGtal/src/DGtal/kernel/IntegerTraits.h:96:30: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘const double DGtal::IntegerTraits::ZERO’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/IntegerTraits.h:105:29: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘const double DGtal::IntegerTraits::ONE’ of non-integral type make[2]: * [src/CMakeFiles/DGtal.dir/DGtal/helpers/StdDefs.cpp.o] Erreur 1 make[1]: * [src/CMakeFiles/DGtal.dir/all] Erreur 2 make: *\ [all] Erreur 2 zsh: exit 2 make

dcoeurjo commented 12 years ago

This should be fixed in the last version of the DGtal project on GITHUB. Could you please update your copy (git pull) and test it again ?

dagonzalez commented 12 years ago

It still fails:

[ 1%] Building CXX object src/CMakeFiles/DGtal.dir/DGtal/base/OrderedAlphabet.cpp.o In file included from /home/damien/DGTAL/DGtal/src/DGtal/base/OrderedAlphabet.h:50:0, from /home/damien/DGTAL/DGtal/src/DGtal/base/OrderedAlphabet.cpp:32: /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:884:31: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ZERO’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:885:30: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ONE’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:938:32: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ZERO’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:939:31: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ONE’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:992:37: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ZERO’ of non-integral type /home/damien/DGTAL/DGtal/src/DGtal/kernel/NumberTraits.h:993:36: erreur: ‘constexpr’ needed for in-class initialization of static data member ‘ONE’ of non-integral type make[2]: * [src/CMakeFiles/DGtal.dir/DGtal/base/OrderedAlphabet.cpp.o] Erreur 1 make[1]: * [src/CMakeFiles/DGtal.dir/all] Erreur 2 make: *\ [all] Erreur 2 zsh: exit 2 make

dcoeurjo commented 12 years ago

Could you please give me info on your compiler ?

dagonzalez commented 12 years ago

Yes of course:

g++ (GCC) 4.6.1 20110819 (prerelease) Copyright © 2011 Free Software Foundation, Inc.

dcoeurjo commented 12 years ago

Ok we have a fix... it will be pushed into the DGtal/master soon. I'm closing the issue, thanks for the report

dcoeurjo commented 12 years ago

It seems to be ok now, could you test the last version of the repo ?

dagonzalez commented 12 years ago

It builts fine thanks.