From: Markku Tavasti <tavasti@tavastisolutions.com>
To: pgsql-ports@postgresql.org
Subject: Cross-compiling under linux for Windows
Date: Wed, 28 Jun 2006 12:09:46 +0300
Message-ID: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com> (raw)
I'm trying to cross-compile postgresql-8.1.4 for windows under Debian
Linux. This is how I've tried to run configure:
CC=i586-mingw32msvc-gcc RANLIB=i586-mingw32msvc-ranlib ./configure \
--prefix=/usr/local/stow/pg-msw-8.0.4/msw-dev/ --host i586-pc-mingw32 \
--without-zlib --disable-shared
However, not very successfully:
- I have to run i586-mingw32msvc-ranlib manually for
src/port/libpgport.a and src/port/libpgport_srv.a
- have to edit few makefiles to change windres to 586-mingw32msvc-windres
And still, no go:
i586-mingw32msvc-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing initdb.o win32ver.o -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -Wl,--allow-multiple-definition -lpgport -lwsock32 -lm -lws2_32 -lshfolder -o initdb.exe
initdb.o:initdb.c:(.text+0x18a0): undefined reference to `_pqsignal'
initdb.o:initdb.c:(.text+0x227c): undefined reference to `_pg_char_to_encoding'
initdb.o:initdb.c:(.text+0x2292): undefined reference to `_pg_valid_server_encoding'
initdb.o:initdb.c:(.text+0x250e): undefined reference to `_pqsignal'
initdb.o:initdb.c:(.text+0x251c): undefined reference to `_pqsignal'
initdb.o:initdb.c:(.text+0x252a): undefined reference to `_pqsignal'
initdb.o:initdb.c:(.text+0x2538): undefined reference to `_pqsignal'
initdb.o:initdb.c:(.text+0x2543): undefined reference to `_pqsignal'
collect2: ld returned 1 exit status
make[3]: *** [initdb] Error 1
make[3]: Leaving directory `/home/tavasti/work/postgres/postgresql-8.1.4/src/bin/initdb'
In fact all I would essentially need is static libpq.a, but even that doesn't
look very good:
-rw-rw-r-- 1 tavasti tavasti 8 Jun 28 10:55 libpq.a
--
M. Tavasti / tavasti@tavastisolutions.com / +358-40-5078254
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-ports@postgresql.org
Cc: tavasti@tavastisolutions.com
Subject: Re: Cross-compiling under linux for Windows
In-Reply-To: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com>
References: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox