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?
>
> Denis
>

Thanks for sharing the CMake patches. I will create a branch tp/cmake-fixes
and push commits to this branch. It's been a while I didn't look at this
cmake file. I just remember it was sooo long to build. I also remember
having problems with finding the python site-packages folder with CMake in
order to install pytohnocc package.

Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to