Re: libtool.git & cl.exe & Mingw32

2008-12-22 Thread Akim Demaille


Le 21 déc. 08 à 17:49, Ralf Wildenhues a écrit :


Hi Akim,


Hi Ralf!


* Akim Demaille wrote on Fri, Dec 19, 2008 at 11:41:34AM CET:
Yet I have a slight problem: for some reason the top-level wrapper  
(lt-

cli.exe in my case) tries to launch .libs/lt-cli.exe, which does not
exist.  What does exist is .libs/cli.exe (and actually it makes more
sense to me).  So I had to change libtool:


Thanks for the report.  You can make your bug reports even more  
perfect
by providing './libtool --tag=CC --config', and writing to bug- 
libtool.


Cc'd.


And, in this case, also providing --mode=link command line and output.
;-)


Sure :)

# Which release of libtool.m4 was used?
macro_version=2.2.7a
macro_revision=1.3046

# What type of objects to build.
pic_mode=default

# Whether or not to build shared libraries.
build_libtool_libs=yes

# Whether or not to build static libraries.
build_old_libs=no

# Assembler program.
AS=as

# DLL creation program.
DLLTOOL=false

# Object dumper program.
OBJDUMP=objdump

# Whether or not to optimize for fast installation.
fast_install=yes

# Shell to use when invoking shell scripts.
SHELL="/bin/sh"

# An echo program that protects backslashes.
ECHO="printf %s\\n"

# The host system.
host_alias=mingw32
host=i386-pc-mingw32
host_os=mingw32

# The build system.
build_alias=
build=i686-pc-linux-gnu
build_os=linux-gnu

# A sed program that does not truncate output.
SED="/bin/sed"

# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="$SED -e 1s/^X//"

# A grep program that handles long lines.
GREP="/bin/grep"

# An ERE matcher.
EGREP="/bin/grep -E"

# A literal string matcher.
FGREP="/bin/grep -F"

# A BSD- or MS-compatible name lister.
NM="/home/build/.wine/dosdevices/c:/vcxx8/VC/bin/link.exe -dump -symbols"

# Whether we need soft or hard links.
LN_S="ln -s"

# What is the maximum length of a command?
max_cmd_len=98304

# Object file suffix (normally "o").
objext=obj

# Executable file suffix (normally "").
exeext=

# whether the shell understands "unset".
lt_unset=unset

# turn spaces into newlines.
SP2NL="tr \\040 \\012"

# turn newlines into spaces.
NL2SP="tr \\015\\012 \\040\\040"

# How to create reloadable object files.
reload_flag=" -r"
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"

# Method to check whether dependent libraries are shared objects.
#deplibs_check_method="file_magic ^x86 archive import|^x86 DLL"
deplibs_check_method=pass_all

# Command to use when deplibs_check_method == "file_magic".
file_magic_cmd="func_win32_libid"

# The archiver.
AR="lib.exe"
AR_FLAGS="cru"

# A symbol stripping program.
STRIP="strip"

# Commands used to install an old-style archive.
RANLIB=":"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""

# A C compiler.
LTCC="cl.exe"

# LTCC compiler flags.
LTCFLAGS="-g -O3"

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="gawk ' {last_section=section; section=\$ 3}; 
/Section length .*#relocs.*(pick any)/{hide[last_section]=1}; \$ 
0!~/External *\\|/{next}; / 0+ UNDEF /{next}; / UNDEF \\([^|]\\)*()/{next}; 
{if(hide[section]) next}; {f=0}; \$ 0~/\\(\\).*\\|/{f=1}; {printf f ? 
\"T \" : \"D \"}; {split(\$ 0, a, /\\||\\r/); split(a[2], s)}; 
s[1]~/^...@?]/{print s[1], s[1]; next}; s[1]~prfx {split(s[1],t,\"@\"); 
print t[1], substr(t[1],length(prfx))} ' prfx=^_"


# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 
's/^[ABCDGISTW]* .* \\(.*\\)\$/extern char \\1;/p'"

# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", 
(void *) 0},/p' -e 's/^[ABCDGISTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (void 
*) \\&\\2},/p'"

# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\) \$/  
{\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGISTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/ 
 {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGISTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  
{\"lib\\2\", (void *) \\&\\2},/p'"

# The name of the directory that contains temporary libtool files.
objdir=.libs

# Used to examine libraries when file_magic_cmd begins with "file".
MAGIC_CMD=file

# Must we lock files when doing compilation?
need_locks="no"

# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=""

# Tool to change global to local symbols on Mac OS X.
NMEDIT=""

# Tool to manipulate fat objects and archives on Mac OS X.
LIPO=""

# ldd/readelf like tool for Mach-O binaries on Mac OS X.
OTOOL=""

# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
OTOOL64=""

# Old archive suffix (normally "a").
libext=lib

# Shared library suffix (normally ".so").
shrext_cmds=".dll"

# The commands to extract the exported symbol list from a shared archive.
extra

Re: libtool.git & cl.exe & Mingw32

2008-12-21 Thread Ralf Wildenhues
Hi Akim,

* Akim Demaille wrote on Fri, Dec 19, 2008 at 11:41:34AM CET:
> Yet I have a slight problem: for some reason the top-level wrapper (lt- 
> cli.exe in my case) tries to launch .libs/lt-cli.exe, which does not  
> exist.  What does exist is .libs/cli.exe (and actually it makes more  
> sense to me).  So I had to change libtool:

Thanks for the report.  You can make your bug reports even more perfect
by providing './libtool --tag=CC --config', and writing to bug-libtool.
And, in this case, also providing --mode=link command line and output.
;-)

> so that _spawnv be given newargz[0] (== .libs/cl.exe) as first argument 
> instead of lt_argv_zero (== .libs/lt-cl.exe).
>
> I don't understand exactly what the code is expected to do: is the  
> problem the value of lt_argv_zero (which is what I suspect), or rather  
> the fact that there is no .libs/lt-cli.exe (which I doubt).  This is  
> what I get without this change:

Both .libs/foo$EXEEXT and .libs/lt-foo$EXEEXT are needed on some systems
but I haven't checked whether that is still the case for w32 after the
recent-ish changes.

> Also, I have enabled the DEBUGWRAPPER traces by changing libtool by  
> hand, is there a better way?  Read the code I see that the wrappers  
> support options, but I found no documentation about them, and there is  
> no --lt-help: is this for Libtool developers only?

Well, adding options to the wrapper is problematic: it should be
transparent to the user program it wraps.  Thus options are bad bad bad.

You can './configure CFLAGS=-DDEBUGWRAPPER' I guess; but good thing we
didn't document that because it's bad bad bad again that we didn't stick
to LT_ namespace here.  Will fix.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: libtool.git & cl.exe & Mingw32

2008-12-20 Thread Roumen Petrov

Akim Demaille wrote:

Hi friends,

It's cold, the win32ter's back, and I'm a lonely winderer in the 
winderful country to losedows.


As you suggested, I'm moved from pw32 to ming32, and as a result, I now 
have a "wrapper.exe" instead of a shell script "wrapper".  This is 
wonderful news, since I was wasting a lot of time in useless 
recompilations, because "libtool -o foo.exe" used to create "foo", which 
cause the Makefiles to never be satisfied and relaunching endless 
recompilations.


Yet I have a slight problem: for some reason the top-level wrapper 
(lt-cli.exe in my case) tries to launch .libs/lt-cli.exe, which does not 
exist.  What does exist is .libs/cli.exe (and actually it makes more 
sense to me).  So I had to change libtool:

[SNIP]

What about libtool version ?

Roumen


___
http://lists.gnu.org/mailman/listinfo/libtool


libtool.git & cl.exe & Mingw32

2008-12-19 Thread Akim Demaille

Hi friends,

It's cold, the win32ter's back, and I'm a lonely winderer in the  
winderful country to losedows.


As you suggested, I'm moved from pw32 to ming32, and as a result, I  
now have a "wrapper.exe" instead of a shell script "wrapper".  This is  
wonderful news, since I was wasting a lot of time in useless  
recompilations, because "libtool -o foo.exe" used to create "foo",  
which cause the Makefiles to never be satisfied and relaunching  
endless recompilations.


Yet I have a slight problem: for some reason the top-level wrapper (lt- 
cli.exe in my case) tries to launch .libs/lt-cli.exe, which does not  
exist.  What does exist is .libs/cli.exe (and actually it makes more  
sense to me).  So I had to change libtool:



case $host_os in
  mingw*)
   cat <<"EOF"
  /* execv doesn't actually work on mingw as expected on unix */
  newargz = prepare_spawn (newargz);
  rval = _spawnv (_P_WAIT, newargz[0], (const char * const *)  
newargz); // Changed here

 if (rval == -1)
{
  /* failed to start process */
#ifndef __MINGW32CE__
  LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\":  
errno = %d\n", lt_argv_zero, errno));

#else
  LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s 
\"\n", lt_argv_zero));

