Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 169388
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: merwan kashouty <mkashouty@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
libsdl-1.2.11-no-yasm.patch libsdl-1.2.11-no-yasm.patch patch Peter Alfredsen 2007-03-05 16:07 0000 1.67 KB Details | Diff
libsdl-1.2.11-pagesize.patch libsdl-1.2.11-pagesize.patch patch Peter Alfredsen 2007-03-05 16:08 0000 3.00 KB Details | Diff
libsdl-1.2.11-r1.ebuild libsdl-1.2.11-r1.ebuild text/plain Peter Alfredsen 2007-03-05 16:09 0000 4.88 KB Details
XF86DGA.c-page.h.patch XF86DGA.c-page.h.patch patch Ed Catmur 2007-03-13 23:18 0000 496 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 169388 depends on: Show dependency tree
Bug 169388 blocks: 159304
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-03-05 01:05 0000
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

------- Comment #1 From merwan kashouty 2007-03-05 01:08:51 0000 -------
 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.

------- Comment #2 From Paul Taylor 2007-03-05 04:06:27 0000 -------
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.

------- Comment #3 From Darren Dale 2007-03-05 11:33:43 0000 -------
> 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

------- Comment #4 From Peter Alfredsen 2007-03-05 12:04:21 0000 -------
(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.

------- Comment #5 From Peter Alfredsen 2007-03-05 13:04:27 0000 -------
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

------- Comment #6 From Peter Alfredsen 2007-03-05 16:07:11 0000 -------
Created an attachment (id=112174) [details]
libsdl-1.2.11-no-yasm.patch

PATCH for yasm compile. Uses nasm instead. See BUG #163053.

------- Comment #7 From Peter Alfredsen 2007-03-05 16:08:07 0000 -------
Created an attachment (id=112175) [details]
libsdl-1.2.11-pagesize.patch

PATCH for linux-headers-2.6.20-r1 compile.

------- Comment #8 From Peter Alfredsen 2007-03-05 16:09:58 0000 -------
Created an attachment (id=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 #9 From SpanKY 2007-03-05 16:47:05 0000 -------
(From update of attachment 112174 [details])
this bug has nothing to do with yasm

------- Comment #10 From SpanKY 2007-03-05 16:47:38 0000 -------
asm/page.h issue should be fixed in cvs

------- Comment #11 From Jakub Moc (RETIRED) 2007-03-10 16:34:11 0000 -------
*** Bug 170285 has been marked as a duplicate of this bug. ***

------- Comment #12 From Jakub Moc (RETIRED) 2007-03-13 19:17:23 0000 -------
*** Bug 170775 has been marked as a duplicate of this bug. ***

------- Comment #13 From Ed Catmur 2007-03-13 22:52:53 0000 -------
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.

------- Comment #14 From Ed Catmur 2007-03-13 23:18:38 0000 -------
Created an attachment (id=113222) [details]
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?)

------- Comment #15 From Jakub Moc (RETIRED) 2007-03-13 23:54:09 0000 -------
Reopen.

------- Comment #16 From SpanKY 2007-03-14 00:09:55 0000 -------
added to cvs, cheers

------- Comment #17 From Gunnlaugur Thor Briem 2007-04-08 14:51:19 0000 -------
-r1 and -r2 are still unstable on most archs, so "stable" libsdl is still
broken because of asm/page.h

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug