[Top][All Lists]

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

RE: Build Guile for Win32

From: Crowder, Brian
Subject: RE: Build Guile for Win32
Date: Fri, 7 Sep 2001 08:56:07 -0700

I've actually tried 3 of the build techniques you suggest, and the closest
I've gotten to success is using the cygwin environment (for awk, etc. that
configure needs), but the mingw compilers and libraries, and doing

./configure --build=i386-mingw32 (--disable-networking --disable-regex and
so on are useful for me, ymmv)

This works decently, except that it yields a libguile.a, and since I need a
.dll/.lib for MSVC (I'm building guile into another project), I then do
something like the following:

// After acquiring a2dll, which is really just a dlltool script:
//  -- note the -lws2_32, which is required even though I've said "no
//     I suspect this means that select is being used for regular file I/O
//     which isn't a problem for me, but maybe for others (I don't need
guile's file I/O)

// This creates the DLL
a2dll libguile.a -mno-cygwin -lws2_32 --target=i386-ming32

// a2dll makes this libguile.a.static, which is really just the old
libguile.a renamed...
// for some reason it also creates a much smaller libguile.a, whose purpose
I know not

// This command yields a .def file, which dlltool will then need to create a
lib file
// from my .dll
dlltool libguile.a.static --export-all-symbols --output-def guile.def

// Finally... the .lib file
dlltool -d guile.def -l guile.lib guile.dll

I had to do some other rather unfortunate hackery, also...  there are
several macros throughout the libguile code which make use of globals
(argh), which need to be declared "declspec(dllimport)" in order for the DLL
to share them properly...  due to whatever weirdness in M$' bungling DLL
architecture.  Additionally, there are some files with do not appear to be
created properly by my configure, noteable mkstemp.c and some fileops
thing...  I "touch"d these and the build went fine.

I DID build Guile 1.4 under MSVC.  It was a nightmare.  A lot of the files
guile needs to build are automagically generated.  I basically did a make
under cygwin (or maybe linux?) to get those files in place, and then hacked
and tweaked until I could get as much as possible to build.  It seems it
might be possible to make configure actually generate .dsp files (which are
really only text, after all) for an MSVC build, but that also seems like an
enormous project.  Plus you'd still need all the usual text utilities to
make configure work at all.

Anyway, if anyone wants my guile-1.5.1 Win32 DLLs, I'll be glad to make them
available (I'm not sure what's the best way? Sourceforge?)...  They're very
very minimal functionality, I disable everything which configure can disable
(not because it doesn't build, but because I don't need it).


-----Original Message-----
From: Neil Jerram [mailto:address@hidden
Sent: Friday, September 07, 2001 3:24 AM
To: Crowder, Brian
Cc: 'address@hidden'
Subject: Re: Build Guile for Win32

>>>>> "Brian" == Crowder, Brian <address@hidden> writes:

    Brian> Yeah, that's how I managed to create my DLL...  not having
    Brian> this as a part of the usual build system (especially since
    Brian> the libtool stuff should make it automagic) is rough,
    Brian> though

I think it would be good for Guile to build straightforwardly on
Win32.  However, my perception of the sporadic traffic on this subject
is that

- there are several different approaches that people are taking
  (cygnus, mingw32, lkcc, msvc), all of which have their own,
  different issues

- the people from the different approaches never reply to each others'

- no one is putting the results of this experience together in a
  sufficiently authoritative way.

Perhaps what is needed is a really good summary of the possible
approaches and current issues...


reply via email to

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