I've opened this thread in order to explain how could I compile CC with E57 support in linux. My OS is Debian Sid, but I think the steps are also valid for other distributions. Some compilation problems were solved after the discussion in this thread: viewtopic.php?f=12&t=584
First of all, as not all the dependencies for E57 are available in the Debian repos, manual compilation of libe57 was needed. The E57 library can be downloaded from http://www.libe57.org (now, sourceforge is apparently down, so it can't be downloaded). All E57 dependencies (xerces, etc.) are in the Debian repositories, so we need to compile only libe57 itself. The build system is CMAKE, so it can be managed graphically via cmake-gui. After the cmake-gui launch, we need to check the "Advanced" option, in order to see all the configuration options. And here is the tricky part: we need to addd the -fPIC value to the options CMAKE_CXX_FLAGS and CMAKE_C_FLAGS. Apparently, there is not a way to generate libe57 as shared library (at least I've not found it at all), so only the static version will be constructed. But the compilation of the files without the -fPIC option make impossible the posterior use of libe57 in the CloudCompare compilation. Finally, we compile and install the library, for example in /opt/e57
Then, the CloudCompare compilation. The next instructions are valid for the 2.6.1 code. At this point, in the cmake-gui menu, we select the option OPTIO_USE_LIBE57. When we try to configure, we obtain two errors:
Code: Select all
CMake Error at contrib/E57Support.cmake:15 (message):
No LibE57 install dir specified (LIBE57_INSTALL_DIR)
Call Stack (most recent call first):
contrib/AllSupport.cmake:8 (include)
CMakeLists.txt:68 (include)
CMake Error at contrib/E57Support.cmake:36 (message):
Unable to find Xerces library. Please make XERCES_ROOT point to the root
of Xerces directory.
Call Stack (most recent call first):
contrib/AllSupport.cmake:8 (include)
CMakeLists.txt:68 (include)
Code: Select all
# if( NOT $ENV{XERCES_ROOT} STREQUAL "" )
# set(XERCES_ROOT $ENV{XERCES_ROOT})
set(Xerces_LIBRARY_DEBUG "/usr/lib/x86_64-linux-gnu/libxerces-c-3.1.so")
set(Xerces_LIBRARY_RELEASE "/usr/lib/x86_64-linux-gnu/libxerces-c-3.1.so")
# endif()
At this point, we can yet configure the project without errors, generate the makefiles and start compilation. The first error in the compilation proccess is
Code: Select all
[ 25%] Building CXX object libs/qCC_io/CMakeFiles/QCC_IO_LIB.dir/E57Filter.cpp.o
/home/topo/Desktop/trunk-2.6.1/libs/qCC_io/E57Filter.cpp:26:31: fatal error: E57/E57Foundation.h: No existe el fichero o el directorio
#include <E57/E57Foundation.h>
^
compilation terminated.
The next error is
Code: Select all
[ 21%] Building CXX object libs/qCC_io/CMakeFiles/QCC_IO_LIB.dir/moc_AsciiOpenDlg.cxx.o
make[2]: *** No rule to make target '/opt/e57/lib/E57RefImpl.lib', needed by 'libs/qCC_io/libQCC_IO_LIB.so'. Alto.
CMakeFiles/Makefile2:436: recipe for target 'libs/qCC_io/CMakeFiles/QCC_IO_LIB.dir/all' failed
make[1]: *** [libs/qCC_io/CMakeFiles/QCC_IO_LIB.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
Code: Select all
target_link_libraries( ${ARGV0} debug ${LIBE57_INSTALL_DIR}/lib/E57RefImpl-d.lib optimized ${LIBE57_INSTALL_DIR}/lib/E57RefImpl.lib )
Code: Select all
target_link_libraries( ${ARGV0} debug ${LIBE57_INSTALL_DIR}/lib/libE57RefImpl-d.a optimized ${LIBE57_INSTALL_DIR}/lib/libE57RefImpl.a )
Following this instructions, I was able to compile CC with E57 in Debian GNU/Linux
Thanks