2011/8/31 D. Barbier <bou...@gmail.com> > Hello, > > I am very interested by pythonocc; I try to build it from time to > time, but it always takes me a long time to figure out how to do it > (and why it fails on my system), and I give up for a few months until > the next try. This time, I would like to fix the build system to save > time ;-) > > Here is my last try, with commit 191a184 on Linux; there is a toplevel > CMakeLists.txt, so I guess that I can use CMake, great! I always > build in a subdirectory: > $ mkdir build > $ cd build > $ ccmake .. > > Building pythonOCC 0.5 > Check whether the system is 32 or 64 bit. > -- 64bit system detected > > /usr/lib/libTKernel.so > -- OpenCASCADE include directory: /Library/OpenCASCADE/6.3.0/inc > -- OpenCASCADE shared libraries directory: /Library/OpenCASCADE/6.3.0/lib > -- Unix/Linux system detected > > Err, why that? It seems to find /usr/lib/libTKernel.so, but decides > that it will need files under MacOSX location, bad idea. Patch 01 > fixes MESSAGE commands to not mess up ccmake, and patch 02 detects OCE > first (of course I am biased, but it is obviously a better idea when > building with CMake) > > I set CMAKE_BUILD_TYPE to Release, and change CMAKE_INSTALL_PREFIX to > install pythonocc in my home directory. > > $ make > [ 25%] Swig source > Unable to open file > > /home/barbier/Projects/pythonocc/build/./src/wrapper/SWIG/linux_darwin/MMgtPYTHON_wrap.cxx: > No such file or directory > make[2]: *** [src/wrapper/SWIG/linux_darwin/MMgtPYTHON_wrap.cxx] Erreur 1 > make[1]: *** [CMakeFiles/_MMgt.dir/all] Erreur 2 > make: *** [all] Erreur 2 > > Okay, build/./src/wrapper/SWIG/linux_darwin does not exist, let us > create it (patch 03). > > $ make > [...] > Linking CXX shared module _MMgt.so > /usr/bin/ld: cannot find -lBinLPlugin > /usr/bin/ld: cannot find -lBinPlugin > /usr/bin/ld: cannot find -lBinXCAFPlugin > /usr/bin/ld: cannot find -lStdLPlugin > /usr/bin/ld: cannot find -lStdPlugin > /usr/bin/ld: cannot find -lTKCDLFront > /usr/bin/ld: cannot find -lTKCPPClient > /usr/bin/ld: cannot find -lTKCPPExt > /usr/bin/ld: cannot find -lTKCPPIntExt > /usr/bin/ld: cannot find -lTKCPPJini > /usr/bin/ld: cannot find -lTKCSFDBSchema > /usr/bin/ld: cannot find -lTKIDLFront > /usr/bin/ld: cannot find -lTKTCPPExt > /usr/bin/ld: cannot find -lTKWOK > /usr/bin/ld: cannot find -lTKWOKTcl > /usr/bin/ld: cannot find -lXCAFPlugin > /usr/bin/ld: cannot find -lXmlLPlugin > /usr/bin/ld: cannot find -lXmlPlugin > /usr/bin/ld: cannot find -lXmlXCAFPlugin > collect2: ld returned 1 exit status > make[2]: *** [_MMgt.so] Erreur 1 > make[1]: *** [CMakeFiles/_MMgt.dir/all] Erreur 2 > make: *** [all] Erreur 2 > > Indeed, those libraries are needed by WOK and DRAWEXE plugins, they > are surely not useful for ppythonocc, let us remove them (patch 04). > > $ make > Linking CXX shared module _MMgt.so > [ 50%] Built target _MMgt > [ 75%] Swig source > Scanning dependencies of target _Standard > [100%] Building CXX object > > CMakeFiles/_Standard.dir/build/./src/wrapper/SWIG/linux_darwin/StandardPYTHON_wrap.cxx.o > Linking CXX shared module _Standard.so > [100%] Built target _Standard > > Okay, it seems to work, but it builds only a very small subset. How > to build everything? >
Hi Denis, Commit 191a184 is sync with OCE-0.6.0dev (in the OCE project, Issue #89 was related to a problem with building pythonocc). There is actually a CMakeLists.txt file, but it is quite old and I usually don't include it in the release package. It was a first attempt to make pythonocc use CMake but I didn't work onthis file for a while. Consider it as outdated. Rather use the python distutils module: $ cd src $ python setup.py build $ python setup.py install And everything should compile properly. Note that you have to download/compile the latest svn rev of salomegeometry (which is also available in the pythonocc /src/contrib/geom-5.1.5.9 folder). If you don't want to use the geom wrapper, use: $ python setup.py build --disable-GEOM install When it's done, you can check that everything work by running the test_suite: $ cd src/unittest $ python test_all.py > Denis > Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users