Re: Testing GLib cross compilation



Ross Burton <ross burtonini com> writes:

> On Wed, 2002-12-11 at 22:41, Owen Taylor wrote:
> > Since my set of cross-compilation environments is rather 
> > limited (I have a partially working linux to mingw32 
> > environment), I'd appreciate it if people would try out
> > the changes so we can make sure that it actually is 
> > functional for GLib-2.2.0.
> 
> I run Debian Sid, with the ming32 package installed.  With prebuilt 
> libiconv and gettext sitting in ~/tmp/Wasteland/win32-root/..., the
> following command configured glib:
> 
> CPPFLAGS=-I/home/users/ross/tmp/Wasteland/win32-root/include/
> LDFLAGS=-L/home/users/ross/tmp/Wasteland/win32-root/lib/
> ./autogen.sh --cache-file=win32.cache --host=i586-mingw32msvc
> 
> I specified the host instead of target, as that way it uses the ming32-
> prefixed gcc tools. There may be another way to do this though, I am not
> a cross-compiling expert.

--target= in my docs was just a slipup... --host= is right.
 
> Many thanks everyone for getting Glib to cross-compile cleanly. In the
> future I'll be building up to gtkmm for Windows (hopefully
> cross-compiling from linux), so this is a great start.
> 
> Would it be possible to include win32.cache in the tarball?

It would actually only take a single added default
(glib_cv_stack_grows=no) to cross-compile to mingw32 withouat
any cache file at all. So, I might do that.

I don't want to be responsible for maintaining cache files;
there is a pretty much infinite possible set, and there is
no way I could keep submitted files up to date.

> /me watches it build
> 
> Dammit, the glib/build/win32/compile-resource expects "windres" to
> exist, but for me its called i586-mingw32msvc-windres.  I can hack
> around this now, but do not know enough to fix this correctly. Obviously
> configure knows what the prefix is for the tools, and should supply that
> as a variable.

Probably the build/ directory needs some help for cross-compilation;
probably simply adding:

 AC_CHECK_TOOL(WINRES, winres)

to configure.in, and then using $(WINRES) instead of winres
in the Makefile.am.
 
> Now I'm getting:

[ Further problems omittted ]

Note the mention of "partially working" in my mail....
I've never successfully gotten a win32 build past GLib either 
cross or natively, honestly. 

Supposedly J. Ali Harlowe was having some success getting everything 
cross-compiled from Linux to Windows; I haven't seen full details
of what he was doing, however.

Regards,
                                        Owen



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