Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163053 - media-libs/libsdl-1.2.11-r1 mmx_main.asm:75: invalid argument to [SECTION]
Summary: media-libs/libsdl-1.2.11-r1 mmx_main.asm:75: invalid argument to [SECTION]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL: http://cvs.tortall.net/pipermail/yasm...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-21 11:52 UTC by Lónyai Gergely
Modified: 2010-07-27 13:38 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
complete build log (build.log,58.69 KB, text/plain)
2007-01-21 11:53 UTC, Lónyai Gergely
Details
libsdl-1.2.11-no-yasm.patch (libsdl-1.2.11-no-yasm.patch,1.67 KB, patch)
2007-03-05 16:00 UTC, Peter Alfredsen (RETIRED)
Details | Diff
libsdl-1.2.11-pagesize.patch (libsdl-1.2.11-pagesize.patch,3.00 KB, patch)
2007-03-05 16:02 UTC, Peter Alfredsen (RETIRED)
Details | Diff
libsdl-1.2.11-r1.ebuild (libsdl-1.2.11-r1.ebuild,4.88 KB, text/plain)
2007-03-05 16:05 UTC, Peter Alfredsen (RETIRED)
Details
Fixed pagefile patch for working with all the other patches in the -r1 ebuild in this thread. (libsdl-1.2.11-pagesize.patch,2.58 KB, patch)
2007-03-06 20:59 UTC, Michael Evans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lónyai Gergely 2007-01-21 11:52:59 UTC
./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

!!! ERROR: media-libs/libsdl-1.2.11-r1 failed.
Call stack:
  ebuild.sh, line 1611:   Called dyn_compile
  ebuild.sh, line 968:   Called qa_call 'src_compile'
  environment, line 3573:   Called src_compile
  libsdl-1.2.11-r1.ebuild, line 160:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/media-libs/libsdl-1.2.11-r1/temp/build.log'.

...

emerge --info
Portage 2.1.2-r1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r4 i686)
=================================================================
System uname: 2.6.19-gentoo-r4 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.12.9
Timestamp of tree: Sat, 20 Jan 2007 19:30:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="hu_HU.UTF-8"
LC_ALL="hu_HU.UTF-8"
LINGUAS="hu"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays /usr/local/layman/hron /usr/local/layman/xeffects /usr/local/layman/webapps-experimental"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi aim alsa apache2 asf avahi bash-completion berkdb bitmap-fonts bluetooth branding bzip2 cairo ccache cdr clamav cli cracklib crypt dbus dedicated directfb dlloader dts dvd dvdr dvdread eds emboss encode esd fbcon ffmpeg firefox flac flash fortran ftp gb gcj gdbm gif gnome gnutls gpm gstreamer gtk gtk2 gtkhtml hal iconv icq imap isdnlog jabber java javascript jbig joystick jpeg jpeg2k libg++ mad matroska mikmod mime mmx mp3 mpeg msn mysql ncurses ncursesnls nfs nls nptl nptlonly nsplugin nvidia ogg openal opengl oscar oss pam pcre pdf perl php png ppds pppd profile python qt3 qt4 quicktime readline reflection samba sasl sdl session spamassassin speex spell spl sse ssl svg symlink tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb vhosts videos vim-syntax vorbis wifi win32codecs wmf wxwindows x264 x86 xcomposite xine xml xorg xv xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lónyai Gergely 2007-01-21 11:53:48 UTC
Created attachment 107660 [details]
complete build log
Comment 2 jacopo lamanna 2007-01-31 11:13:41 UTC
I had the same problem.
I solved it hacking all .asm file in src/hermes this way:

%ifidn __OUTPUT_FORMAT__,elf
section ".note.GNU-stack" noalloc noexec nowrite progbits
%endif
%ifidn __YASM_OBJFMT__,elf
section ".note.GNU-stack" noalloc noexec nowrite progbits
%endif

These lines are at the end of every file.
I put "" at the section .note.GNU-stack. Maybe the first ifidn returns true, as far as in my case it uses yasm to compile.
I doesn't know the real meaning of it, so I can't assure it is good, but now it doesn't return any error.
I'm waiting for explanations.
Comment 3 Pablo De Nápoli 2007-02-20 13:14:54 UTC
I'm having the same trouble. I'm using
binutils-2.16.1
gcc-4.1.2
yasm-0.5
Comment 4 Pablo De Nápoli 2007-02-20 13:39:03 UTC
I've tried with yasm-0.4 and compilation did work!
(it is caused by something that yasm-0.5 does not 
understand)

