IFC installation

This forum section is only for IFC-related issues
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC installation

Post by bernd »

sgrogan wrote:@bernd ... If you have time to test a linux build I'd be interested.
sure. works for me like a charm on debian jessie. Here is what I did. Commit 486. https://github.com/IfcOpenShell/IfcOpen ... it/28560d1

my inputs:

Code: Select all

cd ~/Documents/dev/ifcopenshell
git clone https://github.com/IfcOpenShell/IfcOpenShell  ifcopenshell-dev
cd ifcopenshell-dev
cd cmake && mkdir build && cd build

# do not write comments behind the backslash --> cmake will refuse to work properly
cmake   \
-DOCC_INCLUDE_DIR=/usr/include/oce  \
-DPYTHON_INCLUDE_DIR=/usr/include/python2.7  \
-DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so  \
-DUNICODE_SUPPORT=True  \
-DCOLLADA_SUPPORT=False \
-DUSE_IFC4=False  \
-DBUILD_IFCPYTHON=True  \
-DBUILD_EXAMPLES=False  \
../

make

su
make install
--> Do not forget to exit the superuser !

# stay in build directory and start python
python

import ifcopenshell
f = ifcopenshell.open('../../test/input/acad2010_objects.ifc')
f.by_type('IfcPerson')
f.by_type('IfcWall')
and what my machine gave back to me:

Code: Select all