#endif
  return 127;
}
  return rval;
EOF
;;

so that _spawnv be given newargz[0] (== .libs/cl.exe) as first  
argument instead of lt_argv_zero (== .libs/lt-cl.exe).


I don't understand exactly what the code is expected to do: is the  
problem the value of lt_argv_zero (which is what I suspect), or rather  
the fact that there is no .libs/lt-cli.exe (which I doubt).  This is  
what I get without this change:


$ ./cli.exe
(main) argv[0]  : ./cli.exe
(main) program_name : cli.exe
(find_executable)   : ./cli.exe
(check_executable)  : 
R:\home\build\libport_x86_windows_vcxx2005_release_dynamic\work\build\tests\libport/./cli.exe
(main) found exe (before symlink chase) at : 
R:\home\build\libport_x86_windows_vcxx2005_release_dynamic\work\build\tests\libport/./cli.exe
(main) found exe (after symlink chase) at : 
R:\home\build\libport_x86_windows_vcxx2005_release_dynamic\work\build\tests\libport/./cli.exe
(main) libtool target name: lt-cli.exe
(lt_setenv) setting 'BIN_SH' to 'xpg4'
(lt_setenv) setting 'DUALCASE' to '1'
(lt_update_lib_path) modifying 'PATH' by prepending ''
(lt_update_exe_path) modifying 'PATH' by prepending 
'C:\boost_1_35_0\lib;C:\boost_1_35_0\bin;C:\opt\lib;C:\opt\bin;R:\home\build\libport_x86_windows_vcxx2005_release_dynamic\work\build\lib\libport\.libs;R:\usr\local\gostai\lib;R:\usr\local\gostai\bin;'
(lt_setenv) setting 'PATH' to 
'C:\boost_1_35_0\lib;C:\boost_1_35_0\bin;C:\opt\lib;C:\opt\bin;R:\home\build\libport_x86_windows_vcxx2005_release_dynamic\work\build\lib\libport\.libs;R:\usr\local\gostai\lib;R:\usr\local\gostai\bin;c:\windows;c:\windows\system;c:\vcxx8\vc\lib'
(main) lt_argv_zero : 
R:/home/build/libport_x86_windows_vcxx2005_release_dynamic/work/build/tests/libport/./.libs/lt-cli.exe
(main) newargz[0]   : 
R:/home/build/libport_x86_windows_vcxx2005_release_dynamic/work/build/tests/libport/./.libs/cli.exe
(main) failed to launch target 
"R:/home/build/libport_x86_windows_vcxx2005_release_dynamic/work/build/tests/libport/./.libs/lt-cli.exe":
 errno = 2




Also, I have enabled the DEBUGWRAPPER traces by changing libtool by  
hand, is there a better way?  Read the code I see that the wrappers  
support options, but I found no documentation about them, and there is  
no --lt-help: is this for Libtool developers only?


Cheers!

___
http://lists.gnu.org/mailman/listinfo/libtool