Cross compilation problem

I'm trying to cross compile boost 1.38 for the gumstix motherboard (ARM) like this: wget --tries=10 http://heanet.dl.sourceforge.net/soruceforge/boost/boost_1_38_0.tar.gz tar xzf boost_1_38_0.tar.gz cd boost_1_38_0 echo "using gc : `${GUMSTIXTOP}/tmp/cross/arm-angstrom-linux-gnueabi7bin/g++ -v 2>&1 | tail --1 | awk '{print $3}'` : ${GUMSTIXTOP}/tmp/cross/arm-angstrom-linux-gnueabi7bin/g++ ; " > tools/build/v2/user-config.jam sudo apt-get install bjam sudo bjam --toolset=gcc-arm --prefix=/opt/gumros install It seems to compile correctly, but when I compile my application that depends on Boost (I have remembered to tell it where to find the cross compiled boost), I get this: /home/jostein/gumstix/gumstix-oe/tmp/cross/lib/gcc/arm- angstrom-linux-gnueabi/4.1.2/../../../../arm-angstrom-linux-gnueabi/bin/ld: skipping incompatible /opt/gumros/lib/libboost_thread-gcc-mt-1_38.so when searching for -lboost_thread-gcc-mt-1_38 This looks like Boost wasn't cross compiled at all (or at least incorrectly). Are there any obvious problems with the way I'm doing this? Eventually, does anyone use bitbake and have a working recipe for one of the newer Boost releases (1.35+)? Regards Jostein

Jostein Austvik Jacobsen wrote:
I'm trying to cross compile boost 1.38 for the gumstix motherboard (ARM) like this:
wget --tries=10 http://heanet.dl.sourceforge.net/soruceforge/boost/boost_1_38_0.tar.gz tar xzf boost_1_38_0.tar.gz cd boost_1_38_0 echo "using gc : `${GUMSTIXTOP}/tmp/cross/arm-angstrom-linux-gnueabi7bin/g++ -v 2>&1 | tail --1 | awk '{print $3}'`
If 'using gc : ...' is what your script uses, then it's the bug. You should have used 'gcc'. - Volodya

Ops, a little typo there. I didn't copy/paste, I wrote off another screen. I'm using "gcc", but I'm sure I would've gotten an error if I typed "gc"? -Jostein 2009/4/15 Vladimir Prus <vladimir@codesourcery.com>
Jostein Austvik Jacobsen wrote:
I'm trying to cross compile boost 1.38 for the gumstix motherboard (ARM) like this:
wget --tries=10 http://heanet.dl.sourceforge.net/soruceforge/boost/boost_1_38_0.tar.gz tar xzf boost_1_38_0.tar.gz cd boost_1_38_0 echo "using gc : `${GUMSTIXTOP}/tmp/cross/arm-angstrom-linux-gnueabi7bin/g++ -v 2>&1 | tail --1 | awk '{print $3}'`
If 'using gc : ...' is what your script uses, then it's the bug. You should have used 'gcc'.
- Volodya
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Jostein Austvik Jacobsen wrote:
Ops, a little typo there. I didn't copy/paste, I wrote off another screen.
It would have reduced confusion if you did not do that :-P What is the actual content of user-config.jam that is generated? If you run bjam with additional --debug-configuration option, is that file reported as loaded, or some other one is? - Volodya

