graphics/vulkan-loader build error

From: Janos Dohanics <web_at_3dresearch.com>
Date: Sun, 12 Nov 2023 00:19:47 UTC
Hello,

This is a FreeBSD 12.4-STABLE r373264 system.

Trying to build graphics/vulkan-loader:

# make install clean
===>  License APACHE20 accepted by the user
===>   vulkan-loader-1.3.269 depends on file: /usr/local/sbin/pkg - found
=> KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://codeload.github.com/KhronosGroup/Vulkan-Loader/tar.gz/v1.3.269?dummy=/KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz
fetch: https://codeload.github.com/KhronosGroup/Vulkan-Loader/tar.gz/v1.3.269?dummy=/KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz: size unknown
fetch: https://codeload.github.com/KhronosGroup/Vulkan-Loader/tar.gz/v1.3.269?dummy=/KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz: size of remote file is not known
KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz        1648 kB  595 kBps    03s
===> Fetching all distfiles required by vulkan-loader-1.3.269 for building
===>  Extracting for vulkan-loader-1.3.269
=> SHA256 Checksum OK for KhronosGroup-Vulkan-Loader-v1.3.269_GH0.tar.gz.
===>  Patching for vulkan-loader-1.3.269
===>   vulkan-loader-1.3.269 depends on package: vulkan-headers>0 - found
===>   vulkan-loader-1.3.269 depends on file: /usr/local/bin/cmake - found
===>   vulkan-loader-1.3.269 depends on executable: ninja - found
===>   vulkan-loader-1.3.269 depends on package: pkgconf>=1.3.0_1 - found
===>   vulkan-loader-1.3.269 depends on file: /usr/local/bin/python3.9 - found
===>   vulkan-loader-1.3.269 depends on file: /usr/local/libdata/pkgconfig/xcb.pc - found
===>   vulkan-loader-1.3.269 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   vulkan-loader-1.3.269 depends on file: /usr/local/libdata/pkgconfig/xrandr.pc - found
===>   vulkan-loader-1.3.269 depends on shared library: libwayland-client.so - found (/usr/local/lib/libwayland-client.so)
===>  Configuring for vulkan-loader-1.3.269
===>  Performing out-of-source build
/bin/mkdir -p /usr/ports/graphics/vulkan-loader/work/.build
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Found Threads: TRUE  
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
CMake Warning at CMakeLists.txt:235 (message):
  Using non-secure environmental lookups.  This loader will not properly
  disable environent variables when run with elevated permissions.


-- Looking for alloca.h
-- Looking for alloca.h - not found
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /usr/bin/cc
-- Looking for cet.h
-- Looking for cet.h - found
-- Found PkgConfig: /usr/local/bin/pkgconf (found version "2.0.3") 
-- Configuring done (1.3s)
CMake Error at loader/CMakeLists.txt:21 (target_link_libraries):
  The link interface of target "loader_specific_options" contains:

    Vulkan::Headers

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at loader/CMakeLists.txt:432 (target_link_libraries):
  Target "vulkan" links to:

    Vulkan::Headers

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



-- Generating done (0.0s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BOOST_PYTHON_SUFFIX
    CMAKE_CXX_FLAGS_RELEASE
    CMAKE_MODULE_LINKER_FLAGS
    CMAKE_VERBOSE_MAKEFILE
    FETCHCONTENT_FULLY_DISCONNECTED
    Python3_EXECUTABLE
    Python_ADDITIONAL_VERSIONS
    Python_EXECUTABLE


CMake Generate step failed.  Build files cannot be regenerated correctly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/vulkan-loader
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/vulkan-loader

With a cursory search, I could find nothing useful aboout this error.
Would you please advise?

-- 
Janos Dohanics