bzip2 cross-compiling problem

Werner Koch wk at gnupg.org
Wed Mar 2 15:56:42 CET 2005


On Tue, 01 Mar 2005 08:58:25 -1000, Tenui  said:

> I have installed the Debian MinGW environment to cross-compile gpg for
> Windows. My first attempt, with 1.4.1rc2, seemed to compile without
> problems, but when transferred to a Windows box I found there was no
> bzip2 capability included.

I recall that I put a libbz2.a into /usr/i586-mingw32msvc/lib/.  This
has been build from a vanilla bzip2-1.0.2 using these changes:

diff -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile
--- orig/bzip2-1.0.2/Makefile	2002-01-26 00:34:53.000000000 +0100
+++ bzip2-1.0.2/Makefile	2004-11-03 14:10:45.000000000 +0100
@@ -2,9 +2,9 @@
 SHELL=/bin/sh
 
 # To assist in cross-compiling
-CC=gcc
-AR=ar
-RANLIB=ranlib
+CC=i586-mingw32msvc-gcc
+AR=i586-mingw32msvc-ar
+RANLIB=i586-mingw32msvc-ranlib
 LDFLAGS=
 
 # Suitably paranoid flags to avoid bugs in gcc-2.7
diff -u orig/bzip2-1.0.2/bzlib.h bzip2-1.0.2/bzlib.h
--- orig/bzip2-1.0.2/bzlib.h	2001-12-30 03:19:45.000000000 +0100
+++ bzip2-1.0.2/bzlib.h	2004-11-03 14:32:41.000000000 +0100
@@ -62,6 +62,7 @@
 #ifndef _BZLIB_H
 #define _BZLIB_H
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -113,7 +114,7 @@
 /* Need a definitition for FILE */
 #include <stdio.h>
 
-#ifdef _WIN32
+#if defined( _WIN32 ) && 0
 #   include <windows.h>
 #   ifdef small
       /* windows.h define small to char */



Shalom-Salam,

   Werner







More information about the Gnupg-users mailing list