Re: DBD::Pg 2.15.1 compilation failed - Mailing list pgsql-general

From Alexandra Roy
Subject Re: DBD::Pg 2.15.1 compilation failed
Date
Msg-id 4B0A49B9.2010708@bull.net
Whole thread Raw
In response to Re: DBD::Pg 2.15.1 compilation failed  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: DBD::Pg 2.15.1 compilation failed
List pgsql-general
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 :
> -----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-----
>

pgsql-general by date:

Previous
From: Jason Armstrong
Date:
Subject: Returning bigint from C extension
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Returning bigint from C extension