[OpenIndiana-discuss] Building 64-bit PostgreSQL (was: Time to build VirtualBox OSE)
Albert Lee
trisk at opensolaris.org
Sun Oct 10 15:08:09 UTC 2010
On Fri, Oct 8, 2010 at 3:33 PM, russell <stream at willows7.myzen.co.uk> wrote:
> As an aside I am currently trying to build PostgreSQL v9.0.1 as a 64bit
> binary within a OpenIndiana instance running within VirtualBox.
>
>
>
> $ CC=/opt/SUNWspro/bin/cc CFLAGS=-m64 CPPFLAGS=-m64 ./configure
> --prefix=/opt/sfw --enable-nls --enable-dtrace --with-perl --with-python
> --with-gssapi --with-pam --with-openssl --with-libxml --with-libxslt
>
> $ make
>
> everything appears to be okay until
>
> "/usr/bin/perl" ./text2macro.pl --strip='^(\#.*|\s*)$' plc_perlboot.pl
> plc_trusted.pl > perlchunks.h
> "/usr/bin/perl" plperl_opmask.pl plperl_opmask.h
> /opt/SUNWspro/bin/cc -Xa -m64 -KPIC -I. -I. -I../../../src/include -m64
> -I/usr/include/libxml2 -I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE -c
> -o plperl.o plperl.c
> "/usr/bin/perl" /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap
> /usr/perl5/5.8.4/lib/ExtUtils/typemap SPI.xs >SPI.c
> /opt/SUNWspro/bin/cc -Xa -m64 -KPIC -I. -I. -I../../../src/include -m64
> -I/usr/include/libxml2 -I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE -c
> -o SPI.o SPI.c
> "/usr/bin/perl" /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap
> /usr/perl5/5.8.4/lib/ExtUtils/typemap Util.xs >Util.c
> /opt/SUNWspro/bin/cc -Xa -m64 -KPIC -I. -I. -I../../../src/include -m64
> -I/usr/include/libxml2 -I/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE -c
> -o Util.o Util.c
> /opt/SUNWspro/bin/cc -Xa -m64 -KPIC -G -o plperl.so plperl.o SPI.o Util.o
> -L../../../src/port -L/usr/lib
> -Wl,-R'/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE'
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DynaLoader/DynaLoader.a
> -L/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE -lperl -lsocket -lnsl -ldl
> -lm -lc
> ld: warning: file
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DynaLoader/DynaLoader.a(DynaLoader.o):
> wrong ELF class: ELFCLASS32
> ld: fatal: file /usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE/libperl.so:
> wrong ELF class: ELFCLASS32
> ld: fatal: file processing errors. No output written to plperl.so
> make[3]: *** [plperl.so] Error 1
> make[3]: Leaving directory `/home/dev/dev/postgresql-9.0.1/src/pl/plperl'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/dev/dev/postgresql-9.0.1/src/pl'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/dev/dev/postgresql-9.0.1/src'
> make: *** [all] Error 2
>
> dev at ts4:~/dev/postgresql-9.0.1$ file
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DynaLoader/DynaLoader.a
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DynaLoader/DynaLoader.a:
> current ar archive, not a dynamic executable or shared object
> dev at ts4:~/dev/postgresql-9.0.1$ file
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE/libperl.so
> /usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE/libperl.so: ELF 32-bit LSB
> dynamic lib 80386 Version 1 [FPU], dynamically linked, not stripped, no
> debugging information available
> dev at ts4:~/dev/postgresql-9.0.1$
>
> It appears there are 32bit libraries in a 64 bit directory.
It's not possible to generate bindings for 32-bit Perl to 64-bit
PostgreSQL. If you want proper multiple-instruction set support in
Solaris (see isaexec(3), isalist(5)), you need to install 64-bit
executables and libraries in a subdir corresponding to the ISA name
(e.g. sparcv9 or amd64) and build the 32-bit binaries separately.
-Albert
-Albert
More information about the OpenIndiana-discuss
mailing list