This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Trying to compile gnupg 1.0.6


>>>>> "Sylvain" == Sylvain Petreolle <spetreolle@yahoo.fr> writes:

    Sylvain> Hi, I would use gnupg under cygwin and get these
    Sylvain> messages when I compile :
    Sylvain> Making all in cipher
    Sylvain> make[2]: Entering directory
    Sylvain> `/home/Nom/gnupg-1.0.6/cipher'
    Sylvain> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include
    Sylvain> -I../intl    -g -O2 -Wall -DIS_MODULE -shared -fPIC -o
    Sylvain> rndunix ./rndunix.c
    Sylvain> In file included from ./rndunix.c:103:
    Sylvain> ../include/util.h:207: warning: `stricmp' redefined
    Sylvain> /usr/include/string.h:80: warning: this is the
    Sylvain> location of the previous definition
    Sylvain> cc1.exe: warning: -fPIC ignored for target (all code
    Sylvain> is position independent)
    Sylvain> /cygdrive/c/WINDOWS/TEMP/ccmYyT2I.o: In function
    Sylvain> `start_gatherer':
    Sylvain> /home/Nom/gnupg-1.0.6/cipher/./rndunix.c:652:
    Sylvain> undefined reference to `g10_log_info'
    Sylvain> /home/Nom/gnupg-1.0.6/cipher/./rndunix.c:687:
    Sylvain> undefined reference to `g10_log_error'
    Sylvain> /cygdrive/c/WINDOWS/TEMP/ccmYyT2I.o: In function
    Sylvain> `gather_random':
    Sylvain> /home/Nom/gnupg-1.0.6/cipher/./rndunix.c:786:
    Sylvain> undefined reference to `g10_log_bug0'
    Sylvain> /home/Nom/gnupg-1.0.6/cipher/./rndunix.c:810:
    Sylvain> undefined reference to `g10_log_error'
    Sylvain> collect2: ld returned 1 exit status
    Sylvain> make[2]: *** [rndunix] Error 1
    Sylvain> make[2]: Leaving directory
    Sylvain> `/home/Nom/gnupg-1.0.6/cipher'
    Sylvain> make[1]: *** [all-recursive] Error 1
    Sylvain> make[1]: Leaving directory `/home/Nom/gnupg-1.0.6'
    Sylvain> make: *** [all-recursive-am] Error 2

    Sylvain> How could I solve this ? Has someone get it to compile
    Sylvain> ? Answers are welcome.

I got 1.0.5 compiled with the patch below, maybe you can borrow something.

--------------------------------- cut here --------------------------------

diff -upr /gnu/gnupg-1.0.5/cipher/rndw32.c gnupg-1.0.5/cipher/rndw32.c
--- /gnu/gnupg-1.0.5/cipher/rndw32.c	Sat Apr 28 20:52:40 2001
+++ gnupg-1.0.5/cipher/rndw32.c	Fri May 18 16:36:30 2001
@@ -68,6 +68,9 @@
 
 #include <windows.h>
 
+#if defined(__CYGWIN__)
+#include <winioctl.h>
+#endif
 
 #include "types.h"
 #include "util.h"
diff -upr /gnu/gnupg-1.0.5/configure gnupg-1.0.5/configure
--- /gnu/gnupg-1.0.5/configure	Sun Apr 29 16:38:16 2001
+++ gnupg-1.0.5/configure	Fri May 18 16:48:36 2001
@@ -1244,6 +1244,13 @@ case "${target}" in
     *-*-mingw32*)
         disallowed_modules="rndunix rndlinux rndegd"
         ;;
+     *-*-cygwin*)
+         # special stuff for cygwin
+         CC="gcc"
+         CPP="gcc -E"
+         RANLIB="ranlib"
+         disallowed_modules="rndunix rndw32 rndegd tiger"
+         ;;        
     *)
         disallowed_modules="rndw32"
        ;;
diff -upr /gnu/gnupg-1.0.5/mpi/config.links gnupg-1.0.5/mpi/config.links
--- /gnu/gnupg-1.0.5/mpi/config.links	Sun Apr 29 13:36:18 2001
+++ gnupg-1.0.5/mpi/config.links	Fri May 18 17:08:37 2001
@@ -255,6 +255,13 @@ fi
 # Make sysdep.h
 echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
 if test x$ac_cv_sys_symbol_underscore = xyes; then
+  case "${target}" in
+    *-*-cygwin* )
+    cat <<EOF >>./mpi/sysdep.h
+#define C_SYMBOL_NAME(name) _##name
+EOF
+	;;
+    *)
     cat <<EOF >>./mpi/sysdep.h
 #if __STDC__
 #define C_SYMBOL_NAME(name) _##name
@@ -262,6 +269,8 @@ if test x$ac_cv_sys_symbol_underscore = 
 #define C_SYMBOL_NAME(name) _/**/name
 #endif
 EOF
+	;;
+  esac
 else
     cat <<EOF >>./mpi/sysdep.h
 #define C_SYMBOL_NAME(name) name
diff -upr /gnu/gnupg-1.0.5/mpi/mpi-inline.h gnupg-1.0.5/mpi/mpi-inline.h
--- /gnu/gnupg-1.0.5/mpi/mpi-inline.h	Sun Apr 29 13:39:51 2001
+++ gnupg-1.0.5/mpi/mpi-inline.h	Fri May 18 16:58:43 2001
@@ -29,6 +29,10 @@
 #ifndef G10_MPI_INLINE_H
 #define G10_MPI_INLINE_H
 
+#ifndef G10_MPI_INTERNAL_H
+  #include "mpi-internal.h"
+#endif
+
 #ifndef G10_MPI_INLINE_DECL
   #define G10_MPI_INLINE_DECL  extern __inline__
 #endif
diff -upr /gnu/gnupg-1.0.5/util/secmem.c gnupg-1.0.5/util/secmem.c
--- /gnu/gnupg-1.0.5/util/secmem.c	Sun Apr 29 15:30:42 2001
+++ gnupg-1.0.5/util/secmem.c	Fri May 18 17:27:15 2001
@@ -159,7 +159,7 @@ lock_pool( void *p, size_t n )
      * wipes out the memory on a free().
      * Therefore it is sufficient to suppress the warning
      */
-  #elif defined (HAVE_DOSISH_SYSTEM)
+  #elif defined (HAVE_DOSISH_SYSTEM) || defined(__CYGWIN__)
     /* It does not make sense to print such a warning, given the fact that 
      * this whole Windows !@#$% and their user base are inherently insecure
      */

--------------------------------- cut here --------------------------------


Ciao
  Volker


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]