Re: Error building 32 bit on 64 bit linux system

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Doug Knight <dknight(at)wsi(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error building 32 bit on 64 bit linux system
Date: 2008-02-18 14:17:14
Message-ID: 47B9936A.1070800@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm not sure, but maybe linker also needs a switch to make 32bit output.

Zdenek

Doug Knight napsal(a):
> All,
> I am trying to build 8.2.5, forcing to a 32 bit build on a 64 bit
> system. I have set CFLAGS=-m32, and I run the configure and make/make
> install as follows:
>
> setarch i386 ./configure
> setarch i386 make
> setarch i386 make install
>
> However, I get the following error (using timezone for example):
>
> $ make
> gcc -m32 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -I../../src/include -D_GNU_SOURCE -c -o localtime.o localtime.c
> gcc -m32 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -I../../src/include -D_GNU_SOURCE -c -o strftime.o strftime.c
> gcc -m32 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -I../../src/include -D_GNU_SOURCE -c -o pgtz.o pgtz.c
> /usr/bin/ld -r -o SUBSYS.o localtime.o strftime.o pgtz.o
> /usr/bin/ld: Relocatable linking with relocations from format elf32-i386
> (localtime.o) to format elf64-x86-64 (SUBSYS.o) is not supported
> make: *** [SUBSYS.o] Error 1
>
> Funny thing is, there is no SUBSYS.o in my current directory. If I build
> from the top, I see this same error in each dirctory/makefile where a
> SUBSYS.o is linked with. If I search my build tree after a top-down
> build, I do not see any SUBSYS.O files at all. Where is this SUBSYS.o
> getting created, and why isn't it being created as a 32 bit file instead
> of 64 bit?
>
> Doug Knight
> WSI Corp
> Andover, MA, USA

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-02-18 14:48:15 Re: Error building 32 bit on 64 bit linux system
Previous Message Doug Knight 2008-02-18 13:27:14 Error building 32 bit on 64 bit linux system