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

From Wayne Schroeder
Subject Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Date
Msg-id 42A77E1F.4AA6A98C@san.rr.com
Whole thread Raw
In response to Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?  (Wayne Schroeder <waynes@san.rr.com>)
List pgsql-admin
I need to back up a bit and explain why I was hoping there was a better way to
build everything as 32-bit.

On a 64-bit Linux host, if I just try to build as usual, I get errors in my
MCAT app since it is not 64-bit compatible yet. If I try to build everything
(postgresql, odbc, and mcat) 32-bit, I get different errors, starting with
postgresql.  If I try to build postgresql 64-bit and odbc 32-bit I get
different errors.

(To try to build in 32-bit mode, I have my install.pl script set environment
variables CFLAGS and LDFLAGS to -m32.  This may not be all that is needed, but
I figured it was worth a shot.)

When trying to build all 3 as 32-bit, I get this when building postgresql:
./configure --prefix=/scratch/slocal/schroede/test2/pgsql --enable-odbc
--without-readline
gmake
/usr/bin/ld: Relocatable linking with relocations from format elf32-i386
(heaptuple.o) to format elf64-x86-64 (SUBSYS.o) is not supported
gmake[4]: *** [SUBSYS.o] Error 1
gmake[3]: *** [common-recursive] Error 2
gmake[2]: *** [access-recursive] Error 2
gmake[1]: *** [all] Error 2
gmake: *** [all] Error 2

When I try to build postgresql 64-bit and odbc 32-bit, postgresql builds fine,
but I get this when trying odbc:
./configure --prefix=/scratch/slocal/schroede/test2/pgsql --enable-static
gmake
/usr/bin/ld: warning: i386 architecture of input file `info.lo' is
incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `bind.lo' is
incompatible with i386:x86-64 output
and the same warning for:  columninfo.lo, connection.lo, convert.lo,
drvconn.lo, environ.lo, execute.lo, lobj.lo, win_md5.lo, misc.lo options.lo,
pgtypes.lo, psqlodbc.lo, qresult.lo, results.lo, socket.lo, parse.lo,
statement.lo, tuple.lo, tuplelist.lo, dlg_specific.lo, odbcapi.lo,
multibyte.lo, gpps.lo, odbcapi30.lo, pgapi30.lo, and info30.lo.  Those are
warnings, but apparently it makes the library 64-bit because then when it
tries to link my MCAT/SRB app, I get:
gmake
/usr/bin/ld: skipping incompatible
/scratch/slocal/schroede/test2/pgsql/lib/libpsqlodbc.a when searching for
-lpsqlodbc
/usr/bin/ld: cannot find -lpsqlodbc
collect2: ld returned 1 exit status

So is this second mode, 64 bit postgresql and 32 bit odbc, that I should try
to get working?  Or would
the all-32-bit have a better chance?

Am I the only one with this 32/64-bit problem?

We will convert our app to 64-bit sometime, but if there is a fairly easy
workaround for now, I'd like to make use of it.  Otherwise, we'll just
continue to say we can't support MCAT on 64-bit linux boxes (for now).

 - Wayne -



pgsql-admin by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Indexes getting corrupted.
Next
From: KÖPFERL Robert
Date:
Subject: Stripping raid vs. table spaces