From: | Rod Taylor <pg(at)rbt(dot)ca> |
---|---|
To: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | 64Bit Solaris Compile |
Date: | 2004-11-22 18:27:18 |
Message-ID: | 1101148038.5660.2.camel@home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Our local admin tried compiling a 64bit PostgreSQL on Solaris 9 using
the below environment:
export
PATH=:/usr/bin/sparcv9:/usr/ccs/bin/sparcv9:/usr/sfw/bin/sparcv9:/usr/local/bin/sparcv9:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
export
LD_LIBRARY_PATH=/usr/lib/sparcv9:/usr/ccs/lib/sparcv9:/usr/local/lib/sparcv9:/usr/sfw/lib/sparcv9
export CFLAGS='-m64'
export CXXFLAGS=$CFLAGS
export CPPFLAGS="-I/usr/include -I/usr/include/ncurses"
This resulted in:
make[3]: Entering directory
`/export/home/rbt/postgresql-8.0.0beta4/src/backend/utils/mb/conversion_procs/ascii_and_mic'
gcc -shared -h libascii_and_mic.so.0 ascii_and_mic.o
-L../../../../../../src/port -o libascii_and_mic.so.0.0
ld: fatal: file ascii_and_mic.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to
libascii_and_mic.so.0.0
Making a modification to src/Makefile.shlib to include -m64 on the
LINK.shared line fixes the problem:
ifeq ($(PORTNAME), solaris)
shlib := lib
$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
ifeq ($(GCC), yes)
LINK.shared = $(CC) -m64 -shared # -m64
else
LINK.shared = $(CC) -G
endif
Can we somehow modify configure to pick up the CFLAGS settings and
inject them into the correct place itself? Or should we be doing this
another way?
--
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2004-11-22 18:34:56 | Re: Test database for new installs? |
Previous Message | Marc G. Fournier | 2004-11-22 18:26:13 | Re: Beta5 now Available |