Re: testsuite.at for version 2.x Was: ... mingw-cross, check-local fail for DESTDIR tests

2008-11-18 Thread Ralf Wildenhues
Hi Roumen,

let's drop bug-libtool from the Cc:.

* Roumen Petrov wrote on Tue, Nov 18, 2008 at 11:12:56PM CET:
> [SNIP]
>> Test 25 "Link order of deplibs" skipped (link-order2.at:129) - in my  
>> todo  for investigation.
>
> Still skipped. The executable exit code is 1 instead 2. No idea what is  
> problem:

The test is too strict.

>> Test 29 "static linking flags for programs" skipped (static.at:177) -  
>> problem is with "libtool --mode install" since real executable is in  
>> .libs subdirectory. No idea how to fix.
> It is not "--mode install" problem.
> Still skipped. It is too big test :) .

The test for the executables that are supposed to fail is too strict for
wine output and error status.

>> Test 48 "enforced lib prefix" FAILED (need_lib_prefix.at:184) - again  
>> "--mode install" problem (see test 29).
> It is not "--mode install" problem. It is related to end of line.

Yes, I see where I messed that up.

Thanks.  I have patches for all of these issues pending.  Hope to get to
them soon, maybe tonight.

Cheers,
Ralf




Re: Revenge of the $ECHO. Kill most uses of Xsed.

2008-11-18 Thread Ralf Wildenhues
* Eric Blake wrote on Wed, Nov 19, 2008 at 06:12:27AM CET:
> >>> -   RM="$ECHO $RM"
> >>> +   RM="echo $RM"
> >> Are all of these safe, considering mingw might have \ in an absolute
> >> pathname to these tools?
> > 
> > No, and I'm glad you ask about this.  The point here is that there is
> > more than one argument following, and I didn't see an easy way to escape
> > them properly, so I figured take the less likely of the bugs, as
> > RM="$ECHO rm -f" is quite certain to do the wrong thing.  Suggestions?
> 
> Well, on mingw native, the default sh has an echo that doesn't eat \.  But
> that doesn't help if you are doing a Solaris-mingw cross.  I'm also
> stumped on thinking of any better alternative, though.

func_echo_all ()
{
  $ECHO "$*"
}




Re: Revenge of the $ECHO. Kill most uses of Xsed.

2008-11-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Ralf Wildenhues on 11/17/2008 12:10 AM:
>>>  $ECHO "run \`$progname --help | more' for full usage"
>> This can be echo rather than $ECHO, since the \` is flattened during ""
>> interpratation prior to the echo call.  Several similar places exist.
> 
> What about $progname?  Ah, it should be a basename.  Well, our current
> basename functions don't compute the basename of files with backslash
> as directory separator.

On second thought, how do we compute basename?  On platforms like Linux,
it is legal to have \ in $0 (and thus $progname) that are not treated as
directory separators.  So this particular instance must indeed remain $ECHO.

>>> - RM="$ECHO $RM"
>>> + RM="echo $RM"
>> Are all of these safe, considering mingw might have \ in an absolute
>> pathname to these tools?
> 
> No, and I'm glad you ask about this.  The point here is that there is
> more than one argument following, and I didn't see an easy way to escape
> them properly, so I figured take the less likely of the bugs, as
> RM="$ECHO rm -f" is quite certain to do the wrong thing.  Suggestions?

Well, on mingw native, the default sh has an echo that doesn't eat \.  But
that doesn't help if you are doing a Solaris-mingw cross.  I'm also
stumped on thinking of any better alternative, though.

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkjoDsACgkQ84KuGfSFAYA4mQCfd1cF7EWl5zRowXU4UMSKJycZ
4MEAnRFcZC9+Ev86Im9cNzGK0AvYXtVr
=59w4
-END PGP SIGNATURE-




Re: testsuite.at for version 2.x Was: ... mingw-cross, check-local fail for DESTDIR tests

2008-11-18 Thread Roumen Petrov

Roumen Petrov wrote:

Ralf Wildenhues wrote:

Hello Roumen, all,

apologies for the huge delay.

* Roumen Petrov wrote on Sat, May 10, 2008 at 12:25:48PM CEST:
The libtool version before 2.x (as example 1.5x) in mingw-cross  
compilation environment create executables as follow:

- foo : wrapper shell script
- foo.exe : libtool wrapper executable
. libs/foo.exe : native(host) executable

Since version 2.x don't create wrapper shell script in build 
directory  make check{-local} skip any tests. The reason is code of 
macro  LT_AT_EXEC_CHECK:

[...]
The program $1 (wrapper shell scrip in 1.5x and former) don't exist,  
lt_status is non zero and macro code exit with status 77 (exist 
wrapper  executable "$1"$EXEEXT).


Also same problem in macro LT_AT_NOINST_EXEC_CHECK.


Agreed.  Please try this patch.  Thanks.

Others, OK to commit?

Thanks,
Ralf


Please find attached file "libtool-origin-20081118.diff.gz" (Ralf patch
+ more $EXEEXT when linking executables)


I guess that a typo was problem with "libtool --mode install" so in 
previous patch I left test code unchanged (may be a Cyrillic E instead 
Latin).


Now I update code for "mode install" again and the new diff-file is 
attached as "libtool-origin-20081118-v2.diff.gz".

Changes:
- $EXEEXT for "mode install";
- gived-up changes in old-m4-iface.at;
- change in static.at from [m$st] to [m${st}$EXEEXT] may be isn't portable.


[SNIP]
Test 25 "Link order of deplibs" skipped (link-order2.at:129) - in my 
todo  for investigation.


Still skipped. The executable exit code is 1 instead 2. No idea what is 
problem:

- emulation problem;
- mingw linker problem;
- windows loader - load shared library order problem (not tested yet).

$objdump -x .libs/wrong.exe  | grep DLL
DLL Name: libb-0.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
DLL Name: liba0-0.dll

$ objdump -x .libs/libb-0.dll | grep DLL
DLL Name: liba1-0.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll

strace show that liba1-0.dll is accessed first.

The link command:
[GCC] ... -o .libs/wrong.exe main.o \
  -L[T25DIR]/lib \
  [T25DIR]/lib/liba0.dll.a \
  ./.libs/libb.dll.a \
  [T25DIR]/.libs/liba1.dll.a \
  -L[T25DIR]/lib -L[T25DIR]/inst/lib


Test 29 "static linking flags for programs" skipped (static.at:177) - 
problem is with "libtool --mode install" since real executable is in 
.libs subdirectory. No idea how to fix.

It is not "--mode install" problem.
Still skipped. It is too big test :) .


[SNIP]
Test 48 "enforced lib prefix" FAILED (need_lib_prefix.at:184) - again 
"--mode install" problem (see test 29).

It is not "--mode install" problem. It is related to end of line.
$ cat -A testsuite.dir/48/expout
libfoo1: 2^M^M$
libfoo2: 3^M^M$
$ testsuite.dir/48/main.exe  | cat -A
libfoo1: 2^M$
libfoo2: 3^M$

Also executable is linked statically since -no-undefined isn't specified 
(two warnings in log output).



[SNIP]


Roumen


libtool-origin-20081118-v2.diff.gz
Description: application/gzip