Compiling libsd-1.2.12 (SVN) on Solaris 10/x86 (64-bit)

This is my first time building on a 64-bit x86-64 platform, so I apologize if my
question seems a bit uninformed (A friend is giving me access to his system
to test some other code for 64-bit, and I need libsdl).

I can configure and compile libsdl. However, in the link phase, I get an
error on the objects in src/hermes, because nasm is buildling them as
32-bit ELF and not 64-bit ELF. I’ve googled and gmane-d and can’t seem
to find any hints. I can see that some folks (SuSE, Fedora, Gentoo) have
64-bit ports working, so getting this working doesn’t sound terribly difficult.

Anyone have some thoughts? Are there some flags I need to pass to nasm
to generate 64-bit objects, or do I need to disable the hermes asm?

Thanks,

Ben

You’ll need to disable that stuff. None of it applies to the AMD64
architecture as the source files specifically say that they are 32-bit
code. In addition, MMX and 3DNow! are not supported on AMD64 (64-bit
long mode). All of their functionality has been superseded by the stuff
in SSE1,2,3.

I think --disable-nasm to the configure script will do it.On Wed, 2007-05-16 at 14:54 +0000, Ben Taylor wrote:

This is my first time building on a 64-bit x86-64 platform, so I apologize if my
question seems a bit uninformed (A friend is giving me access to his system
to test some other code for 64-bit, and I need libsdl).

I can configure and compile libsdl. However, in the link phase, I get an
error on the objects in src/hermes, because nasm is buildling them as
32-bit ELF and not 64-bit ELF. I’ve googled and gmane-d and can’t seem
to find any hints. I can see that some folks (SuSE, Fedora, Gentoo) have
64-bit ports working, so getting this working doesn’t sound terribly difficult.

Anyone have some thoughts? Are there some flags I need to pass to nasm
to generate 64-bit objects, or do I need to disable the hermes asm?

Thanks,

Ben


Coleman Kane

Anyone have some thoughts? Are there some flags I need to pass to nasm
to generate 64-bit objects, or do I need to disable the hermes asm?

You need to disable Hermes, but it should have done that for you when it
found something other than a 32-bit x86 platform.

Near the start of the ./configure script’s run, it should output a line
like this:

checking host system type… x86_64-unknown-linux-gnu

What does that “x86_64-unknown-linux-gnu” part say on 64-bit Solaris?

–ryan.

Anyone have some thoughts? Are there some flags I need to pass to nasm
to generate 64-bit objects, or do I need to disable the hermes asm?

You need to disable Hermes, but it should have done that for you when it
found something other than a 32-bit x86 platform.

Well, given the host system type, it seems that autoconf may not
be able to distinguish between a i386 and x86_64 solaris system.

Near the start of the ./configure script’s run, it should output a line
like this:

checking host system type… x86_64-unknown-linux-gnu

What does that “x86_64-unknown-linux-gnu” part say on 64-bit Solaris?

checking host system type… i386-pc-solaris2.10

I use isainfo to figure out whether I’m actually x86_64 or i386 for
some other code, but in the meantime, the --disable-nasm worked fine
in compiling libSDL 64-bit for solaris. I’m working on the port of
the application to make sure it all works, but I’m not finished yet.

Regards,

Ben-------------- Original message ----------------------
From: icculus@icculus.org (icculus)

Well, given the host system type, it seems that autoconf may not
be able to distinguish between a i386 and x86_64 solaris system.

It appears so, but I have no idea how to actually fix that. Any autoconf
experts here?

–ryan.

Well, given the host system type, it seems that autoconf may not
be able to distinguish between a i386 and x86_64 solaris system.

It appears so, but I have no idea how to actually fix that. Any autoconf
experts here?

Actually, I’ve had to play with autoconf for wine for Solaris, so I
might be able to figure something out.

One of the things that one of my co-developers has done is
setting up a 32 and 64-bit solaris install for libsdl.

So he used the same prefix, but then overloaded the
bindir and libdir (like --prefix=/usr/gnu --bindir=/usr/gnu/bin/amd64
–libdir=/usr/gnu/lib/amd64) so that the right sdl-config can
be picked up. The only thing I’m wondering about is whether
it is appropriate for the 64-bit version to be adding “-m64” to
the output of “sdl-config —cflags” and “sdl-config --libs”.

It would sure make things simpler. Thoughts?

Ben-------------- Original message ----------------------
From: icculus@icculus.org (icculus)