Boost logo

Boost-Build :

Subject: [Boost-build] Cross compiling Windows -> Linux PPC fails
From: Alexander S. van Amesfoort (alexander_at_[hidden])
Date: 2010-10-22 14:11:24


  I'm trying to cross compile Boost 1.44.0 using bjam on Windows XP for
Linux (PPC) using the gcc toolchain.
Object files are being created, but library/archive creation (and ranlib
indexing) fails.

I did the following:

In boost_1_44_0\tools\build\v2\user-config.jam, put:
using gcc : 4.1.1 : powerpc-linux-g++.exe ;
(or same effect:
using gcc : 4.1.1 : g++.exe ;
)

and made sure the following dirs are in my %Path%:
C:\cygwin\opt\cell\toolchain\bin;C:\cygwin\opt\cell\toolchain\powerpc-linux\bin
(and restarted the command prompt to have this path, and checked for
'powerpc-linux-g++' and 'g++')

I ran bjam (just 1 lib for now):
bjam variant=release,debug threading=single link=static
runtime-link=static install --with-date_time > myboostinst.log

This outputs: (is a rebuild so most .o compilations are not redone)

----------
warning: Unable to construct ./install-unversioned
warning: Unable to construct ./install-unversioned

Component configuration:

     - date_time : building
     - filesystem : not building
     - graph : not building
     - graph_parallel : not building
     - iostreams : not building
     - math : not building
     - mpi : not building
     - program_options : not building
     - python : not building
     - random : not building
     - regex : not building
     - serialization : not building
     - signals : not building
     - system : not building
     - test : not building
     - thread : not building
     - wave : not building

...patience...
...found 16111 targets...
...updating 14 targets...
common.mkdir
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\greg_month.o
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\greg_weekday.o
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\date_generators.o
gcc.archive
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\libboost_date_time-gcc41-s-1_44.a
The system cannot find the path specified.
The system cannot find the path specified.

     "/opt/cell/toolchain/powerpc-linux/bin/ar.exe" rc
"bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\libboost_date_time-gcc41-s-1_44.a"
"bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\greg_month.o"
"bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\greg_weekday.o"
"bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\gregorian\date_generators.o"
     "/opt/cell/toolchain/powerpc-linux/bin/ranlib.exe"
"bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\libboost_date_time-gcc41-s-1_44.a"

...failed gcc.archive
bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static\libboost_date_time-gcc41-s-1_44.a...
...skipped <pC:\Boost\lib>libboost_date_time-gcc41-s-1_44.a for lack of
<pbin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-static>libboost_date_time-gcc41-s-1_44.a...
common.mkdir
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\greg_month.o
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\greg_weekday.o
gcc.compile.c++
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\date_generators.o
gcc.archive
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\libboost_date_time-gcc41-sd-1_44.a
The system cannot find the path specified.
The system cannot find the path specified.

     "/opt/cell/toolchain/powerpc-linux/bin/ar.exe" rc
"bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\libboost_date_time-gcc41-sd-1_44.a"
"bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\greg_month.o"
"bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\greg_weekday.o"
"bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\gregorian\date_generators.o"
     "/opt/cell/toolchain/powerpc-linux/bin/ranlib.exe"
"bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\libboost_date_time-gcc41-sd-1_44.a"

...failed gcc.archive
bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static\libboost_date_time-gcc41-sd-1_44.a...
...skipped <pC:\Boost\lib>libboost_date_time-gcc41-sd-1_44.a for lack of
<pbin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-static>libboost_date_time-gcc41-sd-1_44.a...
...failed updating 2 targets...
...skipped 2 targets...
...updated 10 targets...
----------

So I have the following questions:

> warning: Unable to construct ./install-unversioned (2x)
- Is this a problem? If so, how to fix?

> The system cannot find the path specified. (2x)
- What path? I guess "/opt/cell/toolchain/powerpc-linux/bin/....exe"
If so, this path wasn't specified. :)
I guess it used my powerpc-linux-g++ hint in user-config.jam and %Path%,
but it is beyond me why it stripped "C:\Cygwin\".
(Note that I'm not executing anything under Cygwin, the GNU toolchain
just happens to be there.)

Actually, I'm trying to build a complete PPC executable for Cell on
Windows, so I intend to run bjam using something like:
bjam variant=release,debug link=static runtime-link=static
target-os=linux threadapi=pthread -j2 install > myboostinst.log
- So what am I doing wrong? I read through quite a few web, manual and
mailing archive pages, but I can't figure this one out.

Thanks for any help.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk