Problems compiling SDL on mingw32

I did a few minor changes to SDL_main.c, and all of a sudden, code that shouldn’t (I think) be affected isn’t compiling. I get these errors, and I have no idea how to fix them:
(I double-spaced, incase of line-wrapping, for readability)

.libs/libSDL.lax/libvideo.al/SDL_dibvideo.lo(.text+0x1840): In function `DX5_SoundFocus’:

c:/devlibs/SDL-1.2.6/src/video/windib/SDL_dibvideo.c:999: multiple definition of `DX5_SoundFocus’

.libs/libSDL.lax/libaudio.al/SDL_dx5audio.lo(.text+0x5c0):c:/devlibs/sdl-1.2.6/src/audio/windx5/SDL_dx5audio.c:246: first defined here

c:\mingw\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe: .libs/libSDL.lax/libhermes.al/mmxp2_32.lo: bad reloc address 0x87 in section `.text’

If anyone has any clues, please help.

  • Silicon—
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003

John Silicon wrote:
snip

c:\mingw\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe:
.libs/libSDL.lax/libhermes.al/mmxp2_32.lo: bad reloc address 0x87 in
section `.text’

If anyone has any clues, please help.

  • Silicon

This error is caused by a bug in binutils.
(binutils is the package that contains ld and objdump, and both are broken, the
first refuses to link the .o file, and the second thinks it’s truncated)

I use cygwin, so I had to grab the latest source and build it myself, though you
might be able to find an updated package for mingw32 somewhere.

Check the mailing list archive for references to this problem, "bad reloc"
should find them.

Cheers,
John

That’s weird – I’ve actually compiled SDL before – two weeks ago,
actually, when I started using mingw32.> ----- Original Message -----

From: john@nextraweb.com (John Drinkwater)
To:
Sent: Wednesday, December 03, 2003 1:18 PM
Subject: Re: [SDL] Problems compiling SDL on mingw32

John Silicon wrote:
snip

c:\mingw\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe:

.libs/libSDL.lax/libhermes.al/mmxp2_32.lo: bad reloc address 0x87 in
section `.text’

If anyone has any clues, please help.

  • Silicon

This error is caused by a bug in binutils.
(binutils is the package that contains ld and objdump, and both are
broken, the
first refuses to link the .o file, and the second thinks it’s truncated)

I use cygwin, so I had to grab the latest source and build it myself,
though you
might be able to find an updated package for mingw32 somewhere.

Check the mailing list archive for references to this problem, "bad reloc"
should find them.

Cheers,
John


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003

Ok, toom alot of trial-and error, but finally got it to compile. Strangely
enough, downloading patched binutil’s did not work, as was suggested to be
the problem on this list. However, one slight mention (the single one I can
find on this list) said that “–disable-nasm” would fix the problem – which
turned out to be only half the solution.
An odd thing happens when trying to use “–disable-nsam”: the ./configure
script seems to ignore actual settings, and pull the wrong stuff out of it’s
cache. It is, for some reason, nessecery to delete the cache, and
./configure with BOTH “–disable-nasm” and “–with-gnu-ld” (the latter is
nessecery, because configure wants to use some MSVC++ tools that don’t exist
on my drive). Also, it’s nessecery to do a “mingw32-make clean,” or
everything seems to break (silently during library compile – a problem
occurs when linking the library in to an application).

If anyone with access could kindly add this stuff to
http://www.libsdl.org/extras/win32/mingw32/README.txt, this ordeal might be
avoided in the future.On a side note: How come README.mingw32 isn’t in the source distribution? Silicon Original Message ----- From: john@nextraweb.com (John Drinkwater) To: Sent: Wednesday, December 03, 2003 1:18 PM Subject: Re: [SDL] Problems compiling SDL on mingw32 John Silicon wrote:

snip

c:\mingw\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe:

.libs/libSDL.lax/libhermes.al/mmxp2_32.lo: bad reloc address 0x87 in
section `.text’

If anyone has any clues, please help.

  • Silicon

This error is caused by a bug in binutils.
(binutils is the package that contains ld and objdump, and both are
broken, the
first refuses to link the .o file, and the second thinks it’s truncated)

I use cygwin, so I had to grab the latest source and build it myself,
though you
might be able to find an updated package for mingw32 somewhere.

Check the mailing list archive for references to this problem, "bad reloc"
should find them.

Cheers,
John


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.547 / Virus Database: 340 - Release Date: 12/2/2003