Description of problem: There is a leftover erroneous definition of DECLSPEC in SDL2/begin_code.h, which makes it impossible to compile against SDL2 using gcc < 4.x, e.g. compat-gcc-34. The issue is reported to SDL bugzilla: https://bugzilla.libsdl.org/show_bug.cgi?id=2720 The fix is trivial, removing two offending lines, as in the following patch: --- SDL2-2.0.3/include/begin_code.h~ +++ SDL2-2.0.3//include/begin_code.h @@ -56,8 +56,7 @@ # else # if defined(__GNUC__) && __GNUC__ >= 4 # define DECLSPEC __attribute__ ((visibility("default"))) -# elif defined(__GNUC__) && __GNUC__ >= 2 -# define DECLSPEC __declspec(dllexport) +/* FIXME: some distros have visibility attributes backported to gcc3.4 */ # else # define DECLSPEC # endif Version-Release number of selected component (if applicable): SDL2-2.0.3, Fedora 20 (any fedora or RHEL which ships SDL2.) How reproducible: Always. Steps to Reproduce: $ cat test.c #include "SDL.h" int main () { return 0; } $ gcc34 -c test.c `sdl2-config --cflags` In file included from /usr/include/sys/types.h:29, from /usr/include/SDL2/SDL_stdinc.h:34, from /usr/include/SDL2/SDL_main.h:25, from /usr/include/SDL2/SDL.h:67, from 0.c:1: /usr/include/bits/types.h: In function `__declspec': /usr/include/bits/types.h:30: error: storage class specified for parameter `__u_char' /usr/include/bits/types.h:31: error: storage class specified for parameter `__u_short' ...... [errors go on..]
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Changed fedora version from 20 to rawhide: the issue is there with all fedoras with sdl2. Mainstream has the fix applied already.
SDL2-2.0.3-5.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/SDL2-2.0.3-5.fc22
SDL2-2.0.3-5.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/SDL2-2.0.3-5.fc21
SDL2-2.0.3-5.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/SDL2-2.0.3-5.fc20
(In reply to Fedora Update System from comment #5) > SDL2-2.0.3-5.fc20 has been submitted as an update for Fedora 20. > https://admin.fedoraproject.org/updates/SDL2-2.0.3-5.fc20 Tested on f20 (x86_64), works OK.
Package SDL2-2.0.3-5.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing SDL2-2.0.3-5.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-9470/SDL2-2.0.3-5.fc22 then log in and leave karma (feedback).
SDL2-2.0.3-5.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
SDL2-2.0.3-5.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
SDL2-2.0.3-5.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.