
Bo - I'm hardly a boost build expert, but I've jut gotten done converting all of my builds to use it. It was a little rocky at first but well worth the pain. First off, what you are dealing with is a Boost.Build issue. You can find out more about Boost.Build here: http://www.boost.org/tools/build/v2/ I highly recommend reading the the "Documentation" link. It was very useful for me at least. As for the issue you are seeing... the gcc.jam file calls out that when link is shared that -fPIC will be added for gcc (non-NT and non-CYGWIN builds). I do not see an explicit callout for -fPIC and static libraries, which means you will need to add it it. Boost.Build v1 and v2 have two different ways to specify arguments. What I think you are looking for is: Boost.Build v2 bjam --v2 toolset=gcc cxxflags=-fPIC --with-serialization --with-iostreams --with-mpi -j6 -d+2 --prefix=/usr link=static install Also, let me point out that there is a Boost.Build mail group. You can find a link on the same web page referenced above. Best Regards - Michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com Bo Peng wrote:
Dear all,
After numerous attempts, I find that link=static somehow disables the addition of cxxflags=-fPIC. I mean, I am able to get static libraries built with -fPIC using,
bjam toolset=gcc/cxxflags=-fPIC --with-serialization --with-iostreams --with-mpi -j6 -d+2 --prefix=/usr install
but *not* with
bjam toolset=gcc/cxxflags=-fPIC --with-serialization --with-iostreams --with-mpi -j6 -d+2 --prefix=/usr link=static install
Is this a bjam bug?
Bo _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost