| Summary: | Fails to build on Debian GNU/kFreeBSD | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Felix Geyer <debfx> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | FreeBSD | ||
| Attachments: | SDL_cpuinfo.c build fix for kFreeBSD | ||
Out of curiousity, is this the only patch needed to fix the build on Debian GNU/kFreeBSD? --ryan. Fixed, thanks! https://hg.libsdl.org/SDL/rev/334257cd613d Thanks, this is the only change necessary to build on GNU/kFreeBSD. (In reply to Felix Geyer from comment #3) > Thanks, this is the only change necessary to build on GNU/kFreeBSD. Cool, I'll add a GNU/kFreeBSD to the buildbot system then. :) --ryan. > Cool, I'll add a GNU/kFreeBSD to the buildbot system then. :) ...and now I have: https://buildbot.libsdl.org/builders/sdl-kfreebsd-amd64 This will automatically build every new revision to SDL and email us if we break the build on this platform. --ryan. |
Created attachment 1514 [details] SDL_cpuinfo.c build fix for kFreeBSD Starting from version 2.0.1 libsdl fails to build on Debian GNU/kFreeBSD in SDL_cpuinfo.c. GNU/kFreeBSD defines __FreeBSD_kernel__ but not __FreeBSD__. The #ifdef __FreeBSD__ check should be extended for __FreeBSD_kernel__, see the attached patch. Build log: libtool: compile: gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DUSING_GENERATED_CONFIG_H -Iinclude -I/«BUILDDIR»/libsdl2-2.0.1+dfsg1/include -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-kfreebsd-gnu/dbus-1.0/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -Wall -c /«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c -fPIC -DPIC -o build/.libs/SDL_cpuinfo.o /«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetSystemRAM': /«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: error: 'HW_MEMSIZE' undeclared (first use in this function) int mib[2] = {CTL_HW, HW_MEMSIZE}; ^ /«BUILDDIR»/libsdl2-2.0.1+dfsg1/src/cpuinfo/SDL_cpuinfo.c:632:35: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [build/SDL_cpuinfo.lo] Error 1