X-Original-To: pgsql-ports-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2D2499FA5F0 for ; Wed, 28 Jun 2006 06:34:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 31297-04 for ; Wed, 28 Jun 2006 06:34:00 -0300 (ADT) X-Greylist: delayed 00:24:06.966209 by SQLgrey- Received: from fep32-app.kolumbus.fi (fep32-0.kolumbus.fi [193.229.0.63]) by postgresql.org (Postfix) with ESMTP id AA97F9FA2F0 for ; Wed, 28 Jun 2006 06:34:00 -0300 (ADT) Received: from ovi.i.tavastisolutions.com ([81.197.3.54]) by fep32-app.kolumbus.fi with ESMTP id <20060628090950.LWZJ28725.fep32-app.kolumbus.fi@ovi.i.tavastisolutions.com> for ; Wed, 28 Jun 2006 12:09:50 +0300 Received: from aladobix.i.tavastisolutions.com (aladobix.i.tavastisolutions.com [10.0.0.52]) by ovi.i.tavastisolutions.com (8.13.4/8.13.4) with ESMTP id k5S99no2006496 for ; Wed, 28 Jun 2006 12:09:50 +0300 (EEST) Received: from tavasti by aladobix.i.tavastisolutions.com with local (Exim 4.50) id 1FvW3O-0000LX-Oa for pgsql-ports@postgresql.org; Wed, 28 Jun 2006 12:09:46 +0300 To: pgsql-ports@postgresql.org Subject: Cross-compiling under linux for Windows From: Markku Tavasti Organization: Tavasti Solutions Oy Date: Wed, 28 Jun 2006 12:09:46 +0300 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/14 X-Sequence-Number: 2455 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