bug-libtool
[Top][All Lists]
Advanced

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

Handling object name conflicts


From: Chen-Mou Cheng
Subject: Handling object name conflicts
Date: Thu, 19 May 2005 15:43:25 -0400

Hi,

I have noticed that from 1.5.14 to 1.5.16, the way of handling object
name conflicts has been changed from renaming conflicting files to
just exiting with an ERROR (see the relevant diff fragment attached
below).  I am having problems with 1.5.16 in building gnuradio; it
breaks when gnuradio is trying to link against libfft3w, which
contains objects of same names.  But when I go back to 1.5.14, it
builds successfully.  Can somebody explain to me whether this is
gnuradio/libfft3w's fault, or it is simply a libtool-1.5.16's bug? 
Thanks!

Regards,
Chen-Mou Cheng


Here's the relevant diff fragment:

diff -ruNp libtool-1.5.14/libltdl/ltmain.sh libtool-1.5.16/libltdl/ltmain.sh
--- libtool-1.5.14/libltdl/ltmain.sh    2005-02-12 13:30:57.000000000 +0100
+++ libtool-1.5.16/libltdl/ltmain.sh    2005-04-24 19:59:20.000000000 +0200
@@ -17,7 +17,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -43,8 +43,8 @@ EXIT_FAILURE=1

 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.5.14
-TIMESTAMP=" (1.1220.2.195 2005/02/12 12:12:33)"
+VERSION=1.5.16
+TIMESTAMP=" (1.1220.2.234 2005/04/24 17:45:58)"

 # See if we are running on zsh, and set the options which allow our
 # commands through without removal of \ escapes.
@@ -112,8 +112,9 @@ if test "${LANG+set}" = set; then
 fi

 # Make sure IFS has a sensible default
-: ${IFS="
-"}
+lt_nl='
+'
+IFS="  $lt_nl"

 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   $echo "$modename: not configured to build any kind of library" 1>&2
@@ -250,37 +251,14 @@ func_extract_an_archive ()
 {
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
-    f_ex_an_ar_lib=`$echo "X$f_ex_an_ar_oldlib" | $Xsed -e 's%^.*/%%'`

     $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
     $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
      :
     else
-      $echo "$modename: warning: object name conflicts; renaming
object files" 1>&2
-      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
-      $show "cp $f_ex_an_ar_oldlib $f_ex_an_ar_dir/$f_ex_an_ar_lib"
-      $run eval "cp \$f_ex_an_ar_oldlib \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
-      $AR t "$f_ex_an_ar_oldlib" | sort | uniq -c \
-       | $EGREP -v '^[         ]*1[    ]' | while read count name
-      do
-       i=1
-       while test "$i" -le "$count"
-         do
-         # Put our $i before any first dot (extension)
-         # Never overwrite any file
-         name_to="$name"
-         while test "X$name_to" = "X$name" || test -f
"$f_ex_an_ar_dir/$name_to"
-           do
-           name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
-         done
-         $show "(cd $f_ex_an_ar_dir && $AR x  $f_ex_an_ar_lib '$name'
&& $mv '$name' '$name_to')"
-         $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_lib
'$name' && $mv '$name' '$name_to' && $AR -d \$f_ex_an_ar_lib '$name')"
|| exit $?
-         i=`expr $i + 1`
-       done
-      done
-      $show "$rm $f_ex_an_ar_dir/$f_ex_an_ar_lib"
-      $run eval "$rm \$f_ex_an_ar_dir/\$f_ex_an_ar_lib"
+      $echo "$modename: ERROR: object name conflicts:
$f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
     fi
 }




reply via email to

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