Game Development Community

Link error while building torque in 32bit on AMD64

by Jack Vice · in Torque Game Engine · 03/16/2005 (7:58 pm) · 5 replies

From reading forums I've gotten it to compile but now link error :(

[jvice@localhost Torque]$ make
/usr/bin/ld: Warning: size of symbol 'BitStream::BitStream(void*, int, int)' changed from 84 in out.GCC3.DEBUG/core/bitStream.obj to 122 in out.GCC3.DEBUG/core/dnet.obj
../lib/vorbis/linux/libogg.so.0: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [out.GCC3.DEBUG/torqueDemo_DEBUG.bin] Error 1
make: *** [default] Error 2

The 'size of symbol' warning makes me wonder about 64bit libs mucking things up so I'll start checking into that.

#1
03/16/2005 (8:15 pm)
You are on the right track--you'll need to make sure you link in the 32 bit versions of the libs, not the 64 bit ones that are probably installed as default.
#2
03/16/2005 (8:23 pm)
From what I can tell it seems that 32 bit libs should link by default and 64 explicit on my fedora core 3 installation.
I have the following:
/lib
/lib64
/usr/lib
/usr/lib64
#3
03/16/2005 (8:37 pm)
It appears that libogg.so.0 is in Torque/lib/vorbis/linux which appears to be a 32 bit download, not local compile:
-rw-r--r-- 1 jvice jvice 13732 Jan 28 15:21 libogg.so.0
-rw-r--r-- 1 jvice jvice 133368 Jan 28 15:21 libvorbis.so.0
#4
03/19/2005 (1:58 pm)
What I did to resolve this:

link against the system versions (mk/conf.UNIX.mk look for the VORBIS block)

you'll need libogg and libvorbis-devel packages.

On the server we have they have both the 32bit and 64bit versions installed _however_ the 32bit versions are missing a symlink so you may or may not need to make said link(s). If you get it complianing about incompatible formats of /usr/lib64/libogg.so do the following:

ln -s /usr/lib/libogg.so.0.0 /usr/lib/libogg.so
ln -s /usr/lib/libvorbis.so.0.0 /usr/lib/libvorbis.so

That should appease ld and get you linked up.
#5
03/20/2005 (9:13 pm)
Gregory,

Yep, worked, thanks a bunch!