Compilation fail near end: add_subdirectory given source pcm which is not an existing

On trying to compile KiCad 8.06 I seem near the end, when I get:

[100%] Building CXX object CMakeFiles/vtkInteractionWidgetsPython.dir/CMakeFiles/vtkInteractionWidgetsPythonPython/vtkInteractionWidgetsPythonInitImpl.cxx.o
[100%] Linking CXX shared module lib64/python3.9/site-packages/vtkmodules/vtkInteractionWidgets.cpython-39-x86_64-linux-gnu.so
[100%] Built target vtkInteractionWidgetsPython
make: *** [Makefile:136: all] Error 2```

The Makefile contains:
```all: cmake_check_build_system
        $(CMAKE_COMMAND) -E cmake_progress_start /tmp/SBo/VTK-9.4.0/build/CMakeFiles /tmp/SBo/VTK-9.4.0/build//CMakeFiles/progress.m
        $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all     <----
        $(CMAKE_COMMAND) -E cmake_progress_start /tmp/SBo/VTK-9.4.0/build/CMakeFiles 0

around line 136 (marked with <----).

In CMakeError.log I found:

/tmp/SBo/VTK-9.4.0/build/CMakeFiles/CMakeScratch/TryCompile-ek7ak9/src.c:5:9: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use
    5 |   (void)PTHREAD_MUTEX_RECURSIVE;
      |         ^~~~~~~~~~~~~~~~~~~~~~~
      |         PTHREAD_MUTEX_RECURSIVE_NP
/tmp/SBo/VTK-9.4.0/build/CMakeFiles/CMakeScratch/TryCompile-ek7ak9/src.c:5:9: note: each undeclared identifier is reported only once
gmake[1]: *** [CMakeFiles/cmTC_c0dc6.dir/build.make:78: CMakeFiles/cmTC_c0dc6.dir/src.c.o] Error 1
gmake[1]: Leaving directory '/usr/local/SBo/VTK-9.4.0/build/CMakeFiles/CMakeScratch/TryCompile-ek7ak9'
gmake: *** [Makefile:127: cmTC_c0dc6/fast] Error 2

There was no error in CMakeOutput.log AFACS…

I’m trying to compile KiCad 8.06, and solved a couple of other issues (simpler?), but I’m at a loss how to proceed.

Following some reports, I tried to compile with a single CPU - no luck
I also found an older version of VTK and eliminated that one…

Can anyone give a hint?

John

OS is Slackware 15.0 (slightly opdated), gcc is 12.2.

Yea you got some weird distro and build setup.

KiCad does not depend or use VTK.

Hi Marekr… According to the KiCad package, KiCad depends on OpenCASCADE, and OpenCASCADE tells me it needs VTK. Do I misunderstand this?

It’s possible that OpenCASCADE depends on VTK only conditionally. In Open CASCADE Technology: Build OCCT I see BUILD_MODULE_Visualization. If that’s VTK, it’s a compile time option for OC. KiCad doesn’t need it.

Slackware is a difficult distro, not for beginners – or even more advanced Linux users! – and if you have to ask that question here, I wonder if you should try to compile KiCad on that distro at all. You have to know what you are doing when using Slackware – there are easier distros for doing something productive. I don’t know if there are any users in this forum who use Slackware, I haven’t seen any.