This problem is not Gentoo specific, as it is
also reported in

http://www.slacky.it/forum/viewtopic.php?t=17322

by a Slackware user.

I've reported it upstream in

http://bugzilla.libsdl.org/show_bug.cgi?id=393
Comment 5 SpanKY gentoo-dev 2007-02-21 03:06:54 UTC
it's not Gentoo specific because i got the yasm/nasm stuff integrated upstream ;)
Comment 6 James 2007-02-22 15:51:53 UTC
I have the same problem, it builds with yasm-0.4, but not 0.5.  On the libsdl website, I found a patch to the configure.in file, but after manually applying it (It didn't patch cleanly), libsdl still didn't compile.  Downgraded yasm, and it compiled fine.  Maybe someone else can understand that patch better and make it work for us.  Thanx
Comment 7 James 2007-02-22 16:00:25 UTC
(In reply to comment #6)
> I have the same problem, it builds with yasm-0.4, but not 0.5.  On the libsdl
> website, I found a patch to the configure.in file, but after manually applying
> it (It didn't patch cleanly), libsdl still didn't compile.  Downgraded yasm,
> and it compiled fine.  Maybe someone else can understand that patch better and
> make it work for us.  Thanx
> 
that bugzilla website is http://bugzilla.libsdl.org/show_bug.cgi?id=393
They also claim that a later version fixes this.
Comment 8 Pablo De Nápoli 2007-02-22 16:33:54 UTC
The idea of the patch to configure is: if yasm can compile the
code, use yasm; otherwise use nasm
(so it requires nasm to work)
Comment 9 SpanKY gentoo-dev 2007-02-27 14:50:03 UTC
dont bother trying to figure this out ... ive already posted the details of the bug and the fix to the upstream libsdl report
Comment 10 Pablo De Nápoli 2007-03-04 02:22:19 UTC
This seems to be caused by the fact that

"Yasm's bin objfmt does not currently support more than just ".text", ".data", and ".bss" sections. This support was added relatively recently to NASM but Yasm has not implemented this yet."

(a bug reported in yasm bug-tracking system
http://www.tortall.net/projects/yasm/ticket/71)

And this bug is not fixed in yasm-0.6 yet (the fix was delayed to 
yasm-0.7)
Comment 11 Matthias Fölser 2007-03-04 12:13:59 UTC
I recently had the same problem, i just did "emerge -C yasm" and "emerge -1 libsdl" and that did it.
Comment 12 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-05 16:00:53 UTC
Created attachment 112169 [details, diff]
libsdl-1.2.11-no-yasm.patch

PATCH for yasm compile. Uses nasm instead.
Comment 13 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-05 16:02:14 UTC
Created attachment 112171 [details, diff]
libsdl-1.2.11-pagesize.patch

PATCH for linux-headers-2.6.20-r1 compile, see BUG #169388
Comment 14 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-05 16:05:00 UTC
Created attachment 112173 [details]
libsdl-1.2.11-r1.ebuild

Ebuild for no-yasm and pagesize patch. Compiles for me. Please test. Fixes BUG #169388 (media-libs/libsdl fails to compile w/ linux-headers-2.6.20) also.
Comment 15 Michael Evans 2007-03-06 20:59:47 UTC
Created attachment 112324 [details, diff]
Fixed pagefile patch for working with all the other patches in the -r1 ebuild in this thread.

The previous patch did not work for me... it looks like one of the other patches already fixed it (I grabbed every patch from the revised -r1 ebuild).
Comment 16 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-06 22:14:44 UTC
(In reply to comment #15)
> Created an attachment (id=112324) [edit]
> Fixed pagefile patch for working with all the other patches in the -r1 ebuild
> in this thread.
> 
> The previous patch did not work for me... it looks like one of the other
> patches already fixed it (I grabbed every patch from the revised -r1 ebuild).

The reason my previous patch didn't work for you is that the pagesize stuff, BUG #169388 was fixed without a version bump:
[Mon Mar 5 2007] [17:47:18] <CIA-1>     03vapier * 10gentoo-x86/media-libs/libsdl/ (4 files in 2 dirs):
[Mon Mar 5 2007] [17:47:18] <CIA-1>     Backport some fixes from upstream to support building without asm/page.h #169388 by merwan kashouty.
[Mon Mar 5 2007] [17:47:18] <CIA-1>     (Portage version: 2.1.2-r14)

The patch you're using just removes any mention of page.h. I dropped it. For me, it builds without it. I'm currently using the ebuild and patches in BUG #169477
Comment 17 Sheldon Hearn 2007-03-09 13:47:15 UTC
Hmmm, bit of a mess.

To get this to work, I had to:

1) Use your libsdl-1.2.11-no-yasm.patch.
2) Ignore your pagesize patches, using the patch from bug #159923 instead, installed as libsdl-1.2.11-linux-headers.patch.
3) Modify your libsdl-1.2.11-r1.ebuild to use libsdl-1.2.11-linux-headers.patch but not libsdl-1.2.11-pagesize.patch.

Peter, perhaps you could obsolete your patches and ebuilds with fresh ones that work out of the box?
Comment 18 Peter Gerassimoff 2007-03-11 15:08:21 UTC
Simpler fix is to 
cp /usr/bin/yasm /usr/bin/yasm50
rm /usr/bin/yasm
ln -s /usr/bin/nasm /usr/bin/yasm
emerge libsdl
rm /usr/bin/yasm
ln -s /usr/bin/yasm50 /usr/bin/yasm

worked for me

hal distfiles # emerge --info libsdl
Portage 2.1.2.2 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.5-r0, 2.6.17-gentoo-r7 i686)
=================================================================
                        System Settings
=================================================================
System uname: 2.6.17-gentoo-r7 i686 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 11 Mar 2007 02:20:01 +0000
dev-java/java-config: 1.3.0-r2, 2.0.26-r4
dev-lang/python:     2.2.3-r5, 2.3.5, 2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.4.19-r1, 2.6.20-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/terminfo"
CXXFLAGS="-march=athlon64 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ ftp://ibiblio.org/pub/linux/distributions/gentoo/ http://adelie.polymtl.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X a52 alsa apache2 apm arts avi berkdb bitmap-fonts cdr cli cracklib crypt cups dri dts dvd dvdr eds emboss encode esd faad ffmpeg fftw flac foomaticdb fortran ftp gcc:d gdbm gif gnome gpm gstreamer gtk gtk2 iconv imlib ipv6 isdnlog jpeg kde libg++ libwww mad midi mikmod mmx motif mp3 mpeg mysql ncurses nls nocd nptl nptlonly nvidia ogg opengl oss pam pcre pdflib perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session sox speex spell spl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts usb vorbis win32codecs x86 xine xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

 
Comment 19 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-11 16:10:44 UTC
(In reply to comment #17)
 
> Peter, perhaps you could obsolete your patches and ebuilds with fresh ones that
> work out of the box?

wget http://bugs.gentoo.org/attachment.cgi?id=112169&&sed -i -r "s/151991$/151991\n\tepatch \"\$\{FILESDIR\}\"\/\$\{P\}-no-yasm\.patch \#169388/" /usr/portage/media-libs/libsdl/libsdl-1.2.11-r1.ebuild&&cp ./attachment.cgi\?id\=112169 /usr/portage/media-libs/libsdl/files/libsdl-1.2.11-no-yasm.patch&& ebuild /usr/portage/media-libs/libsdl/libsdl-1.2.11-r1.ebuild manifest&&emerge -1 libsdl

This one-liner should work. Check that you've copied it correctly before applying. If run more than once, there will be two lines. This can be fixed thus:
sed -i -r "/169388/d" /usr/portage/media-libs/libsdl/libsdl-1.2.11-r1.ebuild
Comment 20 Peter Alfredsen (RETIRED) gentoo-dev 2007-03-11 16:21:00 UTC
BTW, I really think this patch should be committed. Yasm won't be ready for libsdl before 0.7:
http://www.tortall.net/projects/yasm/ticket/71
On top of that, as I pointed out in BUG
#169477, that libsdl uses Yasm at all is a spurious dependency. It depends on NASM, not yasm.
Comment 21 SpanKY gentoo-dev 2007-03-20 02:41:36 UTC
Comment on attachment 112169 [details, diff]
libsdl-1.2.11-no-yasm.patch

this is wrong as i noted already
Comment 22 SpanKY gentoo-dev 2007-03-20 02:41:53 UTC
Comment on attachment 112171 [details, diff]
libsdl-1.2.11-pagesize.patch

this has nothing at all to do with this bug report
Comment 23 SpanKY gentoo-dev 2007-03-20 02:42:21 UTC
Comment on attachment 112324 [details, diff]
Fixed pagefile patch for working with all the other patches in the -r1 ebuild in this thread.

has nothing to do with this bug report
Comment 24 SpanKY gentoo-dev 2007-03-20 02:50:23 UTC
added the patch i sent upstream to the 1.2.11-r1 ebuild