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 8DA3D9FA147 for ; Thu, 6 Jul 2006 11:48:43 -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 37493-06 for ; Thu, 6 Jul 2006 11:48:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fep02-app.kolumbus.fi (fep02-0.kolumbus.fi [193.229.0.44]) by postgresql.org (Postfix) with ESMTP id 6D7609FA0EC for ; Thu, 6 Jul 2006 11:48:36 -0300 (ADT) Received: from ovi.i.tavastisolutions.com ([81.197.3.54]) by fep02-app.kolumbus.fi with ESMTP id <20060706144834.JTIK15296.fep02-app.kolumbus.fi@ovi.i.tavastisolutions.com> for ; Thu, 6 Jul 2006 17:48:34 +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 k66EmXKu027183 for ; Thu, 6 Jul 2006 17:48:34 +0300 (EEST) Received: from tavasti by aladobix.i.tavastisolutions.com with local (Exim 4.50) id 1FyV9d-0002Qa-Cz for pgsql-ports@postgresql.org; Thu, 06 Jul 2006 17:48:33 +0300 To: pgsql-ports@postgresql.org Subject: Re: Cross-compiling under linux for Windows References: From: Markku Tavasti Organization: Tavasti Solutions Oy Date: Thu, 06 Jul 2006 17:48:33 +0300 In-Reply-To: (Markku Tavasti's message of "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: 200607/6 X-Sequence-Number: 2461 Markku Tavasti writes: > - 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 > > 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 At least one problem was here: 0 tavasti@aladobix:~/work/postgres/postgresql-8.1.4/src/interfaces/libpq$make ar crs libpq.a `lorder fe-auth.o fe-connect.o fe-exec.o fe-misc.o \ fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o \ pqsignal.o fe-secure.o md5.o ip.o wchar.o encnames.o noblock.o \ pgstrcasecmp.o thread.o crypt.o inet_aton.o getaddrinfo.o open.o \ snprintf.o win32.o libpqrc.o | tsort` nm: fe-auth.o: File format not recognized ... Running lorder to find what to link is problem. lorder did not understand file format, so nothing get's into the library. This works: ar crs libpq.a fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o \ fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o \ fe-secure.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o \ thread.o crypt.o inet_aton.o getaddrinfo.o open.o snprintf.o win32.o \ libpqrc.o So I got what I needed, so I didn't start checking whole build system to make it cross-compiling compatible. Hopefully this helps someone else in future. -- M. Tavasti / tavasti@tavastisolutions.com / +358-40-5078254