[Scummvm-devel] Cross-Compiling issues
Klaus Reimer
k at ailis.de
Sat May 7 17:41:03 CEST 2011
Hello,
I guess here are quite a lot people who are familiar with
cross-compiling so I hope someone can give me some insight on a problem
I'm having with cross-compiling ScummVM for the WebOS platform.
Currently there are two operating system version to support: WebOS 2.0
and WebOS 1.4.5.
Palm suggests using the CodeSourcery Toolchain version 2009q1-203 which
uses GCC 4.3. When compiling ScummVM with this toolchain then no
warnings are printed and ScummVM works on WebOS 2.0 but not on WebOS
1.4.5. I get the following errors when ScummVM starts (I have shortened
them a bit):
libagi.so: libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found
libagos.so: libgcc_s.so.1: version `GCC_4.3.0' not found
There are more of these errors for all the other plugins but always with
these two "version not found" messages.
Because of this problem I currently use CodeSourcery Toolchain version
2007q3-51 which uses GCC 4.2 (And the resulting ScummVM works fine on
both OS versions) but this toolchain has a bug and prints lots of false
warnings during compilation which is pretty ugly for buildbot. Therefor
it would be nice to use the newer toolchain instead.
Unfortunately I'm a cross-compiling noob. Any hints how I could tell the
newer toolchain to create binaries which are working on the older WebOS
version? My guess is that the compiler links to the wrong libraries.
There are five libstdc++.so.6 files in the WebOS PDK for example:
$ find . -name libstdc++.so.6 | while read f; do echo "$f:"; strings $f
| grep CXXABI; done
./arm-gcc/sysroot/usr/lib/libstdc++.so.6:
CXXABI_1.3
CXXABI_1.3.1
./arm-gcc/arm-none-linux-gnueabi/libc/thumb2/usr/lib/libstdc++.so.6:
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_ARM_1.3.3
./arm-gcc/arm-none-linux-gnueabi/libc/usr/lib/libstdc++.so.6:
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_ARM_1.3.3
./arm-gcc/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libstdc++.so.6:
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_ARM_1.3.3
./device/lib/libstdc++.so.6:
CXXABI_1.3
CXXABI_1.3.1
The libraries in /arm-gcc/sysroot and /device are provided by Palm, the
others are coming with the Toolchain. I guess when ScummVM is linked
against the libraries in /arm-gcc/sysroot, then it should work, but for
some reason the compiler always uses one of the libs coming from the
toolchain (Which contains this CXXABI_ARM_* version which is not
supported by the device).
The configure script contains this line to set the sysroot:
LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
Is there anything else I have to specify to link against the correct
libraries? Or is it possible to specify which ABI version to use during
compilation? It looks like the libraries provided by the toolchain also
provide the correct ABI versions (1.3 and 1.3.1) so why is it using
CXXABI_ARM_1.3.3?
Another thing I don't understand is why this only affects the plugins.
The ScummVM binary itself works. Only the plugins can't be loaded. And
when I compile ScummVM without the "--default-dynamic" parameter then
everything works fine.
--
Bye, K <http://www.ailis.de/~k/>
[A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391]
(Finger k at ailis.de to get public key)
More information about the Scummvm-devel
mailing list