CMake Error at /usr/lib64/cmake/vtk-9.4/FindPEGTL.cmake:27 (set_target_properties)

Open
#181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cmake, cpp, python
Domain
build-system

Research direction

Start with OCP/CMakeLists.txt at the find_package call, then inspect VTK 9.4's FindPEGTL.cmake and the dump_symbols.py traceback for the missing logzero module. Re-run the Gentoo CMake configuration to isolate both failures; done means OCP configures successfully with Python 3.13, VTK 9.4.2, and PEGTL.

Written by the indexing model from the issue text.

Description

Trying to build OCP 7.8.1.2 on a modern Gentoo.

cmake -C /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -B /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2/OCP.build -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -Wno-dev -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2/gentoo_toolchain.cmake /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2
loading initial cache file /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2/gentoo_common_config.cmake
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib64/libffi.so
-- Found ZLIB: /usr/lib64/libz.so (found version "1.3.1")
-- Found zstd: /usr/lib64/libzstd.so
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.13.8")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found Python3: /usr/bin/python3 (found suitable version "3.13.7", minimum required is "3.13") found components: Interpreter Development.Module Development.Embed
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.7.0")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.50")
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Could NOT find freetype (missing: freetype_DIR)
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.13.3")
-- Searching for PEGTL
-- Searching for PEGTL - found target taocpp::pegtl
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found double-conversion: /usr/lib64/libdouble-conversion.so
-- Found nlohmann_json: /usr/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.12.0")
-- VTK 9.4.2 found
-- RapidJSON found. Headers: /usr/include
-- Found Python: /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/temp/python3.13/bin/python3 (found suitable version "3.13.7", minimum required is "3.9") found components: Interpreter Development Development.Module Development.Embed
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/work/OCP-7.8.1.2/dump_symbols.py", line 4, in <module>
    from logzero import logger
ModuleNotFoundError: No module named 'logzero'
-- Include dirs: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14;/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/x86_64-pc-linux-gnu;/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/backward;/usr/lib/gcc/x86_64-pc-linux-gnu/14/include;/usr/x86_64-pc-linux-gnu/include;/usr/include
-- Found Python: /var/tmp/portage/dev-python/cadquery-ocp-7.8.1.2/temp/python3.13/bin/python3 (found version "3.13.7") found components: Interpreter Development Development.Module Development.Embed
-- Python lib: /usr/lib64/libpython3.13.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/include (found version "2.13.6")
-- Could NOT find freetype (missing: freetype_DIR)
-- Searching for PEGTL
-- Searching for PEGTL - found target taocpp::pegtl
CMake Error at /usr/lib64/cmake/vtk-9.4/FindPEGTL.cmake:27 (set_target_properties):
  Attempt to promote imported target "taocpp::pegtl" to global scope (by
  setting IMPORTED_GLOBAL) which is not built in this directory.
Call Stack (most recent call first):
  /usr/lib64/cmake/vtk-9.4/VTK-vtk-module-find-packages.cmake:1813 (find_package)
  /usr/lib64/cmake/vtk-9.4/vtk-config.cmake:170 (include)
  OCP/CMakeLists.txt:17 (find_package)


-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- VTK 9.4.2 found
-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C               -O2 -pipe -march=skylake -mtune=native -ftree-vectorize -malign-data=cacheline -mtls-dialect=gnu2
C++             -O2 -pipe -march=skylake -mtune=native -ftree-vectorize -malign-data=cacheline -mtls-dialect=gnu2
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--hash-style=gnu
Module          -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--hash-style=gnu
Shared          -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--hash-style=gnu

-- Configuring incomplete, errors occurred!

Used to build fine in the summer (python 3.12, vtk 9.3.1).

Dominant language
C++
Stars
200
Forks
48
Avg merge
1d 13h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CadQuery/OCP

All issues in CadQuery/OCP

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.