Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 890833

Summary: media-libs/sdl2-ttf-2.20.0: fails to locate SDL2_INCLUDE_DIR
Product: Gentoo Linux Reporter: Jon Daniel <jondaniel879>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=888543
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: output of emerge -v sdl2-ttf
emerge --info sdl2-ttf libsdl2
media-libs/libsdl2 cmake merged-usr fix using REALPATH
[New Ebuild] media-libs/libsdl2-2.26.2-r1.ebuild
dev-util/cmake-3.25.1 add GetRealPath to CollapseFullPath
[New Ebuild] dev-util/cmake-3.25.1-r1.ebuild

Description Jon Daniel 2023-01-14 20:49:36 UTC
Adding a link with `ln -s /usr/include //include` compiles but doesn't fix the ebuild

Reproducible: Always

Steps to Reproduce:
1. emerge -v sdl2-ttf
Actual Results:  
Abort: Fails to locate SDL2_INCLUDE_DIR

Expected Results:  
Compile and install locating SDL2_INCLUDE_DIR as /usr/include not //include
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-14 20:49:59 UTC
Please include the full build.log and emerge --info (with the symlink removed).
Comment 2 Jon Daniel 2023-01-14 20:53:21 UTC
Created attachment 848465 [details]
output of emerge -v sdl2-ttf
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-14 21:02:00 UTC
emerge --info too please if not already working on it. It might be an issue with CMake (which is fixed in portage git).
Comment 4 Jon Daniel 2023-01-14 21:11:45 UTC
The line of code in question is located at /lib/cmake/SDL2/sdl2-config.cmake:17

get_file_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

${CMAKE_CURRENT_LIST_DIR} is set to /lib/cmake/SDL2

So this seems to be related to the usr-merge transition
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-14 21:12:53 UTC
Yes, that's what I was suspecting, hence asking about emerge --info.
Comment 6 Jon Daniel 2023-01-14 21:15:17 UTC
Created attachment 848467 [details]
emerge --info sdl2-ttf libsdl2
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-14 21:16:51 UTC
Any chance you could try portage-9999 briefly and report if it helps?
Comment 8 Jon Daniel 2023-01-14 22:06:51 UTC
Created attachment 848485 [details, diff]
media-libs/libsdl2 cmake merged-usr fix using REALPATH
Comment 9 Jon Daniel 2023-01-14 22:16:58 UTC
Created attachment 848487 [details]
[New Ebuild] media-libs/libsdl2-2.26.2-r1.ebuild
Comment 10 Mike Gilbert gentoo-dev 2023-01-15 00:24:44 UTC

*** This bug has been marked as a duplicate of bug 888543 ***
Comment 11 Jon Daniel 2023-01-15 07:08:06 UTC
The bug is triggered in dev-util/cmake-3.25.1

Adding GetRealPath to CollapseFullPath resolves the issue.
Comment 12 Jon Daniel 2023-01-15 07:08:47 UTC
Created attachment 848553 [details, diff]
dev-util/cmake-3.25.1 add GetRealPath to CollapseFullPath
Comment 13 Jon Daniel 2023-01-15 07:09:11 UTC
Created attachment 848555 [details]
[New Ebuild] dev-util/cmake-3.25.1-r1.ebuild