Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634470 - media-libs/libgroove-4.3.0-r1 : /.../SDL_config.h:33:26: fatal error: SDL_platform.h: No such file or directory
Summary: media-libs/libgroove-4.3.0-r1 : /.../SDL_config.h:33:26: fatal error: SDL_pla...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diogo Pereira
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2017-10-16 18:16 UTC by Toralf Förster
Modified: 2017-12-12 20:07 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.46 KB, text/plain)
2017-10-16 18:16 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,47.41 KB, text/plain)
2017-10-16 18:16 UTC, Toralf Förster
Details
environment (environment,116.45 KB, text/plain)
2017-10-16 18:16 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.87 KB, application/x-bzip)
2017-10-16 18:16 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,4.90 KB, application/x-bzip)
2017-10-16 18:16 UTC, Toralf Förster
Details
media-libs:libgroove-4.3.0-r1:20171016-054454.log (media-libs:libgroove-4.3.0-r1:20171016-054454.log,46.98 KB, text/plain)
2017-10-16 18:16 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,31.80 KB, application/x-bzip)
2017-10-16 18:16 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-10-16 18:16:17 UTC
                 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"
Comment 1 Toralf Förster gentoo-dev 2017-10-16 18:16:20 UTC
Created attachment 498874 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-10-16 18:16:23 UTC
Created attachment 498876 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-10-16 18:16:26 UTC
Created attachment 498878 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-10-16 18:16:29 UTC
Created attachment 498880 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-10-16 18:16:33 UTC
Created attachment 498882 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-10-16 18:16:36 UTC
Created attachment 498884 [details]
media-libs:libgroove-4.3.0-r1:20171016-054454.log
Comment 7 Toralf Förster gentoo-dev 2017-10-16 18:16:40 UTC
Created attachment 498886 [details]
temp.tbz2
Comment 8 Diogo Pereira 2017-10-16 20:33:29 UTC
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*".
Comment 9 Diogo Pereira 2017-12-10 01:17:32 UTC
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
Comment 10 Larry the Git Cow gentoo-dev 2017-12-12 20:07:48 UTC
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(-)