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: 4A965325.8080606@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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/refint.so to be built.
The error follows:

make -C ../../../contrib/spi refint.so autoinc.so
make[3]: Entering directory
`/home/zozo/Schönig-számlák/lucent/postgresql-8.3.5/contrib/spi'
gcc -m32 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement
-Wendif-labels -fno-strict-aliasing -fwrapv -fpic -DREFINT_VERBOSE -I.
-I../../src/include
-D_GNU_SOURCE -c -o refint.o refint.c
gcc -shared -o refint.so 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
http://www.postgresql.at/

Attachment Content-Type Size
Pg83-Makefile.port-fix.patch text/x-patch 314 bytes

Responses

Browse pgsql-hackers by date

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