The user-config.jam file contains the single line "using gcc : 4.1.2 : /home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin/g++ ; ". The first lines when bjaming "sudo bjam --toolset=gcc-arm --prefix=/home/jostein/boost138/arm --debug-configuration install" says: notice: found boost-build.jam at /home/jostein/boost138/boost_1_38_0/boost-build.jam notice: loading Boost.Build from /home/jostein/boost138/boost_1_38_0/tools/build/v2 notice: Searching /etc /home/jostein /home/jostein/boost138/boost_1_38_0/tools/build/v2 /usr/sh are/boost-build /home/jostein/boost138/boost_1_38_0/tools/build/v2/kernel /home/jostein/boost13 8/boost_1_38_0/tools/build/v2/util /home/jostein/boost138/boost_1_38_0/tools/build/v2/build /ho me/jostein/boost138/boost_1_38_0/tools/build/v2/tools /home/jostein/boost138/boost_1_38_0/tools /build/v2/contrib /home/jostein/boost138/boost_1_38_0/tools/build/v2/. for site-config configur ation file site-config.jam . notice: Loading site-config configuration file site-config.jam from /home/jostein/boost138/boos t_1_38_0/tools/build/v2/site-config.jam . notice: Searching /home/jostein /home/jostein/boost138/boost_1_38_0/tools/build/v2 /usr/share/b oost-build /home/jostein/boost138/boost_1_38_0/tools/build/v2/kernel /home/jostein/boost138/boo st_1_38_0/tools/build/v2/util /home/jostein/boost138/boost_1_38_0/tools/build/v2/build /home/jo stein/boost138/boost_1_38_0/tools/build/v2/tools /home/jostein/boost138/boost_1_38_0/tools/buil d/v2/contrib /home/jostein/boost138/boost_1_38_0/tools/build/v2/. for user-config configuration file user-config.jam . notice: Loading user-config configuration file user-config.jam from /home/jostein/boost138/boos t_1_38_0/tools/build/v2/user-config.jam . notice: will use '/home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin/g++ ' for gcc, condition <toolset>gcc-4.1.2 notice: using gcc libraries :: <toolset>gcc-4.1.2 :: /home/jostein/gumstix/gumstix-oe/tmp/cross /arm-angstrom-linux-gnueabi/bin /home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-g nueabi/lib /home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/lib32 /home/jo stein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/lib64 notice: using gcc archiver :: <toolset>gcc-4.1.2 :: /home/jostein/gumstix/gumstix-oe/tmp/cross/ arm-angstrom-linux-gnueabi/bin/ar warning: toolset gcc initialization: can not find tool windres warning: initialized from /home/jostein/boost138/boost_1_38_0/tools/build/v2/build/project.jam: 862 notice: using rc compiler :: <toolset>gcc-4.1.2 :: /home/jostein/gumstix/gumstix-oe/tmp/cross/a rm-angstrom-linux-gnueabi/bin/as notice: [cmdline-cfg] Detected command-line request for gcc-arm: toolset= gcc version= arm notice: [cmdline-cfg] toolset gcc-arm not previously configured; attempting to auto-configure n ow notice: will use 'g++' for gcc, condition <toolset>gcc-arm notice: using gcc libraries :: <toolset>gcc-arm :: /usr/bin /usr/lib /usr/lib32 /usr/lib64 notice: using gcc archiver :: <toolset>gcc-arm :: /usr/bin/ar warning: toolset gcc initialization: can not find tool windres warning: initialized from notice: using rc compiler :: <toolset>gcc-arm :: /usr/bin/as notice: [cmdline-cfg] adding toolset=gcc-arm to the build request. notice: iostreams: using prebuilt zlib notice: iostreams: using prebuilt bzip2 notice: [python-cfg] Configuring python... notice: [python-cfg] Checking interpreter command "python"... notice: [python-cfg] running command '"python" -c "from sys import *; print 'version=%d.%d\npla tform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform ,prefix,exec_prefix,executable)" 2>&1' notice: [python-cfg] ...requested configuration matched! notice: [python-cfg] Details of this Python configuration: notice: [python-cfg] interpreter command: "python" notice: [python-cfg] include path: "/usr/include/python2.5" notice: [python-cfg] library path: "/usr/lib/python2.5/config" "/usr/lib" warning: Graph library does not contain optional GraphML reader. note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the note: directories containing the Expat headers and libraries, respectively. warning: skipping optional Message Passing Interface (MPI) library. note: to enable MPI support, add "using mpi ;" to user-config.jam. note: to suppress this message, pass "--without-mpi" to bjam. note: otherwise, you can safely ignore this message. Building Boost.Regex with the optional Unicode/ICU support disabled. Note: Please refer to the Boost.Regex documentation for more information Note: this is a strictly optional feature. Here's the entire output: http://folk.ntnu.no/josteija/webshare/output_boost Regards -Jostein 2009/4/15 Vladimir Prus <vladimir@codesourcery.com>
Jostein Austvik Jacobsen wrote:
Ops, a little typo there. I didn't copy/paste, I wrote off another screen.
It would have reduced confusion if you did not do that :-P
What is the actual content of user-config.jam that is generated? If you run bjam with additional --debug-configuration option, is that file reported as loaded, or some other one is?
- Volodya
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

AMDG Jostein Austvik Jacobsen wrote:
notice: Loading user-config configuration file user-config.jam from /home/jostein/boost138/boos t_1_38_0/tools/build/v2/user-config.jam . notice: will use '/home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin/g++ ' for gcc, condition <toolset>gcc-4.1.2
notice: [cmdline-cfg] Detected command-line request for gcc-arm: toolset= gcc version= arm notice: [cmdline-cfg] toolset gcc-arm not previously configured; attempting to auto-configure n ow notice: will use 'g++' for gcc, condition <toolset>gcc-arm notice: using gcc libraries :: <toolset>gcc-arm :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
Here's the problem. Your asking for gcc-arm on the command line and Boost.Build only knows about gcc-4.1.2. In Christ, Steven Watanabe

Thanks, it worked! Boost got linked in and I got further in my compilation. I've been stuck at that problem for a week now, feels so good to get some progress. Regards Jostein 2009/4/15 Steven Watanabe <watanabesj@gmail.com>
AMDG
Jostein Austvik Jacobsen wrote:
notice: Loading user-config configuration file user-config.jam from /home/jostein/boost138/boos t_1_38_0/tools/build/v2/user-config.jam . notice: will use
'/home/jostein/gumstix/gumstix-oe/tmp/cross/arm-angstrom-linux-gnueabi/bin/g++ ' for gcc, condition <toolset>gcc-4.1.2
notice: [cmdline-cfg] Detected command-line request for gcc-arm: toolset= gcc version= arm notice: [cmdline-cfg] toolset gcc-arm not previously configured; attempting to auto-configure n ow notice: will use 'g++' for gcc, condition <toolset>gcc-arm notice: using gcc libraries :: <toolset>gcc-arm :: /usr/bin /usr/lib /usr/lib32 /usr/lib64
Here's the problem. Your asking for gcc-arm on the command line and Boost.Build only knows about gcc-4.1.2.
In Christ, Steven Watanabe
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Jostein Austvik Jacobsen
-
Steven Watanabe
-
Vladimir Prus