compilation fails under Fedora 26

Issue #1206 new
kluth
created an issue

Tried to compile cedar 5.0 under Fedora 26 (downloaded via cedar.ini.rub.de). After having some troubles with cmake*, I was able to compile only parts of cedar.

Actually, I do have at the moment two errors that I can't resolve. The first appears when running only make (without using several cores)

[  0%] Built target cedarunits
[ 30%] Built target cedaraux
[ 40%] Built target cedardev
Scanning dependencies of target cedarproc
[ 40%] Building CXX object cedar/processing/CMakeFiles/cedarproc.dir/gui/Ide.cpp.o
/home/thomas/DFT/cedar/cedar/processing/gui/Ide.cpp:90:12: schwerwiegender Fehler: boost/property_tree/detail/json_parser_error.hpp: Datei oder Verzeichnis nicht gefunden
   #include <boost/property_tree/detail/json_parser_error.hpp>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kompilierung beendet.
make[2]: *** [cedar/processing/CMakeFiles/cedarproc.dir/build.make:2540: cedar/processing/CMakeFiles/cedarproc.dir/gui/Ide.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:321: cedar/processing/CMakeFiles/cedarproc.dir/all] Fehler 2
make: *** [Makefile:163: all] Fehler 2

I do have a file on my system /usr/include/boost/property_tree/json_parser.hpp, but not the file under /usr/include/boost/property_tree/detail/json_parser.hpp.

I changed the include in the source file (removed the detail subfolder) but got the same file-not-found error.

The next error I got comes when I compile with four cores:

> make -j 4

