pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47359: pkgsrc/devel/libtool problems with solaris, g++ and solaris ld



>Number:         47359
>Category:       pkg
>Synopsis:       pkgsrc/devel/libtool problems with solaris, g++ and solaris ld
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 21 07:00:01 +0000 2012
>Originator:     Richard PALO
>Release:        pkgsrc trunk
>Organization:
>Environment:
SunOS devzoneX 5.11 oi_151a7 i86pc i386 i86pc Solaris

>Description:
It has been determined when trying to build textproc/rarian with gcc4.7.2 on 
solaris (openindiana) with solaris ld that the shared library generated is 
missing the DT_SONAME, which causes problems for *all* programs that wish to 
link to it (for example meld).

This has been reported and fixed upstream here:
https://savannah.gnu.org/support/?108201

Unfortunately, given the complexity of pkgsrc interaction with libtool 
(libtool-base), I am not able to intuit the right combination to build after 
patching libltdl/m4/libtool.m4
neither on version 2.2.6b currently in pkgsrc, nor the latest stable 2.4.2.

Could the pkgsrc libtool maintainer do the necessary...
>How-To-Repeat:
to observe the problem after building rarian, either :
elfdump -d librarian.so | grep SONAME
  or
objdump -p librarian.so | grep SONAME

absence of a SONAME (that is DT_SONAME) object is confirmation of the bug.
>Fix:
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 3cf14e7..cd6db4e 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -6755,9 +6755,9 @@ if test yes != "$_lt_caught_CXX_error"; then
            if test yes,no = "$GXX,$with_gnu_ld"; then
              _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib 
$LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags 
$wl-h $wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib 
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h 
$wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > 
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: 
*; };" >> $lib.exp~
-                 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp -o $lib 
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h 
$wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
@@ -6766,9 +6766,9 @@ if test yes != "$_lt_caught_CXX_error"; then
              else
                # g++ 2.7 appears to require '-G' NOT '-shared' on this
                # platform.
-               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS 
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h 
$wl$soname -o $lib'
+               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
                _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > 
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: 
*; };" >> $lib.exp~
-                 $CC -G -nostdlib $wl-M $wl$lib.exp -o $lib $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib 
$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when



Home | Main Index | Thread Index | Old Index