bug-libtool
[Top][All Lists]
Advanced

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

Re: [libtool 2.2.11a] testsuite: 48 69 92 failed [cygwin]


From: Charles Wilson
Subject: Re: [libtool 2.2.11a] testsuite: 48 69 92 failed [cygwin]
Date: Sun, 13 Jun 2010 14:51:00 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

On 6/12/2010 4:58 AM, Ralf Wildenhues wrote:
> * Charles Wilson wrote on Fri, Jun 11, 2010 at 02:28:41PM CEST:
>> In 48, the problem occurs during libtool --clean:
>> /usr/src/packages/libtool/git/build/libtool: line 1693:
>> sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper: No such file or directory
> 
> This failure is probably easiest to debug and fix if you run
>   make check-local TESTSUITEFLAGS='-v -d -x 48'
>   cd tests/testsuite.dir/048
> 
> and rerun the failing mode=clean command with --debug as first libtool
> argument.

Here's the relevant portion:

+ func_ltwrapper_scriptname sub3/subsub/m1
+ func_ltwrapper_scriptname_result=
+ func_ltwrapper_executable_p sub3/subsub/m1
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ func_ltwrapper_exec_suffix=.exe
+ /usr/bin/grep '%%%MAGIC EXE variable%%%' sub3/subsub/m1.exe
+ func_dirname_and_basename sub3/subsub/m1 '' .
+ case ${1} in
+ func_dirname_result=sub3/subsub
+ func_basename_result=m1
+ func_stripname '' .exe m1
+ func_stripname_result=m1
+ func_stripname_result=m1
+ func_stripname_result=m1
+
func_ltwrapper_scriptname_result=sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper

Note that "sub3/subsub" is repeated. This is because something screwy is
happening in func_ltwrapper_scriptname.

+ relink_command=
+ func_source sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper
+ set -x
+ case $1 in
+ . sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper
/usr/src/packages/libtool/git/build/libtool: line 1693:
sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper: No such file or directory


Now, this occurs in this bit from func_mode_uninstall:

          # Do a test to see if this is a libtool program.
          if func_ltwrapper_p "$file"; then
            if func_ltwrapper_executable_p "$file"; then
              func_ltwrapper_scriptname "$file"
              relink_command=
              func_source $func_ltwrapper_scriptname_result
              rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
            else
              relink_command=
              func_source $dir/$noexename
            fi

since $file at this point is sub3/subsub/m1.exe, we eventually call
func_ltwrapper_scriptname "$file", and that returns the wrong value,
because $objdir is, at this point, sub3/subsub/.libs, so:


func_ltwrapper_scriptname ()
{
    func_ltwrapper_scriptname_result=""
    if func_ltwrapper_executable_p "$1"; then
        func_dirname_and_basename "$1" "" "."
        func_stripname '' '.exe' "$func_basename_result"

func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
    fi
}

ends up duplicating the "sub3/subsub/" part, because it is in both
$func_dirname_result AND $objdir.


I've mentioned this problem before:
http://osdir.com/ml/libtool-patches-gnu/2010-02/msg00010.html
but I'm not sure what the correct fix should be. Should $objdir always
represent a single subdir (that is, only .libs/ or _libs/) and never a
more complicated path? What effects would that have? Why is it set to
the "deep" value now, anyway...

Or perhaps a short and sweet brute force solution, would be to modify
func_ltwrapper_scriptname  as follows:

func_ltwrapper_scriptname ()
{
    func_ltwrapper_scriptname_result=""
    if func_ltwrapper_executable_p "$1"; then
        func_dirname_and_basename "$1" "" "."
        func_stripname '' '.exe' "$func_basename_result"
-func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+func_ltwrapper_scriptname_result="$func_dirname_result/"
+func_dirname_and_basename "$objdir" "" ""
+func_ltwrapper_scriptname_result="$func_ltwrapper_scriptname_result$func_basename_result/${func_stripname_result}_ltshwrapper"
    fi
}


--
Chuck



reply via email to

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