[  0%] Built target cedarunits
[  0%] Linking CXX executable ../../../../../bin/unitTest/units/unitTest_UnitMatrix
[ 30%] Built target cedaraux
[ 30%] Linking CXX executable ../../../../../bin/unitTest/auxiliaries/unitTest_Backtrace
[ 30%] Linking CXX executable ../../../../../bin/unitTest/auxiliaries/unitTest_ArithmeticExpression
[ 40%] Built target cedardev
[ 40%] Linking CXX executable ../../../../../bin/unitTest/auxiliaries/unitTest_CTestTest
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setPublicId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setEncoding(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setSystemId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/unit/units/UnitMatrix/CMakeFiles/unitTest_UnitMatrix.dir/build.make:292: ../bin/unitTest/units/unitTest_UnitMatrix] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:3349: tests/unit/units/UnitMatrix/CMakeFiles/unitTest_UnitMatrix.dir/all] Fehler 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setSystemId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setPublicId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setEncoding(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/unit/auxiliaries/ArithmeticExpression/CMakeFiles/unitTest_ArithmeticExpression.dir/build.make:316: ../bin/unitTest/auxiliaries/unitTest_ArithmeticExpression] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:491: tests/unit/auxiliaries/ArithmeticExpression/CMakeFiles/unitTest_ArithmeticExpression.dir/all] Fehler 2
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setSystemId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setPublicId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setEncoding(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/unit/auxiliaries/Backtrace/CMakeFiles/unitTest_Backtrace.dir/build.make:316: ../bin/unitTest/auxiliaries/unitTest_Backtrace] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:547: tests/unit/auxiliaries/Backtrace/CMakeFiles/unitTest_Backtrace.dir/all] Fehler 2
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setSystemId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setPublicId(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::InputSource::setEncoding(unsigned short const*)'
//usr/lib64/libgdal.so.20: undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/unit/auxiliaries/CTestTest/CMakeFiles/unitTest_CTestTest.dir/build.make:316: ../bin/unitTest/auxiliaries/unitTest_CTestTest] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:603: tests/unit/auxiliaries/CTestTest/CMakeFiles/unitTest_CTestTest.dir/all] Fehler 2
make: *** [Makefile:163: all] Fehler 2

I don't think that the two errors are related.

*I could let you know of some stuff I needed to fix so that cmake worked for me, but I'm not so sure whether you are releasing cedar 6 soon?

Comments (3)

  1. kluth reporter

    I came across a third error when running make -j 3

    In file included from /usr/include/c++/7/complex:45:0,
                     from /usr/include/opencv2/core/cvstd.inl.hpp:48,
                     from /usr/include/opencv2/core.hpp:3215,
                     from /usr/include/opencv2/opencv.hpp:52,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/exceptions.h:51,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/Singleton.h:42,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/Parameter.h:45,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/StringParameter.h:45,
                     from /home/thomas/DFT/cedar/tests/unit/auxiliaries/gui/gui_StringParameter/main.cpp:54:
    /usr/include/c++/7/sstream:300:7: Fehler: »struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs« mit anderem Zugriff redeklariert
           struct __xfer_bufptrs
           ^~~~~~
    make[2]: *** [tests/unit/auxiliaries/gui/gui_StringParameter/CMakeFiles/unitTest_gui_StringParameter.dir/build.make:63: tests/unit/auxiliaries/gui/gui_StringParameter/CMakeFiles/unitTest_gui_StringParameter.dir/main.cpp.o] Fehler 1
    make[1]: *** [CMakeFiles/Makefile2:4733: tests/unit/auxiliaries/gui/gui_StringParameter/CMakeFiles/unitTest_gui_StringParameter.dir/all] Fehler 2
    make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
    In file included from /usr/include/c++/7/complex:45:0,
                     from /usr/include/opencv2/core/cvstd.inl.hpp:48,
                     from /usr/include/opencv2/core.hpp:3215,
                     from /usr/include/opencv2/opencv.hpp:52,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/exceptions.h:51,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/Singleton.h:42,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/Parameter.h:45,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/VectorParameter.h:44,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/NumericVectorParameter.h:44,
                     from /home/thomas/DFT/cedar/cedar/auxiliaries/gui/DoubleVectorParameter.h:45,
                     from /home/thomas/DFT/cedar/tests/unit/auxiliaries/gui/gui_NumericVectorParameter/main.cpp:52:
    /usr/include/c++/7/sstream:300:7: Fehler: »struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs« mit anderem Zugriff redeklariert
           struct __xfer_bufptrs
           ^~~~~~
    make[2]: *** [tests/unit/auxiliaries/gui/gui_NumericVectorParameter/CMakeFiles/unitTest_gui_NumericVectorParameter.dir/build.make:63: tests/unit/auxiliaries/gui/gui_NumericVectorParameter/CMakeFiles/unitTest_gui_NumericVectorParameter.dir/main.cpp.o] Fehler 1
    make[1]: *** [CMakeFiles/Makefile2:4677: tests/unit/auxiliaries/gui/gui_NumericVectorParameter/CMakeFiles/unitTest_gui_NumericVectorParameter.dir/all] Fehler 2
    make: *** [Makefile:163: all] Fehler 2
    
  2. kluth reporter

    I tested also with cedar 5.1.0 (apparently, the older version 5.0.1 is linked from cedar.ini.rub.de) and now only get the first error:

    /home/thomas/DFT/cedar5.1.0/cedar/processing/gui/Ide.cpp:90:12: schwerwiegender Fehler: boost/property_tree/detail/json_parser_error.hpp: Datei oder Verzeichnis nicht gefunden
       #include <boost/property_tree/detail/json_parser_error.hpp>
    
  3. kluth reporter

    okay, "Wer lesen kann, ist klar im Vorteil."

    In the file cedar/cedar/processing/gui/Ide.cpp I've changed the line

    #include <boost/property_tree/detail/json_parser_error.hpp>
    

    to

    #include <boost/property_tree/json_parser.hpp>
    

    (note the missing _error in the second file name) and it compiles.

    I fixed then the linking problem from above (xerces-c) by including the following lines to the file cmake/libraries.txt:

    ## xerces
    message("-- searching for xerces")
    include(FindXercesC)
    find_package(XercesC REQUIRED)
    include_directories( ${XercesC_INCLUDE_DIR} )
    set(CEDAR_THIRD_PARTY_LIBS ${CEDAR_THIRD_PARTY_LIBS} ${XercesC_LIBRARY})
    ###
    

    Now, the compilation runs without errors. But here comes the next problem for which my knowledge is too little: Running any executable file that I compiled, e.g. bin/cedar (but also make test or any other file) immediately crashes with the output that is available under this link. Since it looks like something with Qt5 and I've read that you don't support Qt5 yet, I've disabled the corresponding FindQt5 section in cmake/libraries.txt hoping that cedar will be built only using Qt4. This didn't work though, the error is still the same (or my build system is fooling me because it wrongly uses cached versions? I'm using ccache).

    I'm lost now, any ideas?

  4. Log in to comment