Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634370 - media-libs/libsdl2 headers possibly not correct implemented?
Summary: media-libs/libsdl2 headers possibly not correct implemented?
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-15 20:43 UTC by raimund mathis
Modified: 2017-11-02 21:41 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description raimund mathis 2017-10-15 20:43:26 UTC
I have found a SDL2 written Pacman Clone at

github.com/ebuc99/pacman

Ok i have cloned the source, have done a

./configure
make 

and then i recieve the error  
/usr/include/x86_64-pc-linux-gnu/SDL2/SDL_config.h:33:10: fatal error: SDL_platform.h: no such file or directory
#include "SDL_platform.h"


if i change in
/usr/include/x86_64-pc-linux-gnu/SDL2/SDL_config.h

the line 
#include "SDL_platform.h"

to 
#include "SDL2/SDL_platform.h"

all builds fine and after 
make install 

the program runs fine
Comment 1 Geoff Leach 2017-10-16 02:05:44 UTC
Confirmed, seeing same issue.
Comment 2 Dominique Michel 2017-11-02 21:07:08 UTC
Same issue here with SDL 1:

In file included from y4mhist.c:27:0:
/usr/include/SDL/SDL_gfxPrimitives.h:38:17: fatal error: SDL.h: No such file or directory
 #include <SDL.h>

If I put 

#include <sdl/SDL.h>

in /usr/include/SDL/SDL_gfxPrimitives.h it work.
Comment 3 James Le Cuirot gentoo-dev 2017-11-02 21:40:02 UTC
This is how everyone packages SDL and SDL2. Check other distributions.

(In reply to raimund mathis from comment #0)
> I have found a SDL2 written Pacman Clone at
> 
> github.com/ebuc99/pacman
Your configure.ac should use pkg-config, which is best practise and more likely to work under exotic setups. Otherwise add -I=/usr/include/SDL2 to pacman_CPPFLAGS. I see you added this to pacman_LDFLAGS but it will do nothing here.
Comment 4 James Le Cuirot gentoo-dev 2017-11-02 21:41:55 UTC
(In reply to James Le Cuirot from comment #3)
> (In reply to raimund mathis from comment #0)
> > I have found a SDL2 written Pacman Clone at
> > 
> > github.com/ebuc99/pacman
> Your configure.ac should use pkg-config, which is best practise and more
> likely to work under exotic setups. Otherwise add -I=/usr/include/SDL2 to
> pacman_CPPFLAGS. I see you added this to pacman_LDFLAGS but it will do
> nothing here.

Sorry, I misread this and thought you had written it. Since upstream is doing it wrong, you can work around it by doing:

CPPFLAGS="-I/usr/include/SDL2" ./configure