Cmake Error: could not find VTK configuration file.

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Cmake Error: could not find VTK configuration file.

Post by davecoventry »

Hi,

I've tried to pull the latest git code, but compiling fails:

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake:29 (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.
Call Stack (most recent call first):
  CMakeLists.txt:58 (SetupSalomeSMESH)
The code has previously compiled without error.

Are there new dependencies?

Thanks.
~ Dave
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: Cmake Error: could not find VTK configuration file.

Post by doia »

wild guess: it's a path issue. What's your dev setup/system? Linux/Mac/Win?
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Cmake Error: could not find VTK configuration file.

Post by davecoventry »

Sorry, Linux.

I don't have vtk installed on my system, but I have compiled FreeCAD successfully previously from git without needing it.

Is this a new dependency?

I can probably install it, if it's needed, but I'm loath to further clog my system with superfluous clutter.
~ Dave
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Cmake Error: could not find VTK configuration file.

Post by davecoventry »

Still having this problem.

I see there is a very old thread on this topic.

https://forum.freecadweb.org/viewtopic. ... dce81c64bb

However, the remedies suggested there don't work for me.

I have installed VTK7, but there don't appear to be any files called VTKConfig.cmake or vtk-config.cmake on my system.

OS: Ubuntu 20.10 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.25176 (Git)
Build type: Unknown
Branch: master
Hash: 909dfa7036f9fd36bbd3acee2a5dee161d2819fb
Python version: 3.8.10
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/South Africa (en_ZA)
~ Dave
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Cmake Error: could not find VTK configuration file.

Post by Kunda1 »

JFYI, there is a pending PR related to VTK https://github.com/FreeCAD/FreeCAD/pull/4916

Also is there a downstream ubuntu packaging subforum that you can also post to?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Cmake Error: could not find VTK configuration file.

Post by davecoventry »

This is still an issue for me.

I deleted my installation directory and started a fresh git clone, but I am still having this issue.

Surely I can't be the only one this is happening to?

OS: Ubuntu 20.10 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.25176 (Git)
Build type: Unknown
Branch: master
Hash: 909dfa7036f9fd36bbd3acee2a5dee161d2819fb
Python version: 3.8.10
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/South Africa (en_ZA)
~ Dave
user1234
Veteran
Posts: 3506
Joined: Mon Jul 11, 2016 5:08 pm

Re: Cmake Error: could not find VTK configuration file.

Post by user1234 »

Hello!

- install vtk-dev

or

- switch FEM in cmake off with -DBUILD_FEM=OFF

Greetings
user1234

edit: added missing word
User avatar
chennes
Veteran
Posts: 3910
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Cmake Error: could not find VTK configuration file.

Post by chennes »

Just to confirm, this is a recent pull with the git commit 509af5e7c included in it?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
davecoventry
Posts: 286
Joined: Mon Dec 09, 2013 8:11 pm
Location: Johannesburg
Contact:

Re: Cmake Error: could not find VTK configuration file.

Post by davecoventry »

Yes.

Pulled it yesterday.

I don't see any reference to 509af5e7c, though.
remote: Enumerating objects: 546, done.
remote: Counting objects: 100% (525/525), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 546 (delta 438), reused 519 (delta 435), pack-reused 21
Receiving objects: 100% (546/546), 306.86 KiB | 2.54 MiB/s, done.
Resolving deltas: 100% (438/438), completed with 206 local objects.
From https://github.com/FreeCAD/FreeCAD
0afe01dc5e..822bc86894 master -> origin/master
7b5e18a075..1eb65aa002 releases/FreeCAD-0-19 -> origin/releases/FreeCAD-0-19
Updating 0afe01dc5e..822bc86894
user1234 wrote: Wed Sep 29, 2021 7:43 pm - install vtk-dev
Okay.

I thought I had vtk installed, but vtk7-dev failed to install.

Code: Select all

The following packages have unmet dependencies:
 libmariadb-dev : Conflicts: libmysqlclient-dev but 8.0.25-0ubuntu0.20.10.1 is to be installed
                  Breaks: libmysqlclient-dev but 8.0.25-0ubuntu0.20.10.1 is to be installed
 libmariadb-dev-compat : Conflicts: libmysqlclient-dev but 8.0.25-0ubuntu0.20.10.1 is to be installed
                         Breaks: libmysqlclient-dev but 8.0.25-0ubuntu0.20.10.1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
~ Dave
user1234
Veteran
Posts: 3506
Joined: Mon Jul 11, 2016 5:08 pm

Re: Cmake Error: could not find VTK configuration file.

Post by user1234 »

Hello!

Do you need FEM? If not deactivate it.When you had compiled FreeCAD before without vtk, then you had deactivated that.
davecoventry wrote: Thu Sep 30, 2021 9:18 am I thought I had vtk installed, but vtk7-dev failed to install.
And vtk9-dev or libvtk9-dev or similar. Just said, i am have no Ubuntu, but Debian and the same should be indent (or at least similar). If you have vtk7 installed, then you must replace that with vtk9. You may also need maybe python3-vtk9, but for that i am not sure.

Greetings
user1234
Post Reply