Libcurl (was Re: [Announce] GnuPG 1.4.1 released)

David Shaw dshaw at jabberwocky.com
Tue Mar 22 00:43:14 CET 2005


On Tue, Mar 22, 2005 at 12:18:03AM +0100, Carlo Luciano Bianco wrote:
> Il /21 mar 2005/, *David Shaw* ha scritto:
> 
> > On Sun, Mar 20, 2005 at 04:18:35PM +0100, Carlo Luciano Bianco wrote:
> > 
> >> 1) It seems that, when running a subprocess like a gpgkeys_*.exe, gpg.exe
> >> does not pass it the environment variables. Most notably, it does not pass
> >> the system %PATH%. Both gpg.exe and gpgkeys_*.exe depends on many dlls
> [...]
> > That's odd.  The only thing that jumps to mind is are you building
> > with the configure option "--disable-keyserver-path" or using the
> > GPG option "exec-path" ?
> 
> No, David. The only configure options I used are "--prefix" and "--with-
> libcurl". The only one difference between the configure commmand line 
> reported on my web page and the one I actually used is in the CFLAGS part, 
> where I used, e.g., "-march=athlon-xp" and some other optimizations. And 
> exec-path is not in my gpg.conf (I checked, to be double sure).
> 
> I have only modified, like reported on my web page, the lines in the 
> "configure" script where the directories are defined (lines 23881-23885):
> #define G10_LOCALEDIR     "c:\\\\programmi\\\\gnupg\\\\locale"
> #define GNUPG_LIBDIR      "c:\\\\programmi\\\\gnupg"
> #define GNUPG_LIBEXECDIR  "c:\\\\programmi\\\\gnupg"
> #define GNUPG_DATADIR     "c:\\\\programmi\\\\gnupg"
> #define GNUPG_HOMEDIR     "h:\\\\gnupg"

Interesting.  Some difference between POSIX style $PATH and W32 style
%PATH% maybe?  Now that I think about it, GPG on MinGW is going to end
up appending ':c:\\programmi\gnupg" to your PATH.  That may well
result in a problem since W32 wants ';c:\\programmi\gnupg' (with a
leading semicolon).

The odd thing is the code has been this way for years (literally since
2002!) and I don't recall this exact problem popping up before.  Also,
there are other current MinGW builds that do work properly, so I
suspect there is still something not understood here.

Still, for curiosity's sake, try this patch to g10/exec.c:

Index: exec.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/exec.c,v
retrieving revision 1.18
diff -u -r1.18 exec.c
--- exec.c      28 Oct 2004 02:14:06 -0000      1.18
+++ exec.c      21 Mar 2005 23:36:13 -0000
@@ -107,7 +107,7 @@
   if(curpath)
     {
       strcat(p,curpath);
-      strcat(p,":");
+      strcat(p,";");
     }
  
   strcat(p,path);

> >> 2) gpgkeys_hkp.exe, gpgkeys_finger.exe and gpgkeys_ldap.exe seem to work
> >> OK (provided the dlls are found), but gpgkeys_curl.exe does not run at
> >> all. As soon as it is started by gpg.exe, it crashes (and DrWatson comes
> [...]
> > Can you try running gpgkeys_curl.exe under gdb?
> 
> Yes, I can. I think it is better I rebuild it with "-g" and without 
> optimizations, right? I'll do it tomorrow as soon as I can.

Yes, with -g and no -O.  Thanks!

David



More information about the Gnupg-users mailing list