Compil IfcOpenShell

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Compil IfcOpenShell

Post by rockn »

Hi everone,
I try to compil IfcOpenShell for use it in the Arch wb of FreeCad but I have a problem.
The cmake return 3 not found (fstream.h, iomanip.h, iostream.h) but I don't know where I can find them ?

Code: Select all

jo@jo-desktop:~/BEBois/Dev/Git/IfcOpenShell/build$ cmake -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7.so ../sources/cmake
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.54.0
-- Boost include files found in /usr/include
-- Boost libraries found in /usr/lib
-- Looking for opencascade include files in: /usr/include/opencascade
-- Use OCC_INCLUDE_DIR to specify another directory
-- Header files found
-- Looking for opencascade library files in: /usr/lib
-- Use OCC_LIBRARY_DIR to specify another directory
-- Library files found
-- No ICU include directory specified
-- No ICU library directory specified
-- ICU libraries found
-- Looking for C++ include limits
-- Looking for C++ include limits - found
-- Looking for C++ include climits
-- Looking for C++ include climits - found
-- Looking for C++ include limits.h
-- Looking for C++ include limits.h - found
-- Looking for C++ include fstream
-- Looking for C++ include fstream - found
-- Looking for C++ include fstream.h
-- Looking for C++ include fstream.h - not found
-- Looking for C++ include iomanip
-- Looking for C++ include iomanip - found
-- Looking for C++ include iomanip.h
-- Looking for C++ include iomanip.h - not found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Looking for C++ include iostream.h
-- Looking for C++ include iostream.h - not found
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.4") 
-- Found PythonLibs: /usr/lib/python2.7.so (found version "2.7.3") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jo/BEBois/Dev/Git/IfcOpenShell/build
The make return this :

Code: Select all

