Subject: BUG #3818: Cross compilation problems
From: richard.evans@blueallegro.net ("Richard Evans")
Date: 12/15/2007 11:56:08 AM
The following bug has been logged online:
Bug reference: 3818
Logged by: Richard Evans
Email address: richard.evans@blueallegro.net
PostgreSQL version: 8.3beta
Operating system: Linux/windows
Description: Cross compilation problems
Details:
I've been investigating cross-compiling for mingw32 on a linux build system.
I used the current snapshot since it has a fix for the gettimeofday problem
with new mingw installs.
Mostly it worked, but there were a few problems which I think can all be
fixed in the configure script:
1. The configure script does not check for cross-compile installs of ar,
dlltool, dllwrap and windres. It manages to find the cross compile gcc
(mingw32-gcc in my install), but does not check for mingw32-dlltool, etc.
You work round this by setting AR= DLLTOOL= and DLLWRAP= on the make line
but ideally it should be done in the configure stage.
2. The Makefile in pgevent/bin refers to dllwrap directly, not $(DLLWRAP).
3. Several makefiles use windres directly; there is no $(WINDRES) variable
which can be set.
4. The zic problem in make install - see bug #1311. Simple solution here is
to have a configure option which allows the use of the build systems own zic
command.
I may try coming up with some patches to configure to check for dlltool, etc
but I haven't edited configure files before.
Once I worked round these problems I was able to cross compile a working
postgres for mingw32 on a linux host.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Subject: BUG #3818: Cross compilation problems
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/15/2007 12:12:18 PM
Magnus Hagander <magnus@hagander.net> writes:
> Richard Evans wrote:
>> 4. The zic problem in make install - see bug #1311. Simple solution here is
>> to have a configure option which allows the use of the build systems own zic
>> command.
> The rest of this is definitely not 8.3 material. But if you come up with
> patches for 8.4, I'm sure we'd be interested ;-)
--with-system-tzdata already solves the zic problem.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Subject: BUG #3818: Cross compilation problems
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/15/2007 1:28:51 PM
Richard Evans <richard.evans@blueallegro.net> writes:
>> --with-system-tzdata already solves the zic problem.
> If the target system does not have system tzdata, (mingw for example),
> you still need to run zic during the cross compile process.
No, you just need to physically copy a tzdata tree onto the target at
some point. If you're assuming that the host system has a compatible
zic, then it surely has got some installed tzdata files too.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|