Skip site navigation (1) Skip section navigation (2)

Build system problem in 8.3.x

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Hans-Juergen Schoenig <hs(at)cybertec(dot)at>
Subject: Build system problem in 8.3.x
Date: 2009-08-27 09:34:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

we have come across a problem in 8.3.x (8.3.5 and 8.3.7 was tested)
while building PostgreSQL for 32-bit on 64-bit RHEL5 and Fedora 9.

The following defines were used before running configure:

export CFLAGS="-m32"
export LD="ld -melf_i386"

The above are needed because when SUBSYS.o files are created,
the $(LD) ... lines don't contain $(LDFLAGS) anywhere, so overriding
$(LD) on the command line has to be done instead.

However, there's one additional problem that can be solved by the
attached one liner. The problem is that during building the core,
something (test/regress) requires contrib/spi/ to be built.
The error follows:

make -C ../../../contrib/spi
make[3]: Entering directory
gcc -m32 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wendif-labels -fno-strict-aliasing -fwrapv -fpic -DREFINT_VERBOSE -I.
-D_GNU_SOURCE   -c -o refint.o refint.c
gcc -shared -o refint.o
/usr/bin/ld: i386 architecture of input file `refint.o' is incompatible
with i386:x86-64 output

I tried building contrib manually, but it turned out that the same
error happens whenever contrib/*/Makefile contains MODULES
instead of MODULE_big.

I modified Makefile.port in the attached patch, and now
all the contrib files also build correctly.

Best regards,
Zoltán Böszörményi

Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH

Attachment: Pg83-Makefile.port-fix.patch
Description: text/x-patch (314 bytes)


pgsql-hackers by date

Next:From: Paul MatthewsDate: 2009-08-27 09:46:29
Subject: Patches for static check on geo_ops.c
Previous:From: Tino WildenhainDate: 2009-08-27 08:23:20
Subject: Re: MySQL Compatibility WAS: 8.5 release timetable, again

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group