ifcplusplus icon indicating copy to clipboard operation
ifcplusplus copied to clipboard

fails to compile on Ubuntu 14.04

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

What steps will reproduce the problem?
1. Install Ubuntu 14.04
2. Install prerequisites for compiling ifcpluplus
3. Try to compile ifcplusplus

What is the expected output? What do you see instead?
I expect the to program to compile nicely.

Left with this qt linking problem after solving other compile stopping bugs.

Linking CXX executable ../Release/IfcPlusPlusViewer
CMakeFiles/IfcPlusPlusViewer.dir/src/IfcPlusPlusSystem.cpp.o: In function 
`IfcPlusPlusSystem::IfcPlusPlusSystem()':
IfcPlusPlusSystem.cpp:(.text+0x6fa): undefined reference to 
`ReaderWriterIFC::ReaderWriterIFC()'
IfcPlusPlusSystem.cpp:(.text+0x812): undefined reference to 
`ReaderWriterIFC::~ReaderWriterIFC()'
CMakeFiles/IfcPlusPlusViewer.dir/src/IfcPlusPlusSystem.cpp.o: In function 
`IfcPlusPlusSystem::IfcPlusPlusSystem()':
IfcPlusPlusSystem.cpp:(.text+0xb1b): undefined reference to 
`ReaderWriterIFC::ReaderWriterIFC()'
IfcPlusPlusSystem.cpp:(.text+0xc90): undefined reference to 
`ReaderWriterIFC::~ReaderWriterIFC()'
CMakeFiles/IfcPlusPlusViewer.dir/src/IfcPlusPlusSystem.cpp.o: In function 
`std::tr1::_Sp_counted_base_impl<ReaderWriterIFC*, 
std::tr1::_Sp_deleter<ReaderWriterIFC>, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()':
IfcPlusPlusSystem.cpp:(.text._ZNSt3tr121_Sp_counted_base_implIP15ReaderWriterIFC
NS_11_Sp_deleterIS1_EELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt3tr121_S
p_counted_base_implIP15ReaderWriterIFCNS_11_Sp_deleterIS1_EELN9__gnu_cxx12_Lock_
policyE2EE10_M_disposeEv]+0xe): undefined reference to 
`ReaderWriterIFC::~ReaderWriterIFC()'
CMakeFiles/IfcPlusPlusViewer.dir/src/ViewController.cpp.o: In function 
`ViewController::setViewerMode(ViewController::ViewerMode)':
ViewController.cpp:(.text+0x2a9): undefined reference to 
`GeomUtils::WireFrameModeOff(osg::Node*)'
ViewController.cpp:(.text+0x2c1): undefined reference to 
`GeomUtils::HiddenLineModeOff(osg::Group*)'
CMakeFiles/IfcPlusPlusViewer.dir/src/ViewController.cpp.o: In function 
`ViewController::ViewController()':
ViewController.cpp:(.text+0xaf6): undefined reference to 
`GeomUtils::createCoordinateAxes()'
ViewController.cpp:(.text+0xb29): undefined reference to 
`GeomUtils::createCoordinateAxesArrows()'
CMakeFiles/IfcPlusPlusViewer.dir/src/ViewController.cpp.o: In function 
`ViewController::setViewerMode(ViewController::ViewerMode)':
ViewController.cpp:(.text+0x29a): undefined reference to 
`GeomUtils::HiddenLineModeOn(osg::Group*)'
ViewController.cpp:(.text+0x2da): undefined reference to 
`GeomUtils::WireFrameModeOn(osg::Node*)'
CMakeFiles/IfcPlusPlusViewer.dir/src/cmd/CmdWriteIfcFile.cpp.o: In function 
`CmdWriteIfcFile::doCmd()':
CmdWriteIfcFile.cpp:(.text+0x408): undefined reference to 
`IfcPPModel::initFileHeader(std::string)'
CMakeFiles/IfcPlusPlusViewer.dir/src/cmd/LoadIfcFileCommand.cpp.o: In function 
`LoadIfcFileCommand::doCmd()':
LoadIfcFileCommand.cpp:(.text+0xf2): undefined reference to 
`ReaderWriterIFC::resetModel()'
LoadIfcFileCommand.cpp:(.text+0xf9): undefined reference to `carve::EPSILON'
LoadIfcFileCommand.cpp:(.text+0x121): undefined reference to `carve::EPSILON2'
LoadIfcFileCommand.cpp:(.text+0x2e3): undefined reference to 
`ReaderWriterIFC::loadModelFromFile(std::string const&)'
LoadIfcFileCommand.cpp:(.text+0x2ff): undefined reference to 
`ReaderWriterIFC::createGeometryOSG(osg::ref_ptr<osg::Switch>)'
LoadIfcFileCommand.cpp:(.text+0x41f): undefined reference to 
`ReaderWriterIFC::clearInputCache()'
LoadIfcFileCommand.cpp:(.text+0x62c): undefined reference to 
`GeomUtils::applyTranslate(osg::Group*, osg::Vec3f const&, 
std::unordered_set<osg::Geode*, int>&)'
CMakeFiles/IfcPlusPlusViewer.dir/src/gui/IfcTreeWidget.cpp.o: In function 
`resolveTreeItems(std::tr1::shared_ptr<IfcPPObject>, std::set<int, 
std::less<int>, std::allocator<int> >&)':
IfcTreeWidget.cpp:(.text+0x816): undefined reference to `typeinfo for 
IfcObjectDefinition'
IfcTreeWidget.cpp:(.text+0xb09): undefined reference to `typeinfo for 
IfcSpatialStructureElement'
IfcTreeWidget.cpp:(.text+0xb12): undefined reference to `typeinfo for 
IfcObjectDefinition'
CMakeFiles/IfcPlusPlusViewer.dir/src/gui/IfcTreeWidget.cpp.o: In function 
`IfcTreeWidget::slotModelLoadingDone()':
IfcTreeWidget.cpp:(.text+0xf61): undefined reference to 
`IfcPPModel::getIfcProject()'
CMakeFiles/IfcPlusPlusViewer.dir/src/gui/TabView.cpp.o: In function 
`TabView::TabView(IfcPlusPlusSystem*, ViewerWidget*)':
TabView.cpp:(.text+0x2a7): undefined reference to 
`GeomUtils::cullFrontBack(bool, bool, osg::StateSet*)'
CMakeFiles/IfcPlusPlusViewer.dir/src/gui/TabView.cpp.o: In function 
`TabView::slotCullFrontFaces(int)':
TabView.cpp:(.text+0xcfb): undefined reference to 
`GeomUtils::cullFrontBack(bool, bool, osg::StateSet*)'
CMakeFiles/IfcPlusPlusViewer.dir/src/gui/TabView.cpp.o: In function 
`TabView::slotCullBackFaces(int)':
TabView.cpp:(.text+0xe6b): undefined reference to 
`GeomUtils::cullFrontBack(bool, bool, osg::StateSet*)'
collect2: error: ld returned 1 exit status
make[2]: *** [Release/IfcPlusPlusViewer] Error 1
make[1]: *** [SimpleViewer/CMakeFiles/IfcPlusPlusViewer.dir/all] Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?
Ubuntu 14.04
ifcplusplus latest

Please provide any additional information below.

Please ask if more details necessary.

Regards

Original issue reported on code.google.com by [email protected] on 25 Nov 2014 at 6:35

GoogleCodeExporter avatar Apr 01 '15 13:04 GoogleCodeExporter

There are some changes in the meantime... I tested cmake and make unter Ubuntu. 
It compiles, but there is a seg fault at runtime. I have no experience with 
debugging under Linux, so I can't really track down the problem (on Windows 
there's no seg fault).
Since you work with Linux, you have probably experience with debugging and 
stuff under Linux? If so, help would be greatly appreciated :)

Original comment by [email protected] on 16 Dec 2014 at 4:00

  • Added labels: ****
  • Removed labels: ****

GoogleCodeExporter avatar Apr 01 '15 13:04 GoogleCodeExporter

Hi.

Seems to be a linking an issue with linking to Qt in viewer application.

Debugger cannot even enter the main() function, when the problem occurs.

Quick google search returns this thread, with identical symptoms: 
https://bugreports.qt-project.org/browse/QTBUG-26926

debugging under linux... it simplest to achieve using qtcreator, since it can 
open CMake project files, it works nicely with this project. (open root 
cmakelists.txt)

Original comment by [email protected] on 17 Dec 2014 at 12:27

  • Added labels: ****
  • Removed labels: ****

GoogleCodeExporter avatar Apr 01 '15 13:04 GoogleCodeExporter