|
Boost-Build : |
Subject: Re: [Boost-build] Linker error during arm-gcc cross compile
From: Christian Auby (christian_at_[hidden])
Date: 2009-09-30 11:56:40
I have figured out why it happens:
when using toolset=gcc-arm it still tries to link with winsock (ws2_32),
which the arm-gcc linker can't find. There is no error message displayed
from ld. Shouldn't boost.build display this? Or maybe all ld is giving
is the cryptic one.
Anyway: I haven't found a way to only link a library if I'm on a
particular OS. The current rule is as follows:
lib winsock
:
: <name>ws2_32
;
lib myLib
: glob [ source/*.cpp ]
winsock
: <link>static
;
Is there some way for myLib to only link with winsock if target-os is
"windows"?
Regards,
Christian
Vladimir Prus wrote:
> Christian Auby wrote:
>
>> Compiling from windows to gcc-arm linux using codesourcery toolchain,
>> version (Sourcery G++ Lite 2009q1-203) 4.3.3.
>>
>> Command: bjam toolset=gcc-arm target-os=linux threadapi=pthread
>>
>> Output:
>>
>>
> d:/dev/arm-gcc/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld.exe:
>> cannot open output file
>> bin\gcc-arm\debug\target-os-linux\threadapi-pthread\threading-multi\server:
>> Permission denied
>> collect2: ld returned 1 exit status
>>
>> Everything compiles up to this point, but the final linking fails. Am I
>> doing something wrong?
>
> Christian,
>
> what is the full command that fails? What happens if you run:
>
> echo test > bin\gcc-arm\debug\target-os-linux\threadapi-pthread\threading-multi\server
>
> ?
>
> - Volodya
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>
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