VTK Error

Having trouble installing or compiling FreeCAD? Get help here.
Zig_mint
Posts: 12
Joined: Thu Jan 10, 2019 5:48 pm

VTK Error

Postby Zig_mint » Mon Jan 28, 2019 2:20 pm

Hi,
I am trying to compile from the source code of freecad on ubuntu 16.04. there seems to be some problem with the cmake or VTK.........i am new to this and so have no clue what to do. I am trying to build out of source. here is the attached error and CMakeoutput.log and CMakeerror.log
the terminal output on running cmake <source-code> is

-- Compiler: GNU, version: 5.4.0
-- prefix: /usr/local
-- datadir: data
-- docdir: doc
-- includedir: include
-- libdir: /usr/local/lib
-- cmake: 3.5.1
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- regex
-- system
-- thread
-- chrono
-- date_time
-- atomic
-- Found Xerces-C: /usr/lib/x86_64-linux-gnu/libxerces-c.so
-- PyCXX found:
-- Headers: /home/zigmint/freecad-code/src
-- Sources: /home/zigmint/freecad-code/src/CXX
-- Version: 6.2.8
-- -- OpenCASCADE Community Edition has been found.
-- -- Found OCE/OpenCASCADE version: 6.8.0
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.17/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory:
CMake Error at CMakeLists.txt:670 (find_package):
Could not find a package configuration file provided by "VTK" with any of
the following names:

VTKConfig.cmake
vtk-config.cmake

Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
to a directory containing one of the above files. If "VTK" provides a
separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/zigmint/freecad-build/CMakeFiles/CMakeOutput.log".
See also "/home/zigmint/freecad-build/CMakeFiles/CMakeError.log".
Attachments
CMakeOutput.log
(49.92 KiB) Downloaded 70 times
CMakeError.log
(2.66 KiB) Downloaded 73 times
User avatar
sgrogan
Posts: 5585
Joined: Wed Oct 22, 2014 5:02 pm

Re: VTK Error

Postby sgrogan » Mon Jan 28, 2019 11:31 pm

Zig_mint wrote:
Mon Jan 28, 2019 2:20 pm
I am trying to compile from the source code of freecad on ubuntu 16.04. there seems to be some problem with the cmake or VTK
Do you have libvtk6-dev installed?
FreeCAD's CMake is looking for the file: /usr/lib/cmake/vtk-6.2/VTKConfig.cmake
Zig_mint
Posts: 12
Joined: Thu Jan 10, 2019 5:48 pm

Re: VTK Error

Postby Zig_mint » Tue Jan 29, 2019 5:22 am

Thank you, for helping out.
I realized libvtk6-dev was not installed...........I installed this package but now when I run the command cmake on the source code I get the following error. I also wanted to know how did you figure this out if possible!!!!!!

-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
"/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkIOMPIParallel;vtkParallelMPI;vtkhdf5;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType
-- Check for medfile (libmed and libmedc) ...
CMake Error at cMake/FindMEDFile.cmake:46 (MESSAGE):
med.h not found, please install development header-files for libmedc
Call Stack (most recent call first):
CMakeLists.txt:706 (find_package)


-- Configuring incomplete, errors occurred!
Attachments
CMakeOutput.log
(49.92 KiB) Downloaded 72 times
CMakeError.log
(2.66 KiB) Downloaded 73 times
User avatar
kkremitzki
Posts: 1873
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: VTK Error

Postby kkremitzki » Tue Jan 29, 2019 5:36 am

Now you need libmedc-dev. You should try running the command sudo apt build-dep freecad. If that doesn't work you may need to edit your /etc/apt/sources.list file and uncomment the appropriate deb-src line.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.