libtool-patches
[Top][All Lists]
Advanced

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

Re: include_expsyms clobbers user files.


From: Ralf Wildenhues
Subject: Re: include_expsyms clobbers user files.
Date: Fri, 30 Sep 2005 10:42:18 +0200
User-agent: Mutt/1.5.11

Hi Peter,

* Peter Ekberg wrote on Thu, Sep 29, 2005 at 07:10:39PM CEST:
> 
> > OK then.  The patch looks good, please install after looking at the
> > following miniscule nit.  Thank you!
> 
> Ok, did that change also, why not...

But the change is wrong. :-/

  test -n "$foo" && test -n "$bar"
is not equivalent to
  test -n "$foo$bar"
(the latter is logical OR, not AND)

above error which shows up in mdemo like this:

| /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -no-undefined -module 
-export-symbols-regex "libfoo2.*"  -o libfoo2.la -rpath /tmp/lt/build/_inst/lib 
foo2.lo -lm libsub.la
| libtool: link: generating symbol list for `libfoo2.la'
| libtool: link: /usr/bin/nm -B  .libs/foo2.o   | sed -n -e 's/^.*[       
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[         ][     ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 
\2 \2/p' | /bin/sed 's/.* //' | sort | uniq > .libs/libfoo2.exp
| libtool: link: /bin/grep -E -e "libfoo2.*" ".libs/libfoo2.exp" > 
".libs/libfoo2.expT"
| libtool: link: mv -f ".libs/libfoo2.expT" ".libs/libfoo2.exp"
| libtool: link: echo "{ global:" > .libs/libfoo2.ver
| libtool: link: cat .libs/libfoo2.exp | sed -e "s/\(.*\)/\1;/" >> 
.libs/libfoo2.ver
| libtool: link: echo "local: *; };" >> .libs/libfoo2.ver
| libtool: link: gcc -shared  .libs/foo2.o   -Wl,-rpath 
-Wl,/tmp/lt/build/tests/mdemo/.libs -Wl,-rpath -Wl,/tmp/lt/build/_inst/lib -lm 
./.libs/libsub.so    -Wl,-soname -Wl,libfoo2.so.0 -Wl,-version-script 
-Wl,.libs/libfoo2.ver -o .libs/libfoo2.so.0.0.0
| /usr/bin/ld:.libs/libfoo2.ver:5: syntax error in VERSION script
| collect2: ld returned 1 exit status
| make: *** [libfoo2.la] Error 1

cat .libs/.libs/libfoo2.ver
| { global:
| libfoo2_LTX_foo2;
| libfoo2_LTX_hello;
| libfoo2_LTX_nothing;
| ;
| local: *; };

The empty line is the problem.

I installed the trivial fix below.

Sorry,
Ralf

        * libltdl/config/ltmain.m4sh (func_mode_link):
        Fix wrong logic introduced in last commit.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.12
diff -u -r1.12 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  29 Sep 2005 16:59:43 -0000      1.12
+++ libltdl/config/ltmain.m4sh  30 Sep 2005 08:40:14 -0000
@@ -4933,7 +4933,7 @@
        test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e 
"$lo2o" | $NL2SP`
 
        delfiles=
-       if test -n "$export_symbols$include_expsyms"; then
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
          $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
          export_symbols="$output_objdir/$libname.uexp"
          delfiles="$delfiles $export_symbols"
@@ -4991,7 +4991,7 @@
          fi
        fi
 
-       if test -n "$export_symbols$include_expsyms"; then
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
          tmp_export_symbols="$export_symbols"
          test -n "$orig_export_symbols" && 
tmp_export_symbols="$orig_export_symbols"
          $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> 
"$tmp_export_symbols"'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]