|
Boost-Build : |
Subject: Re: [Boost-build] Cross compiling Windows -> Linux PPC fails
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-10-23 03:27:18
On Friday, October 22, 2010 22:11:24 Alexander S. van Amesfoort wrote:
> 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-stat
> ic\gregorian gcc.compile.c++
> bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-stat
> ic\gregorian\greg_month.o gcc.compile.c++
> bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-stat
> ic\gregorian\greg_weekday.o gcc.compile.c++
> bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-stat
> ic\gregorian\date_generators.o gcc.archive
> bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-stat
> ic\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-sta
> tic\libboost_date_time-gcc41-s-1_44.a"
> "bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-st
> atic\gregorian\greg_month.o"
> "bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-st
> atic\gregorian\greg_weekday.o"
> "bin.v2\libs\date_time\build\gcc-4.1.1\release\link-static\runtime-link-st
> atic\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-sta
> tic\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-stat
> ic\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-s
> tatic>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-stati
> c\libboost_date_time-gcc41-sd-1_44.a"
> "bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-stat
> ic\gregorian\greg_month.o"
> "bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-stat
> ic\gregorian\greg_weekday.o"
> "bin.v2\libs\date_time\build\gcc-4.1.1\debug\link-static\runtime-link-stat
> ic\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-stati
> c\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-sta
> tic>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?
Most probably not. However, could you run with --debug-building and send me the log off-list, so that I can take a look.
> > 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. :)
Well, you can bring this up with Windows developers -- and ignore that
is say "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.)
The command is the result of running:
powerpc-linux-g++.exe -print-prog-name=ar
It's generally not so good idea to be in commnad line shell of the Windows
operating systems, and then run commands for the GNU/Kernel32.dll
operating system, because while this appears to work, you'll run in a
number of issues like this one.
So, you should either:
- Build from cygwin shell,
- Explicitly specify ar binary, as follows:
using gcc : 4.1.1 : powerpc-linux-g++.exe : <archiver>C:/Cygwin/..../ar.exe ;
HTH,
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: http://boost.org/boost-build2
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