Boost logo

Boost-Build :

Subject: Re: [Boost-build] fPIC option for boost
From: Ven Tadipatri (ven.tadipatri_at_[hidden])
Date: 2011-01-07 11:08:03


Thank you - that did the trick. Sometimes a clean rebuild is all that's
needed to make compilation problems go away!
I had just deleted the staging directory before and that probably wasn't
good enough since it just used the stale .o files.

-Ven

On 01/06/2011 10:01 AM, Vladimir Prus wrote:
> Ven Tadipatri wrote:
>
>> Hi,
>> I ran bjam with the -d2 option and I see this in the output.
>>
>> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -pthread -m64
>> -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -I"." -c -o
>> "bin.v2/libs/filesystem/build/gcc-4.1.2/debug/address-model-64/link-static/threading-
> multi/v2/src/v2_operations.o"
>> "libs/filesystem/v2/src/v2_operations.cpp"
>> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -pthread -m64
>> -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -I"." -c -o
>> "bin.v2/libs/filesystem/build/gcc-4.1.2/debug/address-model-64/link-static/runtime-link-
> static/threading-multi/v2/src/v2_operations.o"
>> "libs/filesystem/v2/src/v2_operations.cpp"
>>
>> so it looks like the -fPIC option is being passed to the compiler. And
>> after I run, I see the libboost-filesystem-1.44.a file was updated.
>> After running ranlib on the .a file , the error is still the same. Any
>> ideas?
> Could you try completely clean rebuild (use -a option)
>
> Could you use the suggestions at:
>
> http://vladimir_prus.blogspot.com/2009/06/linking-101.html
>
> and in particular, -Wl,-t gcc option when linking *your* executable, to
> make sure that the .a file being linked against is the one produced by
> the most recent build, and not some previously installed one?
>
> Naturally, if Boost.Build uses -fPIC to compile certain file, and you
> use .a produced from that build, and the linker still complains about
> missing -fPIC, that would mean a bug in linker (which either ignored
> -fPIC or complains about something else).
>
> - 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