Mailing List Archive

Win32 build
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Hi --

I've created a complete build system for libgpg-error and
libgcrypt for Windows. Instead of fighting against autoconf
quirks, I wrote custom makefiles just for Windows builds. The
Gaim project (http://gaim.sourceforge.net) does the same thing, and
its worked well for them for over a year.

So, here's what you need to do if you want to build a
'libgcrypt.dll':

1.) Download and install Cygwin (http://www.cygwin.com). Be sure to
install the 'make', 'patchutils', and 'perl' packages as well.

2.) Download and install MinGW (http://prdownloads.sf.net/mingw/
MinGW-3.1.0-1.exe?download).

3.) Start a Cygwin bash shell, and type:

export PATH=/cygdrive/c/MinGW/bin:$PATH

.. assuming that you installed MinGW at the 'C:\' default. This will
set your path so that later on you will compile everything with MinGW's
tools instead of Cygwin's. If you start another shell later, remember
to re-set this PATH.

4.) Extract libgpg-error, and copy 'win32_gpg-error_makefiles.tar.bz2'
and 'win32_gpg-error.patch' into the newly-created
'libgpg-error-0.7' directory. 'cd' into this directory, and apply the
patch with:

patch -p1 < win32_gpg-error.patch

Then extract the 'win32_gpg-error_makefiles.tar.bz2' file here too.

5.) Start building libgpg-error with:

make -f Makefile.mingw

6.) Extract libgcrypt, and copy 'win32_gcrypt.patch' and
'win32_gcrypt_makefiles.tar.bz2' into the newly-created
'libgcrypt-1.2.0' directory. 'cd' into this directory, and apply the
patch with:

patch -p1 < win32_gcrypt.patch

Then extract the 'win32_gcrypt_makefiles.tar.bz2' file here too.

7.) Start building libgcrypt with:

make -f Makefile.mingw



.. and that's all there is to it! You should end up with a
'libgcrypt.dll' file if you followed these instructions correctly.
There will also be EXEs in the tests/ subdirectory for you to play with.

Over the next few days, I plan on improving the Win32 entropy
gatherer (rndw32.c) also. Sit tight.

- low halo

P.S. To the libgcrypt/libgpg-error maintainers: could you have a look
at my patches and consider them for inclusion into CVS? Thanks!

- --
low halo <lowhalo at-s1gn hacktivismo d0t c0m>
Defender of Truth and Liberty
http://ultramagnetic.sourceforge.net/
http://www.hacktivismo.com/

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x3AFB17F6
9AB1 FF04 016F 89A3 5B4E A585 BDBB 5FBE 3AFB 17F6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Your Mother)

