GSI Helmholtzzentrum für Schwerionenforschung
Problems compiling CADConverter on Ubuntu 9.04
Using the steps described in the wiki I get these errors when doing make on the CadConverter: Toggle Spoiler root@sverre-laptop2:/opt/CadConv/build# make /usr/bin/cmake -H/opt/CadConv/CadConverterConsole -B/opt/CadConv/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /opt/CadConv/build/CMakeFiles /opt/CadConv/build/CMakeFiles/progress.make make -f CMakeFiles/Makefile2 all make[1]: Entering directory `/opt/CadConv/build' make -f CadDDLConverter/CMakeFiles/CADConverter.dir/build.make CadDDLConverter/CMakeFiles/CADConverter.dir/depend make[2]: Entering directory `/opt/CadConv/build' cd /opt/CadConv/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /opt/CadConv/CadConverterConsole /opt/CadConv/CadConverterConsole/CadDDLConverter /opt/CadConv/build /opt/CadConv/build/CadDDLConverter /opt/CadConv/build/CadDDLConverter/CMakeFiles/CADConverter.dir/DependInfo.cmake --color= make[2]: Leaving directory `/opt/CadConv/build' make -f CadDDLConverter/CMakeFiles/CADConverter.dir/build.make CadDDLConverter/CMakeFiles/CADConverter.dir/build make[2]: Entering directory `/opt/CadConv/build' /usr/bin/cmake -E cmake_progress_report /opt/CadConv/build/CMakeFiles 1 [ 2%] Building CXX object CadDDLConverter/CMakeFiles/CADConverter.dir/CadDDLConverter.o cd /opt/CadConv/build/CadDDLConverter && /usr/bin/c++ -DCADConverter_EXPORTS -DCSFDB -DNO_CXX_EXCEPTION -DNo_Exception -DHAVE_CONFIG_H -DHAVE_WOK_CONFIG_H -DLIN -DLININTEL -DHAVE_IOSTREAM -DHAVE_LIMITS -g -fPIC -I/opt/fairROOT/fairsoft/tools/root/include -I/opt/OpenCASCADES6.3.0/inc -I/opt/fairROOT/fairsoft/tools/root/lib -I/opt/OpenCASCADES6.3.0/Linux/lib -o CMakeFiles/CADConverter.dir/CadDDLConverter.o -c /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.cc In file included from /opt/OpenCASCADES6.3.0/inc/Standard_Macro.hxx:11, from /opt/OpenCASCADES6.3.0/inc/Handle_TDF_Data.hxx:26, from /opt/OpenCASCADES6.3.0/inc/TDF_Label.hxx:29, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CxlObject.hh:16, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.hh:4, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.cc:1: /opt/fairROOT/fairsoft/tools/root/include/config.h:16:2: warning: #warning config.h is deprecated, replace by RConfigure.h. In file included from /opt/OpenCASCADES6.3.0/inc/Standard_Address.hxx:21, from /opt/OpenCASCADES6.3.0/inc/Standard.hxx:26, from /opt/OpenCASCADES6.3.0/inc/Handle_TDF_Data.hxx:29, from /opt/OpenCASCADES6.3.0/inc/TDF_Label.hxx:29, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CxlObject.hh:16, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.hh:4, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.cc:1: /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx: In function ‘Standard_Integer IntegerFirst()’: /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx:119: error: ‘INT_MIN’ was not declared in this scope /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx: In function ‘Standard_Integer IntegerLast()’: /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx:125: error: ‘INT_MAX’ was not declared in this scope /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx: In function ‘Standard_Integer IntegerSize()’: /opt/OpenCASCADES6.3.0/inc/Standard_Integer.hxx:131: error: ‘CHAR_BIT’ was not declared in this scope In file included from /opt/OpenCASCADES6.3.0/inc/Standard_PrimitiveTypes.hxx:23, from /opt/OpenCASCADES6.3.0/inc/Handle_Standard_Transient.hxx:10, from /opt/OpenCASCADES6.3.0/inc/Handle_MMgt_TShared.hxx:33, from /opt/OpenCASCADES6.3.0/inc/Handle_TDF_Data.hxx:33, from /opt/OpenCASCADES6.3.0/inc/TDF_Label.hxx:29, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CxlObject.hh:16, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.hh:4, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.cc:1: /opt/OpenCASCADES6.3.0/inc/Standard_Real.hxx: In function ‘Standard_Integer RealSize()’: /opt/OpenCASCADES6.3.0/inc/Standard_Real.hxx:162: error: ‘CHAR_BIT’ was not declared in this scope /opt/OpenCASCADES6.3.0/inc/Standard_Real.hxx: In function ‘Standard_Integer RealToInt(Standard_Real)’: /opt/OpenCASCADES6.3.0/inc/Standard_Real.hxx:283: error: ‘INT_MIN’ was not declared in this scope /opt/OpenCASCADES6.3.0/inc/Standard_Real.hxx:283: error: ‘INT_MAX’ was not declared in this scope In file included from /opt/OpenCASCADES6.3.0/inc/Standard_OStream.hxx:8, from /opt/OpenCASCADES6.3.0/inc/Standard_ExtCharacter.hxx:24, from /opt/OpenCASCADES6.3.0/inc/Standard_PrimitiveTypes.hxx:29, from /opt/OpenCASCADES6.3.0/inc/Handle_Standard_Transient.hxx:10, from /opt/OpenCASCADES6.3.0/inc/Handle_MMgt_TShared.hxx:33, from /opt/OpenCASCADES6.3.0/inc/Handle_TDF_Data.hxx:33, from /opt/OpenCASCADES6.3.0/inc/TDF_Label.hxx:29, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CxlObject.hh:16, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.hh:4, from /opt/CadConv/CadConverterConsole/CadDDLConverter/CadDDLConverter.cc:1: /opt/OpenCASCADES6.3.0/inc/Standard_Stream.hxx: At global scope: /opt/OpenCASCADES6.3.0/inc/Standard_Stream.hxx:84: error: ‘std::setw’ has not been declared /opt/OpenCASCADES6.3.0/inc/Standard_Stream.hxx:85: error: ‘std::setprecision’ has not been declared make[2]: *** [CadDDLConverter/CMakeFiles/CADConverter.dir/CadDDLConverter.o] Error 1 make[2]: Leaving directory `/opt/CadConv/build' make[1]: *** [CadDDLConverter/CMakeFiles/CADConverter.dir/all] Error 2 make[1]: Leaving directory `/opt/CadConv/build' make: *** [all] Error 2 All variables has been set as explained in the wiki. CMake runs without errors. The errors points to some variables not beeing declared which would imply that somehow an include is missing. I'm using OpenCASCADES 6.3 and CadConverter2.2_OCC6.3.tar.gz Also tried the tip from Simone Bianco in the wiki by changing: {CadConverterConsole}/CMakeLists.txt --> CadConverterFixed/CMakeLists.txt {CadConverterConsole}/CadDDLConverter/CMakeLists.txt --> CadConverterFixed/CadDDLConverter/CMakeLists.txt {CadConverterConsole}/cmake/Modules/FindOpenCascade.cmake --> CadConverterFixed/cmake/Modules/FindOpenCascade.cmake Does anybody have a clue how this might be fixed? Best regards and thanks in advance for all your efforts, Sverre
Re: Problems compiling CADConverter on Ubuntu 9.04
Hi Sverre Probably all the errors has to do with changes in the standard header files. With new versions of gcc there were a cleanup of include statements in the header files. This results in compilation errors because functions/definitions are not known any longer. For example INT_MAX, INT_MIN and CHAR_BIT are defined in climits.h. std::setw and std::setprecision are defined in iomanip. Adding these header files should solve the problems. Since the problems are in an external package maybe upgrade to a newer version of OpenCascade. Ciao Florian
Hi Florian Thanks for the quick answer. As you pointed out the problem seems to be located in the header files of OpenCascade. What wonders me is that I have the latest verion, downloaded it today. And it compiled without a single error. I will now try you tip and include those files in the OpenCascade headers. Edit 24.06.09 19:45 I got it to compile by changing all the includes for config.h. The were included using: #include <config.h> Since the ROOT came before in the include-path the ROOT config.h was included instead of the one belonging to OpenCascade. So i changed it to: #include "config.h" In addition I had to remove the compiler option HAVE_LIMITS in the CMakeLists.txt file. With this variable not se, the limits.h file is included. Best Regards Sverre