Bug#1036820: libsdl2-dev include headers not found by cmake since usr merge

Simon McVittie smcv at debian.org
Sat May 27 12:25:34 BST 2023


Control: tags -1 + moreinfo

On Sat, 27 May 2023 at 10:14:51 +0200, Jaka wrote:
>   CMake Error at /lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake:13 (message):
>     File or directory //include/SDL2 referenced by variable SDL2_INCLUDE_DIR
>     does not exist !
>   Call Stack (most recent call first):
>     /lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake:29 (set_and_check)
>     CMakeLists.txt:331 (find_package)

I was not able to reproduce this error: on my merged-/usr system, CMake
detects SDL's prefix as /usr, then ends up with SDL2_INCLUDE_DIR set to
/usr/include/SDL2 as expected.

If you download and unpack the libsdl2 source package, you'll find several
simple test projects in debian/tests/cmake-*/ which are all run by the
test script debian/tests/cmake - it's intended to be run via autopkgtest,
but you can just run it as ./debian/tests/cmake from an unpacked libsdl2
source package. Do those tests pass or fail on your system?

If those tests pass, perhaps you could modify one of them into a
simplified version of whatever project is failing for you?

Or if you are invoking cmake with special options, please try to edit
./debian/tests/cmake so that it uses similar options and reproduces
this error.

>   APT prefers lunar-updates
>   APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar')

It seems you are not actually running Debian, so please report this to
Ubuntu if you haven't already. Debian contributors cannot generally
provide support for the packages in Ubuntu, many of which have been
modified (even if libsdl2 itself is the same in Debian and Ubuntu,
other relevant packages like cmake and the compiler might not be).

    smcv



More information about the Pkg-sdl-maintainers mailing list