Problem with cross-compiling XBMC
#1
Hi

i'm trying to cross-compile XBMC for my freescale board using openembedded build system,
It seems that configure step goes well, but when it starts to compile build-in libraries, it fails to find correct version of *.so libraries (for example, it trtes to use /use/lib/libz.so from my host system). Because I'm not so goodr with GNU build system, I can not solve this issue myself.
Here is steps and log files

1. First i run bitbake -c devshell xbmc to go into debug console to reproduce all steps by myself
2. then run bootstrap.angstrom from "xbmc for beagleboard" project. No errors LOG
3. Then run configure . LOG
4. then run "make". This step fails. FULL_LOG (1.1 M)
here few last lines
Code:
/bin/sh ./libtool --tag=CC   --mode=link arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi  -Wall -ggdb2 -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_DEBUG -Wa,-march=armv7a  -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -g -O2 -version-info 3:0:3 -Wl,-O1 -Wl,--hash-style=gnu -o libid3tag.la -rpath /home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib version.lo ucs4.lo latin1.lo utf16.lo utf8.lo parse.lo render.lo field.lo frametype.lo compat.lo genre.lo frame.lo crc.lo util.lo tag.lo file.lo metadata.lo   -lz
libtool: link: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi -shared  .libs/version.o .libs/ucs4.o .libs/latin1.o .libs/utf16.o .libs/utf8.o .libs/parse.o .libs/render.o .libs/field.o .libs/frametype.o .libs/compat.o .libs/genre.o .libs/frame.o .libs/crc.o .libs/util.o .libs/tag.o .libs/file.o .libs/metadata.o   /usr/lib/libz.so  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -Wl,-O1 -Wl,--hash-style=gnu   -Wl,-soname -Wl,libid3tag.so.0 -o .libs/libid3tag.so.0.3.0
/usr/lib/libz.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[4]: *** [libid3tag.la] Error 1
make[4]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[1]: *** [libid3tag/.libs/libid3tag.so] Error 2
make[1]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag'
make: *** [libid3tag] Error 2

As I see, for some reason, build system try to use libraries from my host system. How this can happen and how it can be avoided? Please give some advice.

Thank you.
Reply
#2
kurtis99 Wrote:Hi

i'm trying to cross-compile XBMC for my freescale board using openembedded build system,
It seems that configure step goes well, but when it starts to compile build-in libraries, it fails to find correct version of *.so libraries (for example, it trtes to use /use/lib/libz.so from my host system). Because I'm not so goodr with GNU build system, I can not solve this issue myself.
Here is steps and log files

