DBD::Pg 2.15.1 compilation failed
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I got a problem with the compilation of DBD::Pg 2.15.1 on AIX 5.3 TL9.<br>
I have did a 64-bit compilation / installation of PostgreSQL 8.3.8 at
the beginning. <br>
<br>
As the "postgres" user, I managed to execute "perl Makefile.PL"
successfully :<br>
<font face="Courier New" size="-1">Configuring DBD::Pg 2.15.1<br>
PostgreSQL version: 80308 (default port: 5432)<br>
POSTGRES_HOME: (not set)<br>
POSTGRES_INCLUDE: /usr/local/pgsql/include<br>
POSTGRES_LIB: /usr/local/pgsql/lib<br>
OS: aix<br>
Using DBI 1.609 (for perl 5.008002 on aix-thread-multi) installed in
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI/<br>
Writing Makefile for DBD::Pg</font><br>
<br>
but the "make" step failed :<br>
<font face="Courier New" size="-1">$ <font color="#3333ff">make</font><br>
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm<br>
cp Pg.pm blib/lib/DBD/Pg.pm<br>
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME"
=> "DBD::Pg", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS"
=> []);'<br>
/usr/bin/perl -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/"
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI/Driver.xst
> Pg.xsi<br>
/usr/bin/perl /usr/opt/perl5/lib/5.8.2/ExtUtils/xsubpp
-typemap /usr/opt/perl5/lib/5.8.2/ExtUtils/typemap Pg.xs > Pg.xsc
&& mv Pg.xsc Pg.c<br>
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" Pg.c<br>
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" dbdimp.c<br>
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" quote.c<br>
"quote.c", line 334.16: 1506-068 (W) Operation between types "char*"
and "const char*" is not allowed.<br>
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" types.c<br>
Running Mkbootstrap for DBD::Pg ()<br>
chmod 644 Pg.bs<br>
rm -f blib/arch/auto/DBD/Pg/Pg.so<br>
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE
-bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Pg.exp
-bnoentry -lpthreads -lc_r Pg.o dbdimp.o quote.o types.o -o
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq -lm <br>
<font color="#ff0000">ld: 0711-317 ERROR: Undefined symbol:
.PQerrorMessage<br>
ld: 0711-317 ERROR: Undefined symbol: .PQgetResult<br>
ld: 0711-317 ERROR: Undefined symbol: .PQclear<br>
... ... ...<br>
ld: 0711-317 ERROR: Undefined symbol: .PQserverVersion<br>
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.<br>
make: 1254-004 The error code from the last command is 8.</font></font><br>
<br>
<br>
I use perl5 (revision 5.0 version 8 subversion 2) :<br>
<font face="Courier New" size="-1">$ <font color="#3333ff">perl -V</font><br>
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:<br>
Platform:<br>
osname=aix, osvers=5.2.0.0, archname=aix-thread-multi<br>
uname='aix animals 2 5 000709cf4c00 '<br>
config_args=''<br>
hint=previous, useposix=true, d_sigaction=define<br>
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define<br>
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef<br>
use64bitint=undef use64bitall=undef uselongdouble=undef<br>
usemymalloc=n, bincompat5005=undef<br>
Compiler:<br>
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
-q32 -D_LARGE_FILES -qlonglong',<br>
optimize='-O',<br>
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN
-DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -D_ALL_SOURCE
-D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN
-DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -D_ALL_SOURCE
-D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias
-DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong'<br>
ccversion='5.0.2.0', gccversion='', gccosandvers=''<br>
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321<br>
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8<br>
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8<br>
alignbytes=8, prototype=define<br>
Linker and Libraries:<br>
ld='ld', ldflags =' -brtl -b32 -bmaxdata:0x80000000'<br>
libpth=/lib /usr/lib /usr/ccs/lib<br>
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lpthreads -lc_r -lcrypt
-lbsd -lPW<br>
perllibs=-lbind -lnsl -ldl -lld -lm -lpthreads -lc_r -lcrypt -lbsd
-lPW<br>
libc=/lib/libc.a, so=a, useshrplib=true, libperl=libperl.a<br>
gnulibc_version=''<br>
Dynamic Linking:<br>
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp
-bE:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp'<br>
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE
-bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lpthreads -lc_r'<br>
<br>
<br>
Characteristics of this binary (from libperl): <br>
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT<br>
Locally applied patches:<br>
SUIDPERLIO1 - fix PERLIO_DEBUG buffer overflow (CAN-2005-0156)<br>
SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962<br>
REGCOMP0 - buffer overflow in regexp engine for UTF8
(CVE-2007-5116)<br>
Built under aix<br>
Compiled at Dec 5 2007 16:08:49<br>
@INC:<br>
/usr/opt/perl5/lib/5.8.2/aix-thread-multi<br>
/usr/opt/perl5/lib/5.8.2<br>
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi<br>
/usr/opt/perl5/lib/site_perl/5.8.2<br>
/usr/opt/perl5/lib/site_perl<br>
.</font><br>
<br>
<br>
Any suggestion ? <br>
<br>
Thank you for your help.<br>
Regards, <br>
Alexandra<br>
<div class="moz-signature"><font color="grey"><br>
</font>
</div>
</body>
</html>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
Please don't send mail *only* as HTML to the mailing list
I got a problem with the compilation of DBD::Pg 2.15.1 on AIX 5.3 TL9.
I have did a 64-bit compilation / installation of PostgreSQL 8.3.8 at
the beginning.
...
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq -lm <br>
ld: 0711-317 ERROR: Undefined symbol:
.PQerrorMessage
ld: 0711-317 ERROR: Undefined symbol: .PQgetResult
How did you install Postgres? If installed by package did you also install
the -devel package as well, as mentioned in the README file for DBD::Pg?
It's likely that you are not linking to libpq, either because it is not
installed or not in a place that ld can see it. See the section on
"PostgreSQL library issues" in the DBD::Pg README for possible ways
to solve this.
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200911201309
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAksG25MACgkQvJuQZxSWSshVGwCfSceaylQklvcCQUCMODfasRlW
uqAAoJFEEBVuihaSnECaz6i9Vvs93CIn
=xh8E
-----END PGP SIGNATURE-----
Hi Greg, hi all,
Sorry for the mail sent in "HTML only"...
I work with AIX 5.3 TL9 and I have installed PostgreSQL 8.3.8 from the
source "postgresql-8.3.8.tar.gz".
libpq seems to have been installed during the build.
I check the README of DBD::Pg and :
1. pg_config is available and returns :
$ pg_config
BINDIR = /usr/local/pgsql/bin
DOCDIR = /usr/local/pgsql/doc
INCLUDEDIR = /usr/local/pgsql/include
PKGINCLUDEDIR = /usr/local/pgsql/include
INCLUDEDIR-SERVER = /usr/local/pgsql/include/server
LIBDIR = /usr/local/pgsql/lib
PKGLIBDIR = /usr/local/pgsql/lib
LOCALEDIR =
MANDIR = /usr/local/pgsql/man
SHAREDIR = /usr/local/pgsql/share
SYSCONFDIR = /usr/local/pgsql/etc
PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = 'CFLAGS=-maix64' 'LDFLAGS=-maix64 -Wl,-bbigtoc'
CC = gcc
CPPFLAGS =
CFLAGS = -maix64 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -maix64 -Wl,-bbigtoc
-Wl,-blibpath:/usr/local/pgsql/lib:/usr/lib:/lib
LDFLAGS_SL = -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
LIBS = -lpgport -lz -lreadline -lld -lm
VERSION = PostgreSQL 8.3.8
2. libpq seems to be available on my server :
# find . -name 'libpq*' -print
./usr/local/pgsql/doc/html/libpq-async.html
./usr/local/pgsql/doc/html/libpq-build.html
./usr/local/pgsql/doc/html/libpq-cancel.html
./usr/local/pgsql/doc/html/libpq-connect.html
./usr/local/pgsql/doc/html/libpq-control.html
./usr/local/pgsql/doc/html/libpq-copy.html
./usr/local/pgsql/doc/html/libpq-envars.html
./usr/local/pgsql/doc/html/libpq-example.html
./usr/local/pgsql/doc/html/libpq-exec.html
./usr/local/pgsql/doc/html/libpq-fastpath.html
./usr/local/pgsql/doc/html/libpq-ldap.html
./usr/local/pgsql/doc/html/libpq-misc.html
./usr/local/pgsql/doc/html/libpq-notice-processing.html
./usr/local/pgsql/doc/html/libpq-notify.html
./usr/local/pgsql/doc/html/libpq-pgpass.html
./usr/local/pgsql/doc/html/libpq-pgservice.html
./usr/local/pgsql/doc/html/libpq-ssl.html
./usr/local/pgsql/doc/html/libpq-status.html
./usr/local/pgsql/doc/html/libpq-threading.html
./usr/local/pgsql/doc/html/libpq.html
./usr/local/pgsql/lib/libpq.a
./usr/local/pgsql/include/libpq
./usr/local/pgsql/include/libpq/libpq-fs.h
./usr/local/pgsql/include/internal/libpq
./usr/local/pgsql/include/internal/libpq-int.h
./usr/local/pgsql/include/server/libpq
./usr/local/pgsql/include/server/libpq/libpq-be.h
./usr/local/pgsql/include/server/libpq/libpq-fs.h
./usr/local/pgsql/include/server/libpq/libpq.h
./usr/local/pgsql/include/libpq-fe.h
BUT I don't have any "libpq.so" file as I am on an AIX system...
3. I tried to specify POSTGRES_INCLUDE and POSTGRES_LIB but the same
errors occur during the "make process" :
$ make
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm
cp Pg.pm blib/lib/DBD/Pg.pm
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME"
=> "DBD::Pg", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
/usr/bin/perl -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/"
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI/Driver.xst
Pg.xsi
/usr/bin/perl /usr/opt/perl5/lib/5.8.2/ExtUtils/xsubpp -typemap
/usr/opt/perl5/lib/5.8.2/ExtUtils/typemap Pg.xs > Pg.xsc && mv Pg.xsc Pg.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" Pg.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" dbdimp.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" quote.c
"quote.c", line 334.16: 1506-068 (W) Operation between types "char*" and
"const char*" is not allowed.
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" types.c
Running Mkbootstrap for DBD::Pg ()
chmod 644 Pg.bs
rm -f blib/arch/auto/DBD/Pg/Pg.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE
-bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Pg.exp
-bnoentry -lpthreads -lc_r Pg.o dbdimp.o quote.o types.o -o
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq -lm
ld: 0711-317 ERROR: Undefined symbol: .PQerrorMessage
ld: 0711-317 ERROR: Undefined symbol: .PQgetResult
ld: 0711-317 ERROR: Undefined symbol: .PQclear
Could you please help me or give me advices on these errors ?
Thank you.
Regards,
Alexandra
Greg Sabino Mullane a �crit :
Show quoted text
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
Please don't send mail *only* as HTML to the mailing list
I got a problem with the compilation of DBD::Pg 2.15.1 on AIX 5.3 TL9.
I have did a 64-bit compilation / installation of PostgreSQL 8.3.8 at
the beginning....
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq -lm <br>
ld: 0711-317 ERROR: Undefined symbol:
.PQerrorMessage
ld: 0711-317 ERROR: Undefined symbol: .PQgetResultHow did you install Postgres? If installed by package did you also install
the -devel package as well, as mentioned in the README file for DBD::Pg?
It's likely that you are not linking to libpq, either because it is not
installed or not in a place that ld can see it. See the section on
"PostgreSQL library issues" in the DBD::Pg README for possible ways
to solve this.- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200911201309
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAksG25MACgkQvJuQZxSWSshVGwCfSceaylQklvcCQUCMODfasRlW
uqAAoJFEEBVuihaSnECaz6i9Vvs93CIn
=xh8E
-----END PGP SIGNATURE-----
Hi all,
I am still trying to build DBD::Pg but I have another question.
Is it possible to do a 64-build of DBD::Pg ?
I ask this because PostgreSQL 8.3.8 has been compiled in 64 bits mode
and if DBD::Pg expects to find 32 bits library, this can explain my
problem...
Any idea ?
Thanks,
Regards,
Alexandra
Alexandra Roy a �crit :
Hi Greg, hi all,
Sorry for the mail sent in "HTML only"...
I work with AIX 5.3 TL9 and I have installed PostgreSQL 8.3.8 from the
source "postgresql-8.3.8.tar.gz".
libpq seems to have been installed during the build.I check the README of DBD::Pg and :
1. pg_config is available and returns :
$ pg_config
BINDIR = /usr/local/pgsql/bin
DOCDIR = /usr/local/pgsql/doc
INCLUDEDIR = /usr/local/pgsql/include
PKGINCLUDEDIR = /usr/local/pgsql/include
INCLUDEDIR-SERVER = /usr/local/pgsql/include/server
LIBDIR = /usr/local/pgsql/lib
PKGLIBDIR = /usr/local/pgsql/lib
LOCALEDIR =
MANDIR = /usr/local/pgsql/man
SHAREDIR = /usr/local/pgsql/share
SYSCONFDIR = /usr/local/pgsql/etc
PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = 'CFLAGS=-maix64' 'LDFLAGS=-maix64 -Wl,-bbigtoc'
CC = gcc
CPPFLAGS =
CFLAGS = -maix64 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -maix64 -Wl,-bbigtoc
-Wl,-blibpath:/usr/local/pgsql/lib:/usr/lib:/lib
LDFLAGS_SL = -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
LIBS = -lpgport -lz -lreadline -lld -lm
VERSION = PostgreSQL 8.3.82. libpq seems to be available on my server :
# find . -name 'libpq*' -print
./usr/local/pgsql/doc/html/libpq-async.html
./usr/local/pgsql/doc/html/libpq-build.html
./usr/local/pgsql/doc/html/libpq-cancel.html
./usr/local/pgsql/doc/html/libpq-connect.html
./usr/local/pgsql/doc/html/libpq-control.html
./usr/local/pgsql/doc/html/libpq-copy.html
./usr/local/pgsql/doc/html/libpq-envars.html
./usr/local/pgsql/doc/html/libpq-example.html
./usr/local/pgsql/doc/html/libpq-exec.html
./usr/local/pgsql/doc/html/libpq-fastpath.html
./usr/local/pgsql/doc/html/libpq-ldap.html
./usr/local/pgsql/doc/html/libpq-misc.html
./usr/local/pgsql/doc/html/libpq-notice-processing.html
./usr/local/pgsql/doc/html/libpq-notify.html
./usr/local/pgsql/doc/html/libpq-pgpass.html
./usr/local/pgsql/doc/html/libpq-pgservice.html
./usr/local/pgsql/doc/html/libpq-ssl.html
./usr/local/pgsql/doc/html/libpq-status.html
./usr/local/pgsql/doc/html/libpq-threading.html
./usr/local/pgsql/doc/html/libpq.html
./usr/local/pgsql/lib/libpq.a
./usr/local/pgsql/include/libpq
./usr/local/pgsql/include/libpq/libpq-fs.h
./usr/local/pgsql/include/internal/libpq
./usr/local/pgsql/include/internal/libpq-int.h
./usr/local/pgsql/include/server/libpq
./usr/local/pgsql/include/server/libpq/libpq-be.h
./usr/local/pgsql/include/server/libpq/libpq-fs.h
./usr/local/pgsql/include/server/libpq/libpq.h
./usr/local/pgsql/include/libpq-fe.hBUT I don't have any "libpq.so" file as I am on an AIX system...
3. I tried to specify POSTGRES_INCLUDE and POSTGRES_LIB but the same
errors occur during the "make process" :
$ make
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm
cp Pg.pm blib/lib/DBD/Pg.pm
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME"
=> "DBD::Pg", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);'
/usr/bin/perl -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/"
/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI/Driver.xstPg.xsi
/usr/bin/perl /usr/opt/perl5/lib/5.8.2/ExtUtils/xsubpp
-typemap /usr/opt/perl5/lib/5.8.2/ExtUtils/typemap Pg.xs > Pg.xsc &&
mv Pg.xsc Pg.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" Pg.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" dbdimp.c
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" quote.c
"quote.c", line 334.16: 1506-068 (W) Operation between types "char*"
and "const char*" is not allowed.
cc_r -c -I/usr/local/pgsql/include
-I/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/DBI
-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384
-qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32
-D_LARGE_FILES -qlonglong -DPGLIBVERSION=80308 -DPGDEFPORT=5432 -O
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"2.15.1\"
-DXS_VERSION=\"2.15.1\"
"-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" types.c
Running Mkbootstrap for DBD::Pg ()
chmod 644 Pg.bs
rm -f blib/arch/auto/DBD/Pg/Pg.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE
-bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Pg.exp
-bnoentry -lpthreads -lc_r Pg.o dbdimp.o quote.o types.o -o
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq -lm ld:
0711-317 ERROR: Undefined symbol: .PQerrorMessage
ld: 0711-317 ERROR: Undefined symbol: .PQgetResult
ld: 0711-317 ERROR: Undefined symbol: .PQclearCould you please help me or give me advices on these errors ?
Thank you.
Regards,
AlexandraGreg Sabino Mullane a �crit :
-----BEGIN PGP SIGNED MESSAGE----- Hash:
RIPEMD160!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
Please don't send mail *only* as HTML to the mailing list
I got a problem with the compilation of DBD::Pg 2.15.1 on AIX 5.3 TL9.
I have did a 64-bit compilation / installation of PostgreSQL 8.3.8 at
the beginning....
blib/arch/auto/DBD/Pg/Pg.so -L/usr/local/pgsql/lib -lpq
-lm <br>
ld: 0711-317 ERROR: Undefined symbol:
.PQerrorMessage
ld: 0711-317 ERROR: Undefined symbol: .PQgetResultHow did you install Postgres? If installed by package did you also
install
the -devel package as well, as mentioned in the README file for DBD::Pg?
It's likely that you are not linking to libpq, either because it is not
installed or not in a place that ld can see it. See the section on
"PostgreSQL library issues" in the DBD::Pg README for possible ways
to solve this.- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200911201309
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAksG25MACgkQvJuQZxSWSshVGwCfSceaylQklvcCQUCMODfasRlW
uqAAoJFEEBVuihaSnECaz6i9Vvs93CIn
=xh8E
-----END PGP SIGNATURE-----
--
Alexandra ROY
Database Competence Center
Bull, Architect of an Open World TM
Phone: 04 76 29 77 01
http://www.bull.com
This e-mail contains material that is confidential for the sole use of
the intended recipient. Any review, reliance or distribution by others
or forwarding without express permission is strictly prohibited. If you
are not the intended recipient, please contact the sender and delete all
copies.
Alexandra Roy wrote:
I am still trying to build DBD::Pg but I have another question.
Is it possible to do a 64-build of DBD::Pg ?
I ask this because PostgreSQL 8.3.8 has been compiled in 64 bits mode
and if DBD::Pg expects to find 32 bits library, this can explain my
problem...
I would first check if your perl is 32- or 64-bit. If perl is 32-bit,
that would explain why DBD::Pg cannot find the functions in a
64-bit libpq.
A solution for this case would be to build a 32-bit libpq.so and
add it to libpq.a (you'd have to choose different names for the
so files). They you could link this libpq.a with both 64-bit and
32-bit programs.
If your perl is 64-bit, then it must be a different problem...
Yours,
Laurenz Albe
Hi Laurenz, hi all,
Laurenz, you are right once again !! By default, perl is 32-bit in AIX
5.3 !
The 64-bit and 32-bit versions are packaged together, with the 32-bit
version being the default version. Both versions reside under the
/usr/opt/perl5 directory. Both versions are Perl thread capable, built
using the newer ithreads (interpreter threads), and have built-in
support for PerlIO.
Switching to use the 64-bit version only requires redirecting the Perl
symbolic links in /usr/bin to point to the 64-bit versions of the same
command in /usr/opt/perl5/bin.
=> I thought that I was using perl 64-bit but it was not the case :-(
All the builts I did, for DBI, DBD::Oracle, etc..., have been done with
perl 32-bits...
But Oracle is 64 bit and PostgreSQL 8.3.8 has been built in 64 bit too.
I will uninstall the perl modules and re-try in 64-bit.
I will tell you if I manage to do it.
Thank you for your help.
Regards,
Alexandra
Albe Laurenz a �crit :
Alexandra Roy wrote:
I am still trying to build DBD::Pg but I have another question.
Is it possible to do a 64-build of DBD::Pg ?
I ask this because PostgreSQL 8.3.8 has been compiled in 64 bits mode
and if DBD::Pg expects to find 32 bits library, this can explain my
problem...I would first check if your perl is 32- or 64-bit. If perl is 32-bit,
that would explain why DBD::Pg cannot find the functions in a
64-bit libpq.A solution for this case would be to build a 32-bit libpq.so and
add it to libpq.a (you'd have to choose different names for the
so files). They you could link this libpq.a with both 64-bit and
32-bit programs.If your perl is 64-bit, then it must be a different problem...
Yours,
Laurenz Albe
--
Alexandra ROY
Database Competence Center
Bull, Architect of an Open World TM
Phone: 04 76 29 77 01
http://www.bull.com
This e-mail contains material that is confidential for the sole use of
the intended recipient. Any review, reliance or distribution by others
or forwarding without express permission is strictly prohibited. If you
are not the intended recipient, please contact the sender and delete all
copies.
Alexandra Roy wrote:
=> I thought that I was using perl 64-bit but it was not the case :-(
All the builts I did, for DBI, DBD::Oracle, etc..., have been done with
perl 32-bits...
But Oracle is 64 bit and PostgreSQL 8.3.8 has been built in 64 bit too.
If you install 64-bit Oracle (in fact there is only 64-bit Oracle for
AIX), it will install 32-bit libraries too (in the $ORACLE_HOME/lib32
directory). Your DBD::Oracle is probably linked against those.
Yours,
Laurenz Albe
Hi Laurenz, hi all,
My problem with DBD::Pg is solved.
I have used the perl 64-bit, and re-compile DBI, DBD::Oracle, DBD::Pg,
etc... using 64-bit libraries and everything works fine.
DBD::Pg has been built successfully ! The 64-bit build is possible.
I have several problems with DBD::Oracle, in particular during the "make
test" with one test generating a core file, but it seems to work too...
Thank you for your help !
Regards,
Alexandra
Albe Laurenz a �crit :
Show quoted text
Alexandra Roy wrote:
=> I thought that I was using perl 64-bit but it was not the case :-(
All the builts I did, for DBI, DBD::Oracle, etc..., have been done with
perl 32-bits...
But Oracle is 64 bit and PostgreSQL 8.3.8 has been built in 64 bit too.If you install 64-bit Oracle (in fact there is only 64-bit Oracle for
AIX), it will install 32-bit libraries too (in the $ORACLE_HOME/lib32
directory). Your DBD::Oracle is probably linked against those.Yours,
Laurenz Albe