i have this failing on both ~amd64 and ~x86 with the same error... a workaround posted in bug #168730 ln -nsf /usr/src/linux/include/asm-x86_64/page.h /usr/include/asm or for x86 ln -nsf /usr/src/linux/include/asm-i386/page.h /usr/include/asm enables libsdl to compile now on both installs... but is there a "real" solution to this issue of does libsdl just need to fixed upstream? i saw where the above was marked a duplicate of bug #159304 but wasnt entirely sure what to make of that Reproducible: Always
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11video.c -o build/SDL_x11video.o >/dev/null 2>&1 ./src/video/Xext/Xxf86dga/XF86DGA.c:21:40: error: asm/page.h: No such file or directory make: *** [build/XF86DGA.lo] Error 1 make: *** Waiting for unfinished jobs.... x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11wm.c -o build/SDL_x11wm.o >/dev/null 2>&1 x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11yuv.c -o build/SDL_x11yuv.o >/dev/null 2>&1 !!! ERROR: media-libs/libsdl-1.2.11-r1 failed.
Ditto; different file, same error: x86_64-pc-linux-gnu-gcc -march=athlon64 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/fbcon/SDL_fbriva.c -o build/SDL_fbriva.o >/dev/null 2>&1 ./src/video/fbcon/SDL_fbvideo.c:32:57: error: asm/page.h: No such file or directory make: *** [build/SDL_fbvideo.lo] Error 1 make: *** Waiting for unfinished jobs.... x86_64-pc-linux-gnu-gcc -march=athlon64 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/thread/pthread/SDL_systhread.c -fPIC -DPIC -o build/.libs/SDL_systhread.o x86_64-pc-linux-gnu-gcc -march=athlon64 -O2 -pipe -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/thread/pthread/SDL_systhread.c -o build/SDL_systhread.o >/dev/null 2>&1 !!! ERROR: media-libs/libsdl-1.2.11-r1 failed.
> ln -nsf /usr/src/linux/include/asm-i386/page.h /usr/include/asm > > enables libsdl to compile now on both installs... but is there a "real" > solution to this issue of does libsdl just need to fixed upstream? This did not work for me, on ~x86 with gcc-4.1.2: ./build-scripts/strip_fPIC.sh /usr/bin/yasm -f elf -I ./src/hermes/ -DHIDDEN_VISIBILITY ./src/hermes/mmx_main.asm -fPIC -DPIC -o build/.libs/mmx_main.o /usr/bin/yasm -f elf -I ./src/hermes/ -DHIDDEN_VISIBILITY ./src/hermes/mmx_main.asm -o build/.libs/mmx_main.o ./src/hermes/mmx_main.asm:75: invalid argument to [SECTION] ./src/hermes/mmx_main.asm:75: undefined symbol `.note.GNU' (first use) ./src/hermes/mmx_main.asm:75: undefined symbol `stack' (first use) ./src/hermes/mmx_main.asm:75: (Each undefined symbol is reported only once.) make: *** [build/mmx_main.lo] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: media-libs/libsdl-1.2.11-r1 failed. Call stack: ebuild.sh, line 1614: Called dyn_compile ebuild.sh, line 971: Called qa_call 'src_compile' environment, line 3613: Called src_compile libsdl-1.2.11-r1.ebuild, line 160: Called die
(In reply to comment #3) > > ln -nsf /usr/src/linux/include/asm-i386/page.h /usr/include/asm > > > > enables libsdl to compile now on both installs... but is there a "real" > > solution to this issue of does libsdl just need to fixed upstream? > > This did not work for me, on ~x86 with gcc-4.1.2: [...] > ./src/hermes/mmx_main.asm:75: invalid argument to [SECTION] See bug #163053 From your reports (I saw only the mmx_main error when compiling), it seems that there are two bugs with libsdl: 1)Libsdl doesn't compile with >yasm-0.4. This is being taken upstream. 2)Libsdl doesn't compile with linux-headers-2.6.20-r1. A trivial fix is probably possible here. See the patches I submitted in the blockers of bug #159304 for an idea.
Could y'all please post the output of emerge -pv libsdl. I wondered why the libsdl RPM didn't have a fix for this, since Fedora uses limited linux-headers too. It seems they don't offer all the functionality we do: CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-aalib --disable-video-directfb --disable-video-ggi --disable-video-svga I'm trying to pin down which USE flags are including the files that fail. These are the files that include asm/page.h: src/video/Xext/Xxf86dga/XF86DGA.c:#include <asm/page.h> /* PAGE_SIZE */ src/video/fbcon/SDL_fbvideo.c:#include <asm/page.h> /* For definition of PAGE_SIZE */ src/video/ps2gs/SDL_gsyuv.c:#include <asm/page.h> /* For definition of PAGE_SIZE */ we'll probably be able to just remove the include of asm/page.h and do: #define PAGE_SIZE (getpagesize()) (after include <unistd.h>) instead, since unistd.h is already included. WARNING: HACK HACK HACK
Created attachment 112174 [details, diff] libsdl-1.2.11-no-yasm.patch PATCH for yasm compile. Uses nasm instead. See BUG #163053.
Created attachment 112175 [details, diff] libsdl-1.2.11-pagesize.patch PATCH for linux-headers-2.6.20-r1 compile.
Created attachment 112177 [details] libsdl-1.2.11-r1.ebuild Ebuild for no-yasm and pagesize patch. Compiles for me. Please test. Fixes BUG #163053 (media-libs/libsdl-1.2.11-r1 mmx_main.asm:75: invalid argument to [SECTION]) also.
Comment on attachment 112174 [details, diff] libsdl-1.2.11-no-yasm.patch this bug has nothing to do with yasm
asm/page.h issue should be fixed in cvs
*** Bug 170285 has been marked as a duplicate of this bug. ***
*** Bug 170775 has been marked as a duplicate of this bug. ***
This is not fixed; reporter, please reopen. i686-pc-linux-gnu-gcc -march=pentium4 -mtune=pentium4 -O2 -pipe -fno-ident -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11yuv.c -fPIC -DPIC -o build/.libs/SDL_x11yuv.o i686-pc-linux-gnu-gcc -march=pentium4 -mtune=pentium4 -O2 -pipe -fno-ident -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/Xext/Xxf86dga/XF86DGA.c -fPIC -DPIC -o build/.libs/XF86DGA.o ./src/video/Xext/Xxf86dga/XF86DGA.c:21:40: error: asm/page.h: No such file or directory make: *** [build/XF86DGA.lo] Error 1 make: *** Waiting for unfinished jobs.... i686-pc-linux-gnu-gcc -march=pentium4 -mtune=pentium4 -O2 -pipe -fno-ident -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11yuv.c -o build/SDL_x11yuv.o >/dev/null 2>&1 To make it clear: the error in the above is in XF86DGA.c, which is not touched by the patch in Gentoo CVS (files/libsdl-1.2.11-fbcon-page-header.patch). This is presumably only compiled when USE="X", which will be why vapier didn't spot it. It's fixed in Peter Alfredsen's patch, though, which is a little unfortunate. I'll post a cumulative patch to use the fix in files/libsdl-1.2.11-fbcon-page-header.patch on XF86DGA.c.
Created attachment 113222 [details, diff] XF86DGA.c-page.h.patch OK, so actually it's controlled by USE="dga". Anyway, HAVE_GETPAGESIZE won't work because this isn't in sdl/, so this patch simply syncs that stanza to the same in x11-libs/libXxf86dga-1.0.1 (which we should really be using instead of compiling our own copy; why not?)
Reopen.
added to cvs, cheers
-r1 and -r2 are still unstable on most archs, so "stable" libsdl is still broken because of asm/page.h