Package: libxmp-dev
Version: 4.6.3-1
Severity: important

Dear Maintainer,

the included CMake module at
`/lib/x86_64-linux-gnu/cmake/libxmp/libxmp-config.cmake` contains the following
lines:

        get_filename_component(libxmp_root 
"${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
        get_filename_component(libxmp_libdir "${CMAKE_CURRENT_LIST_DIR}/../.." 
ABSOLUTE)
        set(libxmp_incdir "${libxmp_root}/include")

These assume that the cmake file is always located under `/usr`, which is not
necessarily the case for usr-merged Debian, since `/lib` is symlinked to
`/usr/lib`.

CMake will automatically add `/` to `CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`
_before_ `/usr` in case any root-level directory (eg. `/bin`) has been added to
`$PATH`.

This causes `libxmp_incdir` to become `//include`, which breaks any build using
this module since CMake will error out due to the non-existent directory.

I've seen other CMake modules use hacks that check if the root directory is `/`
and set it to `/lib` instead, but not sure if that is the best solution...


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-debug'), (300, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.16.8+deb14-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libxmp-dev depends on:
ii  libxmp4  4.6.3-1

libxmp-dev recommends no packages.

libxmp-dev suggests no packages.

-- no debconf information

Reply via email to