problem building boost on solaris
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... Sparc Solaris 2.7, gcc-2.95.3, binutils-2.14 Any help would be... helpful. Thanks!
In article
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. Try running bjam with the -d+2 option to see what the compiler invocations are. If those flags don't show up in those, then I'd say there's something wrong with your installation of GCC. -- -- grafik -- Don't Assume Anything
Rene Rivera wrote:
"jerry_karlin"
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
participants (3)
-
Christopher Currie
-
jerry_karlin
-
Rene Rivera