Forgot to include the bug report again... 2015-05-31 11:43 GMT+01:00 Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com>: > 2015-05-31 7:14 GMT+01:00 Steve Clark <fawty...@gmail.com>: >> On Sun, 31 May 2015 00:20:11 +0100 >> "Manuel A. Fernandez Montecelo" <manuel.montez...@gmail.com> wrote: >> >>> 2015-05-30 21:27 GMT+01:00 Steve Clark <fawty...@gmail.com>: >>> > On Sat, 30 May 2015 10:14:31 +0100 >>> > "Manuel A. Fernandez Montecelo" <manuel.montez...@gmail.com> wrote: >>> > >>> >> Hello, >>> >> >>> >> 2015-05-29 15:54 GMT+01:00 Steve Clark <fawty...@gmail.com>: >>> >> > Package: libsdl-stretch-dev >>> >> > Version: 0.3.1-4 >>> >> > >>> >> > Including the SDL_stretch header file causes the following >>> >> > compile error: >>> >> > /usr/include/SDL_stretch/SDL_stretch.h:25:23: fatal error: >>> >> > SDL_video.h: No such file or directory #include "SDL_video.h" >>> >> > >>> >> > This is because the SDL stretch header files are in a separate >>> >> > directory. >>> >> > >>> >> > There are 2 possible solutions: >>> >> > 1. The SDL stretch header files should be in /usr/include/SDL >>> >> > with the other SDL files >>> >> > >>> >> > 2. Comment the offending line out in SDL_stretch.h >>> >> > >>> >> > Option 2 is tested as workable because the header file continues >>> >> > with: #ifndef _SDL_video_h >>> >> > #include <SDL/SDL_video.h> >>> >> > #endif >>> >> > ... which means it will still work. But I think option 1 is >>> >> > preferable. >>> >> > >>> >> > I don't know if this is an upstream bug. But as it stands, it >>> >> > unusable unless that line is commented out. >>> >> >>> >> Doesn't it work if you pass "-I/usr/include/SDL" (the first letter >>> >> is a capital 'i', not an L) to the compiler? >>> >> >>> >> >>> >> Cheers. >>> > >>> > Yes it does. But I shouldn't have to do that. >>> >>> As far as I am aware, it's a common practice to have library headers >>> installed in different subdirectories of /usr/include (or under >>> /usr/local/include, or /opt, or different paths of the user's >>> home...), and then when compiling a project that needs another library >>> included, to pass the -I option to the compiler. >>> >>> SDL_stretch is not a part of the main SDL modules, it comes from a >>> different upstream, and they decided to install it in a different path >>> rather than in the same directory as other SDL modules. >>> >>> The Debian package does not modify the installation path coming from >>> upstream, so probably the situation is the same in other >>> distributions. Even within Debian, this has been the behaviour for >>> many years, probably more than a decade by now, so moving the files to >>> another path is not a good solution, I think -- it will affect the >>> other users. >>> >>> On the other hand, the following code looks a bit problematic, because >>> as it is happening to you right now, if the first #include fails the >>> whole compilation fails, it is a fatal error to include a file and the >>> file not being there, so those four lines do not make much sense. >>> >>> #include "SDL_video.h" >>> #ifndef _SDL_video_h >>> #include <SDL/SDL_video.h> >>> #endif >>> >>> >>> The las version is from 6 years ago and this project has not been >>> adapted for SDL2, so it makes me wonder if the project is still alive >>> and if they will consider to fix it and give some advice on what to do >>> in this case. >>> >>> I cannot do that at the moment, I will try at some point in summer if >>> I find the time, but if in the meantime you or anybody else get in >>> contact with upstream, please drop a line here. >>> >>> >>> Cheers. >> >> If the first include is commented out, it will work. I was kinda hoping >> you'd be willing to do that. > > I don't know if other members of the team have a different opinion, so > this is not set in stone, but the problem that I see with changing the > current behaviour and why I am reluctant to do it is the following: if > for any reason in some user's systems the version of SDL/SDL_video.h > that they want to use along with sdl-stretch is not in /usr/include > (or one of the automatically searched directories), and rightly or > wrongly they are relying in the current behaviour that was there for > years, and they solve it by passing > "-I/home/user/special-SDL-version/", removing that line will make > things fail for them (or compile against an undesired version in > /usr/include/SDL/SDL_*, instead of the ones that they want). > > And in general, I think that it is common and expected (if this is not > so, please somebody correct me), that the users of a library have to > explicitly pass the location with "-I", because upstreams don't always > think the same and some headers include "SDL/SDL*.h", others expect -I > to be added and remove the "SDL/". Neither of the behaviours is > "right" or "wrong", I think, it just happens to not be standardised. > > For example we have this case with libsdl2-mixer because one of the > dependencies changed their behaviour in the same respect, and we had > to adapt: > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726768 > > >> I will check upstream too. If SDL_stretch is no longer maintained, I >> will probably fork it myself. > > OK, thanks. > > If it is still useful for people, it would be nice to have it working > with SDL2, and perhaps in more architectures than x86 (now ARM and > others are becoming very popular). > > > Cheers. > -- > Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com>
-- Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org