from /usr/include/SDL2/SDL.h:32, from /var/tmp/portage/media-libs/libgroove-4.3.0-r1/work/libgroove-4.3.0/grooveplayer/player.c:13: /usr/include/x86_64-pc-linux-gnu/SDL2/SDL_config.h:33:26: fatal error: SDL_platform.h: No such file or directory #include "SDL_platform.h" ^ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 13.0-desktop-plasma_abi32+64_20171014-180732 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-6.4.0 * Available Python interpreters, in order of preference: [1] python3.4 [2] python2.7 (fallback) java-config: The following VMs are available for generation-2: *) IcedTea JDK 3.5.1 [icedtea-bin-8] Available Java Virtual Machines: [1] icedtea-bin-8 system-vm emerge -qpv media-libs/libgroove [ebuild N ] media-libs/libgroove-4.3.0-r1 USE="chromaprint loudness sound -libav -static-libs"
Created attachment 498874 [details] emerge-info.txt
Created attachment 498876 [details] emerge-history.txt
Created attachment 498878 [details] environment
Created attachment 498880 [details] etc.portage.tbz2
Created attachment 498882 [details] logs.tbz2
Created attachment 498884 [details] media-libs:libgroove-4.3.0-r1:20171016-054454.log
Created attachment 498886 [details] temp.tbz2
This seems to be a bug in libsdl2-2.0.6.ebuild, specifically in lines 66-68: > MULTILIB_WRAPPED_HEADERS=( > /usr/include/SDL2/SDL_config.h > ) Either deleting those lines or adding a few more headers fixes the build failure: > MULTILIB_WRAPPED_HEADERS=( > /usr/include/SDL2/SDL_config.h >+ /usr/include/SDL2/SDL_platform.h >+ /usr/include/SDL2/begin_code.h >+ /usr/include/SDL2/close_code.h > ) I am familiar with neither libsdl nor MULTILIB_WRAPPED_HEADERS, so I don't know what would be the right approach, but according to the devmanual "header wrapping is *discouraged*".
I looked into this again and found bug #634370, which suggested the solution would be to add /usr/include/SDL2 to the include path. The cause of the problem: - libgroove uses include directives with the SDL2 prefix (e.g. #include <SDL2/SDL.h>), so it only adds /usr/include to the include path. - SDL2 itself uses directives without the prefix (e.g. #include "SDL_platform.h"), so it needs /usr/include/SDL2 in the include path. The obvious solution is to add both /usr/include and /usr/include/SDL2 to the include path. Pull request: https://github.com/gentoo/gentoo/pull/6496
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69a81325c5375b158cbd9ca95fb865c50ffef773 commit 69a81325c5375b158cbd9ca95fb865c50ffef773 Author: Diogo Pereira <sir.suriv@gmail.com> AuthorDate: 2017-12-10 01:22:13 +0000 Commit: Patrice Clement <monsieurp@gentoo.org> CommitDate: 2017-12-12 20:01:11 +0000 media-libs/libgroove: fix build with libsdl2-2.0.6. Reported-by: Toralf Förster <toralf@gentoo.org> Closes: https://bugs.gentoo.org/634470 Closes: https://github.com/gentoo/gentoo/pull/6496 Package-Manager: Portage-2.3.13, Repoman-2.3.3 .../libgroove/files/libgroove-4.3.0_sdl2_include_dir.patch | 13 +++++++++++++ media-libs/libgroove/libgroove-4.3.0-r1.ebuild | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-)