
Wed, 12/10/2014 - 03:17
Forums:
I'm attempting to build OCCT from source on CentOS 6.6 using Cmake. The installation instructions say the VTK is not a mandatory package, but after running Cmake, make halts and says it can't find vtkType.h and other VTK header files. Any idea why it is looking for them in the first place?
So I installed and built VTK. I tried setting USE_VTK on and off and defined 3RDPARTY_VTK_INCLUDE_DIR in the Cmake output file CMakeCache.txt, and even tried moving the VTK header files into the OCCT tree in a place where I thought the build system would find them. The same error described above always occurred. Has anyone seen this before?
Thanks,
Kurt
Wed, 12/10/2014 - 09:12
Hello,Kurt:
I tried to solve this problem by the following way:
First, I tried to make install the VTK to the INSTALL file, and then set the vtkdir to the installed path.
For example,3RDPARTY_VTK_DIR=/home/chen/VTK6_1_0/Install;3RDPARTY_VTK_INCLUDE_DIR=/home/chen/VTK6_1_0/Install/include/vtk-6.1;3RDPART_VTK_LIBRARY_DIR=/home/chen/VTK6_1_0/Install/lib.
chen
Wed, 12/10/2014 - 17:43
Dear Kurt,
We confirm the specified problem and would like to inform you that the next new issue has been registered for WOK :
0025585: Procedure of CMakeLists generation must be improved to make VTK product fully optional.
Best regards
FSR
Fri, 12/12/2014 - 03:58
As Chen suggested, I put four other arguments on the cmake command line:
-D3RDPARTY_VTK_DIR=
-D3RDPARTY_VTK_INCLUDE_DIR=
-D3RDPARTH_VTK_LIBRARY_DIR=
-DUSE_VTK=ON
In CMakeCache.txt, it says these variables are UNINITIALIZED, if that makes any difference:
//No help, variable specified on the command line.
3RDPARTY_VTK_DIR:UNINITIALIZED=/usr/local/vtk-6.1.0
//No help, variable specified on the command line.
3RDPARTY_VTK_INCLUDE_DIR:UNINITIALIZED=/usr/local/vtk-6.1.0/include
//No help, variable specified on the command line.
3RDPARTY_VTK_LIBRARY_DIR:UNINITIALIZED=/usr/local/vtk-6.1.0/lib
We tried -DUSE_VTK=OFF, too. It still can't find the VTK headers. Any ideas for what I could do next? Maybe step back to an older version of OCCT?
Fri, 12/12/2014 - 05:17
My mistake -- the installation worked this time, using Chen's method. Just had to get the 3RDPARTY_VTK_INCLUDE_DIR right.
Fri, 12/12/2014 - 13:30
Dear Kurt,
The issue (25585) is fixed and the source package of the latest OCCT version (6.8.0) have been updated. Now you can use it - http://www.opencascade.org/ex/stats/cnt2.php?code=Occsrc680&usr=&chw=RJY....
Best regards
FSR
Fri, 12/12/2014 - 18:46
I have to say that you guys are fast! :-)
Tue, 12/16/2014 - 17:53
For compatibility with another package, I had to step back to OCCT 6.7.1. The build process was 97% complete, then it stopped with this link error:
Linking CXX shared library ../out/lib/libTKDraw.so
/usr/bin/ld: cannot find -ltcl8.6
collect2: ld returned 1 exit status
My question is, why does it require libtcl8.6? OCCT 6.8.0 compiled completely with the TCL 8.5 that is installed on my system. It seems odd that the older version of OCCT would need the newer TCL, while the newer OCCT uses the older TCL.
Thanks
Kurt
Tue, 12/16/2014 - 19:12
Dear Kurt,
It seems you have not native tcltk 8.6 installed.
We suggest you to use information from URL
http://dev.opencascade.org/doc/overview/html/occt_dev_guides__building_a...
in order to define path to tcltk-8.6.
Best regards
FSR
Tue, 01/13/2015 - 04:03
I installed Tcl/Tk 8.6.3, and now the build fails with this error. Do I need to install Tcl/Tk 8.5 instead of 8.6?
[ 97%] Building CXX object TKDraw/CMakeFiles/TKDraw.dir/__/src/Draw/Draw_Window.cxx.o
In file included from /home/kmccall/occt/src/Draw/Draw_Window.cxx:151:
/usr/include/tk.h:23:3: error: #error Tk 8.5 must be compiled with tcl.h from Tcl 8.5
make[2]: *** [TKDraw/CMakeFiles/TKDraw.dir/__/src/Draw/Draw_Window.cxx.o] Error 1
make[1]: *** [TKDraw/CMakeFiles/TKDraw.dir/all] Error 2
make: *** [all] Error 2
Tue, 01/13/2015 - 22:24
From the above error message, it is looking for the TK header in /usr/include, which is not where I installed TK 8.6.3. I tried to tell cmake where to find TK with this command
cmake -D3RDPARTY_TK_INCLUDE_DIR=/usr/local/tk/include -D3RDPARTY_TK_LIBRARY=/usr/local/tk/lib/libtk8.6.so ~/occt
but it doesn't seem to recognize the newly defined 3RDPARTY variables. Any ideas?
Wed, 01/14/2015 - 00:48
Remove any old TK/Tcl headers and library's from system path. Then manually add new TK/Tcl paths to system path environment and see what happens.
Wed, 01/14/2015 - 02:29
That worked, thank you! Compilation and installation finished successfully.