Boost logo

Boost Users :

From: Christopher Currie (Christopher_at_[hidden])
Date: 2003-07-22 14:52:19


Rene Rivera wrote:
> "jerry_karlin" <jerry_karlin_at_[hidden]> wrote:
>>gcc-Link-action
>>libs/test/build/bin/libboost_prg_exec_monitor.so/g
>>cc/debug/runtime-link-static/shared-linkable-true/
>>threading-single/libboost_prg_exec_monitor.so
>>ld: warning: option -d appears more than once, first setting taken
>>ld: fatal: option -dn and -z[text|textwarn|textoff] are incompatible
>>ld: fatal: option -dn and -G are incompatible
>>ld: fatal: Flags processing errors
>>collect2: ld returned 1 exit status
>>
>>
>>What's causing this, and how do I fix it? I can't figure my way
>>through these jam files just yet...
>
> Most everything you might want to know is in the gcc-tools.jam file. That's
> what maps the various toolset settings/features to compiler flags.
>
>>Sparc Solaris 2.7, gcc-2.95.3, binutils-2.14
>>
>>Any help would be... helpful.
>
> The truth is I can be of much help with the info you gave. The gcc toolset
> (gcc-tools.jam) doesn't pass any of those flags (-d, -z, -G) to the compiler.

These flags are being passed to the Solaris linker by the GCC compiler
driver. What's happening is that, when all the jam flags add up, they
request that jam builds a shared library, that will only link to other
libraries statically. (This is useful for creating a shared library that
doesn't have any dependencies.)

This results in GCC being passed "-shared", which is its command to
build a shared library, and "-static", which is its command to request
static linkage of other libraries. "-static" results in "-dn" being
passed to the linker. "-shared" results in "-G" and "-dy" being passed.
These flags are not mutually exclusive when using GNU ld, because in GNU
ld, -dn and -Bstatic have the same semantics. This is not true with the
Solaris linker, where "-dn" turns off all shared linking features
entirely, thus preventing the building of shared libraries.

I've submitted this as a bug report to GCC:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10590

But they've been slow to look at it. I'll add some clarification to the
bug report to try and encourage them to fix the bug, or to provide a
workaround. In the mean time, you man need to download GNU binutils, and
recompile GCC to use the GNU linker.

Christopher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net