hugo@weide:~$ 
hugo@weide:~$ cd ~/Documents/dev/ifcopenshell
hugo@weide:~/Documents/dev/ifcopenshell$ git clone https://github.com/IfcOpenShell/IfcOpenShell  ifcopenshell-dev
Klone nach 'ifcopenshell-dev'...
remote: Counting objects: 4822, done.
remote: Total 4822 (delta 0), reused 0 (delta 0), pack-reused 4822
Empfange Objekte: 100% (4822/4822), 11.90 MiB | 586.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (3556/3556), Fertig.
Prüfe Konnektivität... Fertig.
hugo@weide:~/Documents/dev/ifcopenshell$ cd ifcopenshell-dev
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev$ cd cmake && mkdir build && cd build
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ cmake   \
> -DOCC_INCLUDE_DIR=/usr/include/oce  \
> -DPYTHON_INCLUDE_DIR=/usr/include/python2.7  \
> -DPYTHON_LIBRARY=/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so  \
> -DUNICODE_SUPPORT=True  \
> -DCOLLADA_SUPPORT=False \
> -DUSE_IFC4=False  \
> -DBUILD_IFCPYTHON=True  \
> -DBUILD_EXAMPLES=False  \
> ../
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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.55.0
-- Found the following Boost libraries:
--   program_options
-- Boost include files found in /usr/include
-- Boost libraries found in /usr/lib/x86_64-linux-gnu
-- Looking for opencascade include files in: /usr/include/oce
-- 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.12") 
-- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so (found version "2.7.9") 
-- Found PythonInterp: /usr/bin/python (found version "2.7.9") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ make
Scanning dependencies of target IfcParse
[  3%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcUtil.cpp.o
[  6%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcHierarchyHelper.cpp.o
[  9%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcSpfHeader.cpp.o
[ 12%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcWrite.cpp.o
[ 16%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/Ifc2x3-latebound.cpp.o
[ 19%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcSIPrefix.cpp.o
[ 22%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcCharacterDecoder.cpp.o
[ 25%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/Ifc2x3.cpp.o
[ 29%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcLateBoundEntity.cpp.o
[ 32%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcGlobalId.cpp.o
[ 35%] Building CXX object CMakeFiles/IfcParse.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcparse/IfcParse.cpp.o
Linking CXX static library libIfcParse.a
[ 35%] Built target IfcParse
Scanning dependencies of target IfcGeom
[ 38%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomCurves.cpp.o
[ 41%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomShapes.cpp.o
[ 45%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomHelpers.cpp.o
[ 48%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomRenderStyles.cpp.o
[ 51%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomWires.cpp.o
[ 54%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomFunctions.cpp.o
/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomFunctions.cpp:114:2: warning: #warning "You are linking against linking against an older version of Open CASCADE. Version 6.9.0 introduces various improvements with relation to boolean operations. You are advised to upgrade." [-Wcpp]
 #warning "You are linking against linking against an older version of Open CASCADE. Version 6.9.0 introduces various improvements with relation to boolean operations. You are advised to upgrade."
  ^
[ 58%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomRepresentation.cpp.o
[ 61%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomFaces.cpp.o
[ 64%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcRegister.cpp.o
[ 67%] Building CXX object CMakeFiles/IfcGeom.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeom/IfcGeomMaterial.cpp.o
Linking CXX static library libIfcGeom.a
[ 67%] Built target IfcGeom
Scanning dependencies of target IfcConvert
[ 70%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/ColladaSerializer.cpp.o
[ 74%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/XmlSerializer.cpp.o
[ 77%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/util.cpp.o
[ 80%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/SvgSerializer.cpp.o
[ 83%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/IfcConvert.cpp.o
[ 87%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/OpenCascadeBasedSerializer.cpp.o
[ 90%] Building CXX object CMakeFiles/IfcConvert.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcconvert/WavefrontObjSerializer.cpp.o
Linking CXX executable IfcConvert
[ 90%] Built target IfcConvert
Scanning dependencies of target IfcGeomServer
[ 93%] Building CXX object CMakeFiles/IfcGeomServer.dir/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/src/ifcgeomserver/IfcGeomServer.cpp.o
Linking CXX executable IfcGeomServer
[ 93%] Built target IfcGeomServer
[ 96%] Swig source
Scanning dependencies of target _ifcopenshell_wrapper
[ 96%] Swig source
[100%] Building CXX object ifcwrap/CMakeFiles/_ifcopenshell_wrapper.dir/IfcPythonPYTHON_wrap.cxx.o
Linking CXX shared module _ifcopenshell_wrapper.so
[100%] Built target _ifcopenshell_wrapper
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ su
Passwort: 
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# 
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# 
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# make install
[ 35%] Built target IfcParse
[ 67%] Built target IfcGeom
[ 90%] Built target IfcConvert
[ 93%] Built target IfcGeomServer
[ 96%] Swig source
[100%] Building CXX object ifcwrap/CMakeFiles/_ifcopenshell_wrapper.dir/IfcPythonPYTHON_wrap.cxx.o
Linking CXX shared module _ifcopenshell_wrapper.so
[100%] Built target _ifcopenshell_wrapper
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/include/ifcparse/IfcFile.h
-- Installing: /usr/local/include/ifcparse/IfcWritableEntity.h
-- Installing: /usr/local/include/ifcparse/IfcSpfStream.h
-- Installing: /usr/local/include/ifcparse/IfcSpfHeader.h
-- Installing: /usr/local/include/ifcparse/IfcEntityDescriptor.h
-- Installing: /usr/local/include/ifcparse/Ifc2x3-latebound.h
-- Installing: /usr/local/include/ifcparse/IfcParse.h
-- Installing: /usr/local/include/ifcparse/IfcSIPrefix.h
-- Installing: /usr/local/include/ifcparse/IfcHierarchyHelper.h
-- Installing: /usr/local/include/ifcparse/Ifc2x3enum.h
-- Installing: /usr/local/include/ifcparse/IfcException.h
-- Installing: /usr/local/include/ifcparse/IfcCharacterDecoder.h
-- Installing: /usr/local/include/ifcparse/IfcWrite.h
-- Installing: /usr/local/include/ifcparse/IfcUtil.h
-- Installing: /usr/local/include/ifcparse/Ifc2x3.h
-- Installing: /usr/local/include/ifcparse/IfcLateBoundEntity.h
-- Installing: /usr/local/include/ifcparse/IfcGlobalId.h
-- Installing: /usr/local/include/ifcgeom/IfcGeom.h
-- Installing: /usr/local/include/ifcgeom/IfcRepresentationShapeItem.h
-- Installing: /usr/local/include/ifcgeom/IfcRegister.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomElement.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterConvertWire.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomIterator.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterUndef.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterConvertFace.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomShapeType.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterConvertShapes.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterConvertCurve.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomIteratorSettings.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterPurgeCache.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomRenderStyles.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterConvertShape.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterShapeType.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterCreateCache.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomMaterial.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterDef.h
-- Installing: /usr/local/include/ifcgeom/IfcRegisterGeomHeader.h
-- Installing: /usr/local/include/ifcgeom/IfcGeomRepresentation.h
-- Installing: /usr/local/bin/IfcConvert
-- Removed runtime path from "/usr/local/bin/IfcConvert"
-- Installing: /usr/local/bin/IfcGeomServer
-- Removed runtime path from "/usr/local/bin/IfcGeomServer"
-- Installing: /usr/local/lib/libIfcParse.a
-- Installing: /usr/local/lib/libIfcGeom.a
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/ifcopenshell_wrapper.py
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/__init__.py
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/guid.py
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/geom/__init__.py
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/geom/occ_utils.py
-- Installing: /usr/lib/python2.7/dist-packages/ifcopenshell/_ifcopenshell_wrapper.so
-- Removed runtime path from "/usr/lib/python2.7/dist-packages/ifcopenshell/_ifcopenshell_wrapper.so"
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# 
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# 
root@weide:/home/hugo/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build# exit
exit
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import ifcopenshell
>>> f = ifcopenshell.open('../../test/input/acad2010_objects.ifc')
>>> f.by_type('IfcPerson')
[#22=IfcPerson('','','',$,$,$,$,$)]
>>> f.by_type('IfcWall')
[#48=IfcWallStandardCase('2Kkkz43YFqUW00000007xe',#24,'WALL | Standard(1)','','',#54,#92,$), #442=IfcWallStandardCase('2Kkkz43YFqUW00000007xg',#24,'WALL | Standard(2)','','',#447,#479,$), #486=IfcWallStandardCase('2Kkkz43YFqUW00000007xh',#24,'WALL | Standard(3)','','',#491,#523,$), #530=IfcWallStandardCase('2Kkkz43YFqUW00000007xi',#24,'WALL | Standard(4)','','',#535,#567,$), #621=IfcWallStandardCase('2Kkkz43YFqUW00000007xj',#24,'WALL | Standard(5)','','',#626,#658,$), #665=IfcWallStandardCase('2Kkkz43YFqUW00000007xk',#24,'WALL | Standard(6)','','',#670,#718,$), #725=IfcWallStandardCase('2Kkkz43YFqUW00000007xl',#24,'WALL | Standard(7)','','',#730,#766,$), #773=IfcWallStandardCase('2Kkkz43YFqUW00000007xm',#24,'WALL | Standard(8)','','',#778,#810,$), #1291=IfcWallStandardCase('2Kkkz43YFqUW00000007xn',#24,'WALL | Standard(9)','','',#1296,#1328,$), #1566=IfcWallStandardCase('2Kkkz43YFqUW00000007xo',#24,'WALL | Standard(10)','','',#1571,#1603,$), #1726=IfcWallStandardCase('2Kkkz43YFqUW00000007xp',#24,'WALL | Standard(11)','','',#1731,#1763,$)]
>>> 
>>> 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
hugo@weide:~/Documents/dev/ifcopenshell/ifcopenshell-dev/cmake/build$ 
sgrogan wrote:@bernd ... I won't post on the ifc site until I know what I'm talking about...
That's true!!! But look at this guy trying to build on windows. https://github.com/IfcOpenShell/IfcOpenShell/issues/27 He surely did not know what he was talking about. Damn, that was me :o :shock: :? :lol:
damian wrote:The True Problem is that every time I need to compile, I'm feel like a donkey in a garaje.
You are not allone :mrgreen: !!! Most off the time I start to compile a binary of a program I have never compiled before I feel like this.
damian
Posts: 583
Joined: Sun May 31, 2015 6:16 pm

Re: IFC installation

Post by damian »

It's working!!!

thank you
Post Reply