For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Installing on CentOS 6.6 -- can't find VTK header files

Kurt McCall's picture

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

chen's picture

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

Forum supervisor's picture

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

Kurt McCall's picture

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?

Kurt McCall's picture

My mistake -- the installation worked this time, using Chen's method. Just had to get the 3RDPARTY_VTK_INCLUDE_DIR right.

Forum supervisor's picture

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=RJYPF1370341674.

Best regards
FSR

Kurt McCall's picture

I have to say that you guys are fast! :-)

Kurt McCall's picture

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

Forum supervisor's picture

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_automake.html
in order to define path to tcltk-8.6.
Best regards
FSR

Kurt McCall's picture

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

Kurt McCall's picture

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?

Daniel Neander's picture

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.

Kurt McCall's picture

That worked, thank you! Compilation and installation finished successfully.