Is there a way to build 32-bit mode on 64-bit Linux boxes?

From: Wayne Schroeder <waynes(at)san(dot)rr(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Date: 2005-06-08 16:54:27
Message-ID: 42A722C2.E5CDE439@san.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm trying to build postgresql and odbc from source on x86_64 Linux
hosts but I need to run them in 32-bit addressing mode since my app is
not 64-bit ready yet.

Simple test programs can be built as 32-bit apps (if the libraries are
installed) via gcc's -m32 option.

I checked for postgres configure options to do something similar, but
didn't find anything. I experimented with setting environment
variable CFLAGS to -m32 and it does seem to be picked up by
configure/make, but then 'ld' gets errors:
/usr/bin/ld -r -o SUBSYS.o heaptuple.o indextuple.o indexvalid.o
printtup.o scankey.o tupdesc.o
/usr/bin/ld: Relocatable linking with relocations from format
elf32-i386 (heaptuple.o) to format elf64-x86-64 (SUBSYS.o) is not
supported
So ld needs some additional options of some sort, but it looks like
that would involve some complicated specifications of various libraries.

I checked the archives, but didn't see anything about this.

Is there any way to do this? Any plans to add it? Any hints on what
I could try?

Thanks much,

- Wayne -

(This is my home email address as I was unable to post from work
(schroede(at)sdsc(dot)edu))
http://users.sdsc.edu/~schroede
SDSC Storage Resource Broker group http://www.sdsc.edu/srb

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joshua D. Drake 2005-06-08 17:04:34 Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Previous Message Devrim GUNDUZ 2005-06-08 14:46:39 Re: [Newbie] RedHat 7.2 & Postgresql 8