Successful compilation on 64-bit Ubuntu

238 views
Skip to first unread message

David Beswick

unread,
Jan 2, 2011, 9:55:08 PM1/2/11
to Syndicate Wars Port
Hi all, swars didn't configure for me straight out of the box, giving
me an error message about swars only working on x86 processors. I have
an AMD X6 Phenom running 64-bit Ubuntu. I had to use the following
configure call:

CFLAGS=-m32 LDFLAGS=-L/usr/lib32 ./configure

Additionally, the first time I tried this call I got another message
about 32-bit SDL not being present. I actually did seem to have 32-bit
SDL in my /usr/lib32 path, but I only had symlinks for the file
libSDL-1.2.so and not for libSDL.so. I tried various flags to manually
specify libSDL-1.2, but I couldn't get it work and so just added the
libSDL.so symlink. It configured and compiled fine from there and now
runs without issue. I guess this is a configuration issue with Ubuntu.

I don't know my way around autotools very well -- If anyone would like
to suggest possible fixes that would save those with a similar
configuration from doing this in future I'd be happy to implement and
try them out.

Thanks to the developers for their work on this, I had a lot of fun
playing the game again.

David

Unavowed

unread,
Jan 29, 2011, 3:53:46 PM1/29/11
to syndicate...@googlegroups.com

It's good to hear that you like the port and that you managed to compile it.

Mixed 32-bit/64-bit systems are something of a mess. I think the
autoconf SDL script runs sdl-config to get the flags. I'm not sure if
there are two of them, one for each architecture.

Our configure script looks for libraries in their default paths, uses
pkg-config and sdl-config. To get it to work correctly on a
non-standard system, it would have to know where to find sdl-config, .pc
files and be pointed to the right library directory. It's possible to
achieve this by setting the right PATH, PKG_CONFIG_PATH, CFLAGS/LDFLAGS;
for some dependencies it's also possible to pass parameters to configure.

Also, maybe ./configure --target=i686-linux-gnu would be cleaner than
adding -m32 to CFLAGS, but as long as it works, it shouldn't make a
difference.

I think that it's not practical to hard-code these settings in the
configure script for every problematic system, it's best to leave the
burden on the person compiling the game. Still, maybe we could make a
page with compiling instructions for others who have the same problem,
if there is sufficient demand for such a thing.
--
Unavowed

Unavowed

unread,
Jan 29, 2011, 5:03:01 PM1/29/11
to syndicate...@googlegroups.com
On 29/01/11 20:53, Unavowed wrote:
> Also, maybe ./configure --target=i686-linux-gnu would be cleaner than
> adding -m32 to CFLAGS, but as long as it works, it shouldn't make a
> difference.

That should have said ./configure --host=i686-linux-gnu
--
Unavowed

hay...@gmail.com

unread,
Apr 28, 2013, 2:21:47 PM4/28/13
to syndicate...@googlegroups.com
Apologies for replying to such an old post here but this might make things a bit simpler for those using x86_64.

I had this installed on my 32bit system until a couple of years ago when I went to 64bit.  I use Linux, Ubuntu in this case but I don't think it'll matter.

I've just attempted to compile for x86_64 (using ia32libs) but in my ten minutes of trying had no success :)

So I just thought I'd try connecting up the hard drive from my old PC and copying the whole thing across.

It worked like a charm!

I copied the whole /usr/share/local/swars folder.  Then just the /usr/share/bin/swars executable and it runs.

So an option for people until someone makes a working 64bit config script is to compile on a 32bit machine if you have access to one and then copy across.  Or even use qemu or similar (although I've not tried that myself).

You'll need the data from the original CD too of course.

cheers,
Paul.


hay...@gmail.com

unread,
Apr 28, 2013, 2:33:20 PM4/28/13
to syndicate...@googlegroups.com, hay...@gmail.com
p.s. if you had any save games you need to copy /home/#username#/.config/swars folder too.  Replacing #username# with your home folder name of course!
Reply all
Reply to author
Forward
0 new messages