pkgsrc-Bugs archive

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

pkg/53086: devel/libtool-base configure code to remove spaces between -R/-L/-l and paths is broken



>Number:         53086
>Category:       pkg
>Synopsis:       devel/libtool-base configure code to remove spaces between -R/-L/-l and paths is broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 10 14:35:00 +0000 2018
>Originator:     Hans Rosenfeld
>Release:        2017Q4
>Organization:
>Environment:
SunOS pkgbuild 5.11 illumos-ff1e230c4f i86pc i386 i86pc
>Description:
The gcc on my system produces this output when linking with -v:

 /usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/collect2 -V -M /usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/../../../libgcc-unwind.map -Y P,/usr/gcc/6/lib:/lib:/usr/lib -R /usr/gcc/6/lib -L /usr/gcc/6/lib -Qy /usr/lib/crt1.o /usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/crtp.o /usr/lib/crti.o /usr/lib/values-Xa.o /usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/crtbegin.o -L/usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0 -L/usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/../../.. conftest.o -lstdc++ -lm -lrt -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/crtend.o /usr/lib/crtn.o

The configure script for libtool wants to remove the spaces between -R/-L and usr/gcc/6/lib and fails miserably. Basically, it loops over all tokens in that string and checks whether they are -R, -L, or -l, but the comparison is wrong.
>How-To-Repeat:
Build devel/libtool-base on current OpenIndiana and search for compiler_lib_search_path in ${PREFIX}/bin/libtool.
>Fix:
patch-configure in devel/libtool needs this:

@@ -16130,8 +16238,9 @@ if { { eval echo "\"\$as_me\":${as_linen
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test x-L = "$p" ||
-          test x-R = "$p"; then
+       if test x-L = x"$p" ||
+          test x-l = x"$p" ||
+          test x-R = x"$p"; then
         prev=$p
         continue
        fi



Home | Main Index | Thread Index | Old Index