Re: Compile errors when building 32-bit on 64-bit system
От | Andy Shellam |
---|---|
Тема | Re: Compile errors when building 32-bit on 64-bit system |
Дата | |
Msg-id | 4A524438.9040309@networkmail.eu обсуждение исходный текст |
Ответ на | Re: Compile errors when building 32-bit on 64-bit system (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Compile errors when building 32-bit on 64-bit system
|
Список | pgsql-admin |
> That sounds like you hadn't yet figured out to set CFLAGS too. > > Google or no Google, you're setting the wrong variable. > I had to install PG 8.3.7 on another couple of machines today, and got exactly the same issue (setting all 3 variables) again on the SPI module. Please see as follows: Configure line: CFLAGS="-m32" LD="ld -melf_i386" LDFLAGS="-m32" ./configure .... etc .... "make" fails with the error: gcc -shared -o refint.so refint.o /usr/bin/ld: warning: i386 architecture of input file `refint.o' is incompatible with i386:x86-64 output refint.o: In function `check_primary_key': refint.c:(.text+0x8f): undefined reference to `elog_start' refint.c:(.text+0xa5): undefined reference to `elog_finish' ... etc ... Running the following commands manually allows the install to continue - notice how I have to add "-m32" to the second gcc command: # cd 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 -I/opt/nmail32/libxml2/include/libxml2 -I/opt/nmail32/libxml2/include/libxml2 -I/opt/nmail32/zlib/include -I/opt/nmail32/readline/include -I/opt/nmail32/openssl/include -I/opt/nmail32/ncurses/include -c -o refint.o refint.c # gcc -m32 -shared -o refint.so refint.o And the same for "autoinc.o": # 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 -I/opt/nmail32/libxml2/include/libxml2 -I/opt/nmail32/libxml2/include/libxml2 -I/opt/nmail32/zlib/include -I/opt/nmail32/readline/include -I/opt/nmail32/openssl/include -I/opt/nmail32/ncurses/include -c -o autoinc.o autoinc.c # gcc -m32 -shared -o autoinc.so autoinc.o # make ........ All of PostgreSQL successfully made. Ready to install. So it appears the SPI module is respecting CFLAGS, but ignoring LDFLAGS.
В списке pgsql-admin по дате отправления: