| Summary: | parallel make broken: SDL_revision.h: No such file or directory | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Dennis <devurandom> |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | sn.ml |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Patches Makefile.in to allow parallel building. | ||
I did just like you described and for me it worked. (revision #4444) I even tried different -j options. my build tools: autoconf (GNU Autoconf) 2.63 automake (GNU automake) 1.10.2 GNU Make 3.81 gcc (Gentoo 4.3.3 p1.0, pie-10.1.5) 4.3.3 And obviously Gentoo Linux. My checkout is not in it's initial stage, but I did make distclean and removed configure before testing. Well in fact Dennis was right. As I found out `make distclean` doesn't remove the SDL_revision.h. I fixed this by adding another build rule, which will make the header if it is needed and it doesn't exist. Anything else will simply not work as the `make -jn` will pick n first deps from the target 'all' and even if update-revision would be the first dep for the target 'all' the parallel make will start to build the targets that depend from the SDL_revision.h header for all n >= 4. With the patch parallel building works. Created attachment 300 [details]
Patches Makefile.in to allow parallel building.
This is fixed in subversion, thanks! |
When trying to run a parallel build, gcc will not be able to find SDL_revision.h What I did: ./autogen.sh mkdir build cd build ../configure make -j3 Results: /bin/sh ../build-scripts/mkinstalldirs build /bin/sh ../build-scripts/updaterev.sh /bin/sh ./libtool --mode=compile gcc -g -O2 -Iinclude -I../include -D_GNU_SOURCE=1 -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ../src/SDL.c -o build/SDL.lo mkdir -p -- build /bin/sh ./libtool --mode=compile gcc -g -O2 -Iinclude -I../include -D_GNU_SOURCE=1 -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ../src/SDL_compat.c -o build/SDL_compat.lo mkdir build/.libs gcc -g -O2 -Iinclude -I../include -D_GNU_SOURCE=1 -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ../src/SDL.c -fPIC -DPIC -o build/.libs/SDL.o gcc -g -O2 -Iinclude -I../include -D_GNU_SOURCE=1 -mmmx -m3dnow -msse -msse2 -fvisibility=hidden -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ../src/SDL_compat.c-fPIC -DPIC -o build/.libs/SDL_compat.o In file included from ../include/SDL.h:91, from ../src/SDL_compat.c:26: ../include/SDL_version.h:33:26: error: SDL_revision.h: No such file or directory In file included from ../include/SDL.h:91, from ../src/SDL.c:26: ../include/SDL_version.h:33:26: error: SDL_revision.h: No such file or directory ../src/SDL.c: In function 'SDL_GetRevision': ../src/SDL.c:303: error: 'SDL_REVISION' undeclared (first use in this function) ../src/SDL.c:303: error: (Each undeclared identifier is reported only once ../src/SDL.c:303: error: for each function it appears in.) make: *** [build/SDL.lo] Error 1 Also: SDL_revision.h seems to be created in srcdir, not in builddir. A repeated invokation "works".