KhronosGroup / OpenCOLLADA

654 stars 252 forks source link

Undefined reference installing OpenCOLLADA - ifc #569

Open DeKasClimber opened 6 years ago

DeKasClimber commented 6 years ago

I used the Solibri Model Viewer in Windows. I want to have an alternative in Linux. All alternative solutions work with ifcOpenShell.

I tried to follow the installation steps and in step 3) OpenCollada is installed.

When running the sudo make -j command in the terminal I do have an undefined reference and I do not know how to solve it at the moment.

I followed the steps explained here but the error happens when I run the make -j command:

$ sudo apt-get install libpcre3-dev libxml2-dev $ git clone https://github.com/KhronosGroup/OpenCOLLADA.git $ cd OpenCOLLADA Using a known good revision, but HEAD should work too: $ git checkout 064a60b65c2c31b94f013820856bc84fb1937cc6 $ mkdir build && cd build $ cmake .. $ make -j $ sudo make install

It is a bit frustrating as I am not at the point that I can install ifc. It is the one application I still use Windows for. I would like to find a proper solution for viewing 3D ifc models.

Anybody has an idea?

Terminal dump:


kasper@XPS-L502X ~/OpenCOLLADA/build $ make -j [ 99%] Built target UTF_static [ 99%] Built target ftoa_static [ 99%] Built target MathMLSolver_static [ 99%] Built target OpenCOLLADABaseUtils_static [ 99%] Built target buffer_static [ 99%] Built target GeneratedSaxParser_static [ 99%] Built target OpenCOLLADAFramework_static [ 99%] Built target OpenCOLLADAStreamWriter_static [ 99%] Built target OpenCOLLADASaxFrameworkLoader_static [ 99%] Linking CXX executable ../bin/OpenCOLLADAValidator /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLSaxParserErrorHandler.cpp.o): In function COLLADASaxFWL::SaxParserErrorHandler::handleError(GeneratedSaxParser::ParserError const&)':
COLLADASaxFWLSaxParserErrorHandler.cpp:(.text+0x4c): undefined reference toCOLLADASaxFWL::SaxParserError::SaxParserError(GeneratedSaxParser::ParserError const&)' COLLADASaxFWLSaxParserErrorHandler.cpp:(.text+0x68): undefined reference to COLLADASaxFWL::SaxParserError::~SaxParserError()'
COLLADASaxFWLSaxParserErrorHandler.cpp:(.text+0x98): undefined reference toCOLLADASaxFWL::SaxParserError::~SaxParserError()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLPostProcessor.cpp.o): In function COLLADASaxFWL::PostProcessor::createAndWriteKinematicsScene()':
COLLADASaxFWLPostProcessor.cpp:(.text+0xc36): undefined reference toCOLLADASaxFWL::KinematicsSceneCreator::KinematicsSceneCreator(COLLADASaxFWL::DocumentProcessor*)' COLLADASaxFWLPostProcessor.cpp:(.text+0xc3e): undefined reference to COLLADASaxFWL::KinematicsSceneCreator::createAndGetKinematicsScene()'
COLLADASaxFWLPostProcessor.cpp:(.text+0xc6e): undefined reference toCOLLADASaxFWL::KinematicsSceneCreator::~KinematicsSceneCreator()' COLLADASaxFWLPostProcessor.cpp:(.text+0xc9b): undefined reference to COLLADASaxFWL::KinematicsSceneCreator::~KinematicsSceneCreator()'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLVersionParser.cpp.o): In functionCOLLADASaxFWL::VersionParser::parse15(char const*, GeneratedSaxParser::ParserAttributes const&)': COLLADASaxFWLVersionParser.cpp:(.text+0x414): undefined reference to COLLADASaxFWL::RootParser15::RootParser15(COLLADASaxFWL::FileLoader*)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLRootParser14.cpp.o): In functionCOLLADASaxFWL::RootParser14::begin__library_materials(COLLADASaxFWL14::library_materials__AttributeData const&)': COLLADASaxFWLRootParser14.cpp:(.text+0x35e): undefined reference to COLLADASaxFWL::LibraryMaterialsLoader::LibraryMaterialsLoader(COLLADASaxFWL::IFilePartLoader*)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLRootParser14.cpp.o): In functionCOLLADASaxFWL::RootParser14::begin__library_images(COLLADASaxFWL14::library_images__AttributeData const&)': COLLADASaxFWLRootParser14.cpp:(.text+0x6cb): undefined reference to vtable for COLLADASaxFWL::LibraryImagesLoader14'
COLLADASaxFWLRootParser14.cpp:(.text+0x6d3): undefined reference tovtable for COLLADASaxFWL::LibraryImagesLoader14' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTIN13COLLADASaxFWL12MeshLoader15E[_ZTIN13COLLADASaxFWL12MeshLoader15E]+0x10): undefined reference to typeinfo for COLLADASaxFWL::SourceArrayLoader15'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x20): undefined reference toCOLLADASaxFWL::SourceArrayLoader15::begin__float_array(COLLADASaxFWL15::float_array__AttributeData const&)' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x28): undefined reference to COLLADASaxFWL::SourceArrayLoader15::end__float_array()'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x30): undefined reference toCOLLADASaxFWL::SourceArrayLoader15::data__float_array(float const*, unsigned long)' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x38): undefined reference to COLLADASaxFWL::SourceArrayLoader15::begin__source_type____technique_common()'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x40): undefined reference toCOLLADASaxFWL::SourceArrayLoader15::end__source_type____technique_common()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x48): undefined reference to COLLADASaxFWL::SourceArrayLoader15::begin__accessor(COLLADASaxFWL15::accessor__AttributeData const&)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x50): undefined reference toCOLLADASaxFWL::SourceArrayLoader15::end__accessor()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x58): undefined reference to COLLADASaxFWL::SourceArrayLoader15::begin__param____param_type(COLLADASaxFWL15::param____param_type__AttributeData const&)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x60): undefined reference toCOLLADASaxFWL::SourceArrayLoader15::end__param____param_type()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x68): undefined reference to COLLADASaxFWL::SourceArrayLoader15::data__param____param_type(char const*, unsigned long)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x458): undefined reference tonon-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::begin__float_array(COLLADASaxFWL15::float_array__AttributeData const&)' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x460): undefined reference to non-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::end__float_array()'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x468): undefined reference tonon-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::data__float_array(float const*, unsigned long)' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4a0): undefined reference to non-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::begin__source_type____technique_common()'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4a8): undefined reference tonon-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::end__source_type____technique_common()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4b0): undefined reference to non-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::begin__accessor(COLLADASaxFWL15::accessor__AttributeData const&)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4b8): undefined reference tonon-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::end__accessor()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4c0): undefined reference to non-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::begin__param____param_type(COLLADASaxFWL15::param____param_type__AttributeData const&)'
/home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4c8): undefined reference tonon-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::end__param____param_type()' /home/kasper/OpenCOLLADA/build/lib/libOpenCOLLADASaxFrameworkLoader.a(COLLADASaxFWLMeshLoader15.cpp.o):(.rodata._ZTVN13COLLADASaxFWL12MeshLoader15E[_ZTVN13COLLADASaxFWL12MeshLoader15E]+0x4d0): undefined reference to `non-virtual thunk to COLLADASaxFWL::SourceArrayLoader15::data__param____param_type(char const*, unsigned long)' collect2: error: ld returned 1 exit status COLLADAValidator/CMakeFiles/OpenCOLLADAValidator.dir/build.make:123: recipe for target 'bin/OpenCOLLADAValidator' failed make2: * [bin/OpenCOLLADAValidator] Error 1 CMakeFiles/Makefile2:598: recipe for target 'COLLADAValidator/CMakeFiles/OpenCOLLADAValidator.dir/all' failed make1: * [COLLADAValidator/CMakeFiles/OpenCOLLADAValidator.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
RemiArnaud commented 6 years ago

Why not using the pre built libraries? Go to https://github.com/KhronosGroup/OpenCOLLADA/releases and click on OpenCollada for windows.

DeKasClimber commented 6 years ago

Thanks for the quick response. I'm usiing linux mint. But maybe the response is the same (I see a built for ubuntu) what is the prefered location to put the built librarie?

RemiArnaud commented 6 years ago

Sorry, I read your question backward. Yes we also have a pre-build for ubuntu.

Here's what the job script does:

#sudo apt-get install g++
#sudo apt-get install libxml2-dev
#sudo apt-get install libpcre3 libpcre3-dev

cd $WORKSPACE

#make sure we don't have dependencies into plugin folders
rm -rf COLLADAMax
rm -rf COLLADAMaya

rm -rf build
mkdir build
cd build

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=. ../

make -j5

and then it collects the artifacts with a ant script:

<delete dir="jenkins-artifacts" verbose="true"/>
<mkdir dir="jenkins-artifacts" />

<copy todir="jenkins-artifacts" verbose="true" overwrite="true" force="true">
  <fileset dir="build" includes="bin/**,lib/**" />
</copy>

<chmod file="jenkins-artifacts/bin/**" perm="744"/>
DeKasClimber commented 6 years ago

I feel like stupid... When I downloaded the "openCOLLADA-ubuntu_v1.6.62" I have a zip that I do not have any idea where to put it nor what to do with it.. I do not see which script to run. The $workspace is new to me as well.. it seems to me that I'm missing some fundamental linux skills to find a way to open an ifc file..