Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] (PR#14767) Build-time Lua execution problems when cross co
Home

[Freeciv-Dev] (PR#14767) Build-time Lua execution problems when cross co

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#14767) Build-time Lua execution problems when cross compiling
From: "Nicolas A. Mendoza" <mendoza@xxxxxxxxxxx>
Date: Sat, 3 Dec 2005 19:54:11 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14767 >


Hi, as mentioned in the #freeciv-dev channel, I've had some troubles cross 
compiling freeciv due to the need for running lua at build time. I have 
made a workaround for it when compiling for AmigaOS, but it's not nice. It 
basically does something like this:

16:33 < nicomen> who do I send patches to, and who do I complain to about 
bad tolua compilation implementation for cross compilation?
16:33 < per> nicomen: send patches and bug reports to bugs@xxxxxxxxxxx
16:34 < vasc> nicomen, you can complain to me, since i added lua to the 
tree
16:34 < vasc> nicomen, but i'm afraid if i knew how to fix that i would 
have already
16:34 < vasc> :-)
16:34 < vasc> i think the win32 developer complained about it before
16:35 < vasc> i am afraid my autotools-fu is too weak for that
16:38 < nicomen> vasc: well I could show you the anal way I'm doing it now
16:39 < nicomen> there's basically just three libs that need to go into 
the server
16:40 < nicomen> they could be compiled with a different target name when 
they need to be linked into the compile-time binaries
16:40 < nicomen> compield=re-compiled
16:41 < vasc> if you can get a patch, i can look at it
16:41 < vasc> i am more worried about getting it working in an easy to use way 
than being pretty

16:42 < nicomen> right now I'm doing a different target configure of the 
whole tree, run that, wait till lua barfs, move away three libs, make 
clean in lua dir, use previous config from linux configure, make 
build-time lua stuff, run them, continue with diff target make of the 
whole tree, sllightly change the linking of civserver and civmanual to 
point to the previously saved .a files and it works

16:42 < vasc> if we wanted pretty configuration we wouldn't be using autotools 
i guess :-)
16:42 < nicomen> haha

As you can see not very nice, here's a script I quickly assembled, the 
dings.tgz is the lua subdir after a linux (build host) configure.

http://home.polarboing.com/nicomen/freeciv/compile.Amiga

The two last linking lines are "hard coded", just exchanged the path to 
the lib*lua*.a files,



A clean solution would need to make two intances of liblua.a, liblualib.a 
and libtolua. as those are needed both in the build time tolua-programs 
and in civserver and civmanual.

Building two versions and putting the resulting .a file in different 
places should be easy.

What is a bit more tiresome is to use different compilation settings for 
the build time binary version and the civserver/civmanual version.

I suggest you start out with using BUILD_AR, BUILD_CC, BUILD_LINK, 
BUILD_LDFLAGS etc. They should be set to whatever configure would've used 
if no --target/--host parameter was set. Since those commands don't use 
SDL or ft2, they should also ignore the --with-*(-exec)-prefix params, and 
it should also use default --include* etc. values.

It should be possible, but it just requires you to keep an eye open.

This is needed to be changed for all cross compilations btw. so it's not 
just a request from an annoying Amiga user/developer ;-D

-- 
Nicolas Mendoza





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#14767) Build-time Lua execution problems when cross compiling, Nicolas A. Mendoza <=