iD8DBQFAvlAVvbtfvjr7F/YRAh9vAJ9CHN9GeMOsisMBkNzfa9pStlBK3ACfZwbJ
warzBq/HO48whXTGp97N7hM=
=Rb9p
-----END PGP SIGNATURE-----
Re: Win32 build [ In reply to ]
At Wed, 2 Jun 2004 15:04:53 -0700,
low halo, Defender of Truth and Liberty wrote:
> I've created a complete build system for libgpg-error and
> libgcrypt for Windows. Instead of fighting against autoconf
> quirks, I wrote custom makefiles just for Windows builds. The
> Gaim project (http://gaim.sourceforge.net) does the same thing, and
> its worked well for them for over a year.

Can you please fight against autoconf quirks (if they are that, and
not windows or ming32 quirks)? I can't really see us baby-sitting
hand-written Makefiles for Windows.

Thanks,
Marcus
Re: Win32 build [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I can't really see us baby-sitting hand-written Makefiles for
> Windows.

Can _I_ baby-sit the Windows Makefiles? My project is very
dependent upon a working Win32 version, and so you can count on
me sticking around.

- low halo

- --
low halo <lowhalo at-s1gn hacktivismo d0t c0m>
Defender of Truth and Liberty
http://ultramagnetic.sourceforge.net/
http://www.hacktivismo.com/

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x3AFB17F6
9AB1 FF04 016F 89A3 5B4E A585 BDBB 5FBE 3AFB 17F6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Your Mother)

iD8DBQFAxSgivbtfvjr7F/YRAkvOAJ45Jk6v3VH/VBv2zknpP/GmY9zAhQCeP92n
LbBHC/+lJfdYhLPV7KdtZLU=
=QT4Y
-----END PGP SIGNATURE-----




Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
https://www.hushmail.com/services.php?subloc=messenger&l=434

Promote security and make money with the Hushmail Affiliate Program:
https://www.hushmail.com/about.php?subloc=affiliate&l=427
Re: Win32 build [ In reply to ]
At Mon, 7 Jun 2004 19:47:38 -0700,
low halo, Defender of Truth and Liberty wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> > I can't really see us baby-sitting hand-written Makefiles for
> > Windows.
>
> Can _I_ baby-sit the Windows Makefiles? My project is very
> dependent upon a working Win32 version, and so you can count on
> me sticking around.

Well, of course you can babysit them. But the requirements for
inclusion into our main source tree include that we are willing to
accept responsibility for the code and maintain it even if you abandon
it.

This alone is not a reason against including it per se, but it
increases the barrier. The real reason not to include it is that we
_want_ to use autoconf consistently. It's the right thing to do, and
there should be no major obstacle in the way.

I don't know why you think that this is any harder than writing custom
makefiles. I know that autoconf has a somewhat steep learning curve,
but by all means, if you stumble upon something that you can't easily
resolve with the existing examples in gpg or with the instructions in
the manual, you are more than welcome to raise them here on the
mailing list so we can help you out or discuss alternatives. Everyone
of us had their own hair-pulling autoconf adventure, but that's no
reason to just bypass it a priori.

Thanks,
Marcus
Re: Win32 build [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



> we _want_ to use autoconf consistently.

Very well. I will try my hand at it again.

What environment do you want me to do this in? Last time
I tried this, I noticed that MSYS + MinGW had a seperate
set of quirks vs. Cygwin + MinGW. I personally vote for the
MSYS + MinGW (unless it turns out to be harder =P).

- low halo

- --
low halo <lowhalo at-s1gn hacktivismo d0t c0m>
Defender of Truth and Liberty
http://ultramagnetic.sourceforge.net/
http://www.hacktivismo.com/

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x3AFB17F6
9AB1 FF04 016F 89A3 5B4E A585 BDBB 5FBE 3AFB 17F6

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Your Mother)

iD8DBQFAxmXfvbtfvjr7F/YRAnX3AJ0conwKTdUOL55wJl1bOKaDFtkp8ACfYOHA
axqkDtxA7Ya6vmSJKpo1KYA=
=o8uN
-----END PGP SIGNATURE-----




Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
https://www.hushmail.com/services.php?subloc=messenger&l=434

Promote security and make money with the Hushmail Affiliate Program:
https://www.hushmail.com/about.php?subloc=affiliate&l=427
Re: Win32 build [ In reply to ]
At Tue, 8 Jun 2004 18:25:37 -0700,
low halo, Defender of Truth and Liberty wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> > we _want_ to use autoconf consistently.
>
> Very well. I will try my hand at it again.
>
> What environment do you want me to do this in? Last time
> I tried this, I noticed that MSYS + MinGW had a seperate
> set of quirks vs. Cygwin + MinGW. I personally vote for the
> MSYS + MinGW (unless it turns out to be harder =P).

As far as I understand it the idea is to cross compile from GNU/Linux
to MS Windows using GNU/Linux and Werner's hacked MingW. I guess this
is matched closer by Cygwin+MinGW. I suggest not to bend over
backwards to get it working in MSYS (unless you want to improve MSYS
until it is capable of doing the job).

Thanks,
Marcus
Re: Win32 build [ In reply to ]
On Wed, 09 Jun 2004 06:34:44 +0200, Marcus Brinkmann said:

> As far as I understand it the idea is to cross compile from GNU/Linux
> to MS Windows using GNU/Linux and Werner's hacked MingW. I guess this

Just for the record: mingw32/cpd is older than the mingw.org thing
used today. They both stem from Colin Peter's orginal mingw32.

Marcus is right, we do not want to support anything else than
mingw32/cpd. The reasons for this are: Less modifications to the
source, if something useful is missing we can add it to the
mingw32/cpd and we use the same build environment for all platforms.
This ain't no problem because that libgcrypt.dll shall be a
self-contained W32 API thing (except for the parts were we can't do it
(entropy gatherer)).

> is matched closer by Cygwin+MinGW. I suggest not to bend over
> backwards to get it working in MSYS (unless you want to improve MSYS

There are subtle incompatibilities between the different environments
and you need to make sure that all parts of GnuPG are build in the
same environment. A Cygwin GnuPG and a MSYS GPGME won't work in all
cases.

Werner
Re: win32 build [ In reply to ]
On Mon, 8 Nov 2004 11:10:40 -0800, Ulf Schenk said:

> Is there somewhere a howto document that describes how to compile
> libgcrypt for windows. I could not find anything on the website.
> The targetsystem would be the MSVC 7.0/7.1 compiler.

I have not tried it yet and will definitely not use MSVC ;-). Please
take care that using Libgcrypt under Windows is subject to the terms
of the GPL not the LGPL.

Werner