From: Wayne Schroeder <waynes@san.rr.com>
To: pgsql-admin@postgresql.org
Cc: schroede@sdsc.edu
Subject: Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
Date: Wed, 08 Jun 2005 16:24:15 -0700
Message-ID: <42A77E1F.4AA6A98C@san.rr.com> (raw)
References: <42A73B13.6112A98A@san.rr.com>
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 -
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-admin@postgresql.org
Cc: waynes@san.rr.com, schroede@sdsc.edu
Subject: Re: Is there a way to build 32-bit mode on 64-bit Linux boxes?
In-Reply-To: <42A77E1F.4AA6A98C@san.rr.com>
References: <42A73B13.6112A98A@san.rr.com> <42A77E1F.4AA6A98C@san.rr.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