Re: Is there a way to build 32-bit mode on 64-bit Linux boxes? - Mailing list pgsql-admin

From Mohan, Ross
Subject Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Date
Msg-id CC74E7E10A8A054798B6611BD1FEF4D30625DB69@vamail01.thexchange.com
Whole thread Raw
In response to Is there a way to build 32-bit mode on 64-bit Linux boxes?  (Wayne Schroeder <waynes@san.rr.com>)
List 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
modesince my app is not 64-bit ready yet. 

||  I'm kinda new to this, but...unless your app is compiled and linked into PG shared objects,
   I don't think it'll care whether it's talking to a 32 or 64 bit executable. Now, if 32  and 64
   cannot coexist on your Linux builds, that's a different issue.

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
settingenvironment 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
ofvarious 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?

||  you need to set the environment in the os/shell. I don't know how to do this
   on your system. on AIX, though, it's "export OBJECT_MODE=64".



Thanks much,

 - Wayne -

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




---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

pgsql-admin by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Next
From: Wayne Schroeder
Date:
Subject: Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?