jo@jo-desktop:~/BEBois/Dev/Git/IfcOpenShell/build$ make -j4
Scanning dependencies of target IfcParse
[  5%] [ 15%] [ 15%] [ 20%] Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/Ifc2x3-rt.cpp.o
Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/Ifc2x3.cpp.o
Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcGuidHelper.cpp.o
Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcCharacterDecoder.cpp.o
[ 25%] Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcParse.cpp.o
[ 30%] Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcUntypedEntity.cpp.o
[ 35%] Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcUtil.cpp.o
[ 40%] Building CXX object CMakeFiles/IfcParse.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcparse/IfcWrite.cpp.o
Linking CXX static library libIfcParse.a
[ 40%] Built target IfcParse
Scanning dependencies of target IfcParseExamples
Scanning dependencies of target IfcGeom
[ 45%] Building CXX object examples/CMakeFiles/IfcParseExamples.dir/IfcParseExamples.cpp.o
[ 50%] [ 55%] [ 60%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomCurves.cpp.o
Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomFaces.cpp.o
Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomFunctions.cpp.o
/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/examples/IfcParseExamples.cpp: In function ‘int main(int, char**)’:
/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/examples/IfcParseExamples.cpp:35:20: erreur: aggregate ‘IfcParse::IfcFile file’ has incomplete type and cannot be defined
/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/examples/IfcParseExamples.cpp:57:76: erreur: expected primary-expression before ‘>’ token
/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/examples/IfcParseExamples.cpp:57:78: erreur: expected primary-expression before ‘)’ token
make[2]: *** [examples/CMakeFiles/IfcParseExamples.dir/IfcParseExamples.cpp.o] Erreur 1
make[1]: *** [examples/CMakeFiles/IfcParseExamples.dir/all] Erreur 2
make[1]: *** Attente des tâches non terminées....
[ 65%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomHelpers.cpp.o
[ 70%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomObjects.cpp.o
[ 75%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomShapes.cpp.o
[ 80%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcGeomWires.cpp.o
[ 85%] Building CXX object CMakeFiles/IfcGeom.dir/home/jo/BEBois/Dev/Git/IfcOpenShell/sources/src/ifcgeom/IfcRegister.cpp.o
Linking CXX static library libIfcGeom.a
[ 85%] Built target IfcGeom
make: *** [all] Erreur 2
Can you help me please ? :)
Formations - Assistance - Développement : https://freecad-france.com
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Compil IfcOpenShell

Post by bernd »

which version of ifcopenshell where you trying to compile?
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Compil IfcOpenShell

Post by rockn »

Hi Bernd,
I try the version 0.3.0 of ifcopenshell website (last link). And I try with the code of yorik Git. I get the same error on both.
Formations - Assistance - Développement : https://freecad-france.com
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Compil IfcOpenShell

Post by rockn »

Hey Bernd, I found your post on IfcOpenShell's forum about compilation on Debian. http://sourceforge.net/p/ifcopenshell/d ... be52/#fcfe
I have put comments inside the main loop of IfcParseExamples.cpp and I have adjust the path in -DPYTHON_LIBRARY = /usr/lib/python2.7/config/libpython2.7.so
And...it's done. :D Thank you !
Formations - Assistance - Développement : https://freecad-france.com
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Compil IfcOpenShell

Post by yorik »

I suggest you guys wait a bit with ifcopenshell, because its author, Thomas Krijnen, is in the process of migrating a lot of commits from the old version (0.3 and 0.4 from the svn branch) to the new git branch, so actually at the moment all versions are a bit unstable and don't work 100%...

The new "official" version, which I hope will solve all many (or all?) of our problems (Bernd, the Real vs Integer problem is already in a commit - https://sourceforge.net/p/ifcopenshell/svn/137/ and will be ported to git), will be the one from https://github.com/aothms/IfcOpenShell

I hope once this is done we'll have a really powerful IFC in/out interface...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Compil IfcOpenShell

Post by bernd »

yorik wrote:I suggest you guys wait a bit with ifcopenshell,...
Yorik I know ...
I'm feeling a bit like a child waiting for it's birthday but the day just does'nt want to come closer ... :)

I'm sure we'll definatelly will have a powerfull ifc-support in freecad, yeah, we will !!!

EDIT: Yorik, should the thread may be moved to Arch?!
User avatar
rockn
Veteran
Posts: 1791
Joined: Wed Sep 28, 2011 10:39 am
Location: Toulouse, France
Contact:

Re: Compil IfcOpenShell

Post by rockn »

I hesitated too, but this mainly concerns the compilation of IFcOpenShell.
As you want
Formations - Assistance - Développement : https://freecad-france.com
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Compil IfcOpenShell

Post by yorik »

Hmm maybe better indeed, since this is not exactly about freecad itself.
While Thomas works on sorting out his two branches, we might try to merge the commit linked above into my ifcopenshell branch... Only to test if it passes the tests... I'll do that when I have a minute (which could take a week or two :cry: )
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Compil IfcOpenShell

Post by yorik »

Finally I had a minute or two today :)
I merged the changes from that svn revision here: https://github.com/yorikvanhavre/IfcOpe ... fixed-real
But unfortunately it didn't work, it still exports floats as integers.
Anyway, that branch should compile without problems now...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Compil IfcOpenShell

Post by bernd »

yorik wrote:Finally I had a minute or two today :) ...
You are unbelivable.

I still get the compile error.

Code: Select all

...
[100%] Building CXX object examples/CMakeFiles/IfcParseExamples.dir/IfcParseExamples.cpp.o
/home/hugo/Documents/projekte--ifc/ifcopenshell/ifcopenshell-yorik/src/examples/IfcParseExamples.cpp: In function ‘int main(int, char**)’:
/home/hugo/Documents/projekte--ifc/ifcopenshell/ifcopenshell-yorik/src/examples/IfcParseExamples.cpp:35:20: error: aggregate ‘IfcParse::IfcFile file’ has incomplete type and cannot be defined
/home/hugo/Documents/projekte--ifc/ifcopenshell/ifcopenshell-yorik/src/examples/IfcParseExamples.cpp:57:76: error: expected primary-expression before ‘>’ token
/home/hugo/Documents/projekte--ifc/ifcopenshell/ifcopenshell-yorik/src/examples/IfcParseExamples.cpp:57:78: error: expected primary-expression before ‘)’ token
make[2]: *** [examples/CMakeFiles/IfcParseExamples.dir/IfcParseExamples.cpp.o] Fehler 1
make[1]: *** [examples/CMakeFiles/IfcParseExamples.dir/all] Fehler 2
make: *** [all] Fehler 2
Since the file IfcParseExamples.cpp is not needed by FreeCAD I used a smoother way to get rid of the error. Just make a comment in CMakeLists.txt

Code: Select all

#ADD_SUBDIRECTORY(../src/examples examples)
I may have time to have a deeper look but my C++ is rare.

I've been testing our testhouse.ifc in lots of viewers but to be honest I never tried the export myself. It's just great :)
screen.jpg
screen.jpg (69.61 KiB) Viewed 3020 times
Post Reply