1. First i run bitbake -c devshell xbmc to go into debug console to reproduce all steps by myself
2. then run bootstrap.angstrom from "xbmc for beagleboard" project. No errors LOG
3. Then run configure . LOG
4. then run "make". This step fails. FULL_LOG (1.1 M)
here few last lines
Code:
/bin/sh ./libtool --tag=CC   --mode=link arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi  -Wall -ggdb2 -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_DEBUG -Wa,-march=armv7a  -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -g -O2 -version-info 3:0:3 -Wl,-O1 -Wl,--hash-style=gnu -o libid3tag.la -rpath /home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib version.lo ucs4.lo latin1.lo utf16.lo utf8.lo parse.lo render.lo field.lo frametype.lo compat.lo genre.lo frame.lo crc.lo util.lo tag.lo file.lo metadata.lo   -lz
libtool: link: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi -shared  .libs/version.o .libs/ucs4.o .libs/latin1.o .libs/utf16.o .libs/utf8.o .libs/parse.o .libs/render.o .libs/field.o .libs/frametype.o .libs/compat.o .libs/genre.o .libs/frame.o .libs/crc.o .libs/util.o .libs/tag.o .libs/file.o .libs/metadata.o   /usr/lib/libz.so  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -Wl,-O1 -Wl,--hash-style=gnu   -Wl,-soname -Wl,libid3tag.so.0 -o .libs/libid3tag.so.0.3.0
/usr/lib/libz.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[4]: *** [libid3tag.la] Error 1
make[4]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag/libid3tag'
make[1]: *** [libid3tag/.libs/libid3tag.so] Error 2
make[1]: Leaving directory `/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/work/armv7a-angstrom-linux-gnueabi/xbmc-10.1-r1/xbmc-10.1/xbmc/lib/libid3tag'
make: *** [libid3tag] Error 2

As I see, for some reason, build system try to use libraries from my host system. How this can happen and how it can be avoided? Please give some advice.

Thank you.

Code:
libtool: link: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi -shared  .libs/version.o .libs/ucs4.o .libs/latin1.o .libs/utf16.o .libs/utf8.o .libs/parse.o .libs/render.o .libs/field.o .libs/frametype.o .libs/compat.o .libs/genre.o .libs/frame.o .libs/crc.o .libs/util.o .libs/tag.o .libs/file.o .libs/metadata.o   /usr/lib/libz.so  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -Wl,-O1 -Wl,--hash-style=gnu   -Wl,-soname -Wl,libid3tag.so.0 -o .libs/libid3tag.so.0.3.0
/usr/lib/libz.so: file not recognized: File format not recognized

there are referenzes to " /usr/lib/libz.so" so you must look where this comes from, thats wrong for crosscompiling.

i also see referenzes to "-I/usr/include/lzo" which is wrong too

posting config.log from xbmc dir can maybe help to find some problems
greetings, Stephan

Image

Image
Reply
#3
sraue Wrote:there are referenzes to " /usr/lib/libz.so" so you must look where this comes from, thats wrong for crosscompiling.
Yes, I understand that this is a problem, but I dont know where to look. And it finds some libraries. For example, it found libEGL.so, which is not present on my host system and exist only in my toolchains sysroot.
I thought that it might use my host libtool and this causes this kind of troubles, so i've renamed my host libtool, but probles still remains.

sraue Wrote:i also see referenzes to "-I/usr/include/lzo" which is wrong too
Thanks, will check it.

sraue Wrote:posting config.log from xbmc dir can maybe help to find some problems
Sorry, was going to post it, but forgot)) Here is my config.log
Reply
#4
Problem might be somehow connected with libtool and the way it works. I have a "good" build, where xbmc builds and my current "non-working" build.
Here libtool string for "good" build:
Code:
libtool: link: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/bb/angstrom/setup-scripts/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi -shared  .libs/version.o .libs/ucs4.o .libs/latin1.o .libs/utf16.o .libs/utf8.o .libs/parse.o .libs/render.o .libs/field.o .libs/frametype.o .libs/compat.o .libs/genre.o .libs/frame.o .libs/crc.o .libs/util.o .libs/tag.o .libs/file.o .libs/metadata.o   -Wl,-rpath -Wl,/home/mike/bb/angstrom/setup-scripts/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib /home/mike/bb/angstrom/setup-scripts/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/libz.so  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -Wl,-O1 -Wl,--hash-style=gnu   -Wl,-soname -Wl,libid3tag.so.0 -o .libs/libid3tag.so.0.3.0

and "bad" build
Code:
libtool: link: arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb --sysroot=/home/mike/freescale/angstrom-setup-scripts/build/tmp-angstrom_2010/sysroots/armv7a-angstrom-linux-gnueabi -shared  .libs/version.o .libs/ucs4.o .libs/latin1.o .libs/utf16.o .libs/utf8.o .libs/parse.o .libs/render.o .libs/field.o .libs/frametype.o .libs/compat.o .libs/genre.o .libs/frame.o .libs/crc.o .libs/util.o .libs/tag.o .libs/file.o .libs/metadata.o   /usr/lib/libz.so  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb -mfloat-abi=softfp -mno-apcs-stack-check -mcpu=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -Wl,-O1 -Wl,--hash-style=gnu   -Wl,-soname -Wl,libid3tag.so.0 -o .libs/libid3tag.so.0.3.0

"good" build contains this line:
Code:
-Wl,-rpath
-Wl,/home/mike/bb/angstrom/setup-scripts/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
/home/mike/bb/angstrom/setup-scripts/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib/libz.so

As far as I've understood, this output is generated by libtool, depending on content of sysroot folder.
Reply
#5
Well you're not bootstrapping libid3tag. I'd guess you're using a bootstrapped source.

Why use your own script for that? just run ours. For the configure step, do something like:

./bootstrap
oe_runconf

TheUni
Reply
#6
Thank you for answer

theuni Wrote:Well you're not bootstrapping libid3tag. I'd guess you're using a bootstrapped source.
Sorry, i do not fully understand you. What do you mean by "bootstrapped sources"? I use sources downloaded from xbmc.org and I dont know if they are bootstrapped or not.
Stock bootstrap script from sources do nothing with libid3tag (at least, libid3tag is not mentioned there).

theuni Wrote:Why use your own script for that? just run ours. For the configure step, do something like:

./bootstrap
oe_runconf
I have tried bootstrap.angstrom script from "xbmc-beagleboard" project. Also tried stock bootstrap script. Doesnt work either.

I do not think that there is a problem solely with libid3tag or thje way it is configured. It can happen with cpluff or libass, depends on number of compile threads. For example, when it starts to compile cpluff, build system try to use libexpat from my host system.

One more thing, xbmc builds for angstrom-2008 distro, and fails with angstrom-2010.
Reply
#7
Found one curious thing. In my sysroot, there is file libz.la. It is somehow used by libtool and this file contains string "installed=yes". I looked in libtool script and if "installed" key value is equal to "yes", then it takes libz.so from my host dir. I've changed it to "no" and libid3tag compiled without any problems.
So there is some issues with libtool in openembedded and xbmc has nothing to do with it.
Reply
#8
Libtool causes countless problems for cross. Hate to say, but it could be a million things. Typically build environments like OE do lots of libtool/rpath/etc. sanitizing to be sure that everything is pointing at the staging dir correctly.

I would keep up the search as you've been doing. Compare how the successful libtool runs for other packages differ from ours.

Also, note that many of these build distros use wrappers or their own copies of the autotools stuff. So inheriting some class and letting it run a configure function may give different results than running ./configure.

TheUni
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with cross-compiling XBMC0