Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsdl-1.2.11 fails to build with yasm-0.5.0 #275

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

libsdl-1.2.11 fails to build with yasm-0.5.0 #275

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 1.2.11
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2007-02-20 08:35:58 +0000, Pablo De Napoli wrote:

I'm having problems with building libdsl-1.2.11-r1
from the sources
(using Gentoo ebuild)
[also I've tried compiling the sources in svn
by hand, it didn't work either]

./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

The problem is caused by the lines

%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

at the end of every .asm file
(it seems that there is something that yasm-0.5
does not understand)

The problem is described is also reported by
someone else in the Gentoo bug tracking system

http://bugs.gentoo.org/show_bug.cgi?id=16305

I'm using binutils-2.16.1 gcc-4.1.2
yasm-0.5
[however, it compilation did work with yasm-0.4]

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.

On 2007-02-20 15:51:56 +0000, Ryan C. Gordon wrote:

Adding Mike Frysinger to the CC list for this bug, since he's our resident Gentoo ninja (and possibly wrote the yasm code in SDL, too.)

This was on an x86, right? (maybe amd64?)

--ryan.

On 2007-02-20 21:45:50 +0000, Pablo De Napoli wrote:

yes, it is on an x86 (AMD athlon) machine

On 2007-02-20 22:03:33 +0000, Mike Frysinger wrote:

the problem is that older yasm's did not respect OUTPUT_FORMAT ... i asked yasm guys to output that to be compatible with nasm and they did, but then we hit the problem where nasm accepts things like dots and dashes in the section name without being quoted but yasm does not

upstream yasm has fixed this for their next version, but for 0.5.0 the syntax has to be:
.section ".note.GNU-stack" ...

i could tweak the test in configure.in so that if yasm is found but it fails to compile this:
%ifidn OUTPUT_FORMAT,elf
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
we fall back to using nasm

On 2007-02-20 22:29:33 +0000, Mike Frysinger wrote:

Created attachment 192
sdl-yasm-sections.patch

this should do it nicely i think

On 2007-06-02 13:59:00 +0000, Ryan C. Gordon wrote:

Bumping a bunch of bugs to Priority 1 for consideration for the 1.2.12 release.

--ryan.

On 2007-06-04 04:08:57 +0000, Ryan C. Gordon wrote:

Fixed in svn revision # 3043 for the 1.2 branch and # 3044 for the 1.3 branch.

Thanks!

--ryan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant