| Summary: | Build failure of SDL1.2 on Linux | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ben Avison <bavison> |
| Component: | main | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | ed.sinjiashvili, icculus, philipp.wiesemann |
| Version: | HG 1.2 | ||
| Hardware: | ARM | ||
| OS: | Linux | ||
This was maybe fixed here (with a different patch): https://hg.libsdl.org/SDL/rev/8ab0633c9d43 Yes, this should be fixed in revision control. --ryan. |
Specifically, I'm using Raspbian, though I suspect any Linux distro is probably affected. Build log: $ make /bin/bash ./libtool --mode=compile gcc -g -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/stdlib/SDL_qsort.c -o build/SDL_qsort.lo libtool: compile: gcc -g -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c ./src/stdlib/SDL_qsort.c -fPIC -DPIC -o build/.libs/SDL_qsort.o ./src/stdlib/SDL_qsort.c:349:61: error: unknown type name ‘size_t’ static char * pivot_big(char *first, char *mid, char *last, size_t size, ^ ./src/stdlib/SDL_qsort.c:390:42: error: unknown type name ‘size_t’ static void qsort_nonaligned(void *base, size_t nmemb, size_t size, ^ ./src/stdlib/SDL_qsort.c:390:56: error: unknown type name ‘size_t’ static void qsort_nonaligned(void *base, size_t nmemb, size_t size, ^ ./src/stdlib/SDL_qsort.c:421:39: error: unknown type name ‘size_t’ static void qsort_aligned(void *base, size_t nmemb, size_t size, ^ ./src/stdlib/SDL_qsort.c:421:53: error: unknown type name ‘size_t’ static void qsort_aligned(void *base, size_t nmemb, size_t size, ^ ./src/stdlib/SDL_qsort.c:452:37: error: unknown type name ‘size_t’ static void qsort_words(void *base, size_t nmemb, ^ ./src/stdlib/SDL_qsort.c:504:32: error: unknown type name ‘size_t’ extern void qsortG(void *base, size_t nmemb, size_t size, ^ ./src/stdlib/SDL_qsort.c:504:46: error: unknown type name ‘size_t’ extern void qsortG(void *base, size_t nmemb, size_t size, ^ build-deps:462: recipe for target 'build/SDL_qsort.lo' failed make: *** [build/SDL_qsort.lo] Error 1 The only problem is the failure to pick up a typedef for size_t. This can be solved by #include <stddef.h> but I see that it's only a few revisions back that #include "SDL_stdinc.h" was removed, which does it indirectly, so I guess that's the better solution? diff -r 2f1eb5fa26ea src/stdlib/SDL_qsort.c --- a/src/stdlib/SDL_qsort.c Fri Mar 11 08:30:18 2016 -0800 +++ b/src/stdlib/SDL_qsort.c Tue Mar 22 21:17:46 2016 +0000 @@ -21,6 +21,8 @@ #ifndef HAVE_QSORT +#include "SDL_stdinc.h" + #ifdef assert #undef assert #endif