pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markku Tavasti <tavasti@tavastisolutions.com>
To: pgsql-ports@postgresql.org
Subject: Re: Cross-compiling under linux for Windows
Date: Thu, 06 Jul 2006 17:48:33 +0300
Message-ID: <m2k66qbxha.fsf@aladobix.i.tavastisolutions.com> (raw)
In-Reply-To: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com>
References: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com>

Markku Tavasti <tavasti@tavastisolutions.com> 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



view thread (2+ messages)

Message-ID: <m2k66qbxha.fsf@aladobix.i.tavastisolutions.com>
Permalink:  ../m2k66qbxha.fsf@aladobix.i.tavastisolutions.com/
Also on:    postgresql.org/message-id/m2k66qbxha.fsf@aladobix.i.tavastisolutions.com

 · 

reply

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: <m2k66qbxha.fsf@aladobix.i.tavastisolutions.com>
  References: <m2zmfxejdx.fsf@aladobix.i.tavastisolutions.com> <m2k66qbxha.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