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