libtool
[Top][All Lists]
Advanced

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

libtool.git & cl.exe & Mingw32


From: Akim Demaille
Subject: libtool.git & cl.exe & Mingw32
Date: Fri, 19 Dec 2008 11:41:34 +0100

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:

Attachment: log.txt
Description: Text document




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!


reply via email to

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