Boost logo

Boost-Build :

From: cepstein (caleb.epstein_at_[hidden])
Date: 2004-12-07 11:36:35

When trying to build a small shared library with BBV2 and gcc 3.3.4 on
Solaris and I get the error reproduced below.

[k] nbde52d @ scsefpsdcs01 184% bjam -sTOOLS=sunpro --v2
...found 31 targets...
...updating 5 targets...
gcc.compile.c++ bin/gcc/debug/test-k.o
gcc.compile.c++ bin/gcc/debug/kemu.o
gcc.compile.c++ bin/gcc/debug/kio.o bin/gcc/debug/ bin/gcc/debug/test-k
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status

"g++" -Wl,-R -Wl,"/home/nbde52d/src/k/bin/gcc/debug"
-Wl,-rpath-link -Wl,"/home/nbde52d/src/k/bin/gcc/debug" -o
"bin/gcc/debug/test-k" "bin/gcc/debug/test-k.o" "bin/gcc/debug/"

...failed bin/gcc/debug/test-k...
...failed updating 1 target...
...updated 4 targets...

The link command doesn't pass -dn or -P to the linker directly, but I
believe the mistaken -rpath-link flag is treated by Sun ld as a
bundled option which would enable both the "-a" and "-r" options which
are mutually exclusive:

-a In static mode only, produces an executable object
file; gives errors for undefined references. This is
the default behavior for static mode. -a may not be
used with the -r option.

-r Combines relocatable object files to produce one relo-
catable object file. ld will not complain about
unresolved references. This option cannot be used in
dynamic mode or with -a.

In gcc.jam there is the following comment:

# Solaris linker does not have a separate -rpath-link, but
# allows to use -L for the same purpose.
flags $(toolset).link LINKPATH $(condition) : <xdll-path> :
unchecked ;

But further down:

actions link.dll bind LIBRARIES
-o "$(<)" $(HAVE_SONAME)-Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)"


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at