Thread: HPUX 11.11 DBI, DBD, Pg ld: Mismatched ABI (not an ELF file) for -lpq, postgresql

Hello,

Is there anyone out there who can help me ?

I'm trying to write a tiny little perl script to fire data into a
postgres database from a couple of HP-UX 11i boxes.
I need to install either DBI & DBD or Pg.

I follow the instructions exporting the Library path & the include path
for Postgres but no matter which way I go there's always a failure
building either Pg or DBD. I'm assuming it's to do with libpq.so which
does not seem to have gotten installed anywhere. I've looked all over
the place for this .so but cannot find it.

The error I get is:

Configuring Pg
Remember to actually read the README file!
OS: hpux
PostgreSQL version: 7.3.2
Multiple copies of Driver.xst found in:
/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI
/usr/local/lib/perl5/site_perl/5.8.2/PA-RISC2.0/auto/DBI at Makefile.PL
line 67
Using DBI 1.39 installed in /usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI
Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in:
/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI
/usr/local/lib/perl5/site_perl/5.8.2/PA-RISC2.0/auto/DBI at Makefile.PL
line 109
Using DBI 1.39 installed in /usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI
Writing Makefile for DBD::Pg
forth:/home/u841714/DBD-Pg-1.31#make
cp Pg.pm blib/lib/DBD/Pg.pm       /usr/contrib/bin/perl
/usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp  -typemap
/usr/local/lib/perl5/5.8.2/ExtUtils/typemap  Pg.xs > Pg.xsc && mv Pg.xsc
Pg.c       gcc -c  -I/opt/pgsql/include
-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI  -D_HPUX_SOURCE
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-DHAVE_PQescapeString -DHAVE_PQescapeBytea -DHAVE_PQunescapeBytea -O2
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/CORE"   Pg.c       gcc -c  -I/opt/pgsql/include
-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI  -D_HPUX_SOURCE
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-DHAVE_PQescapeString -DHAVE_PQescapeBytea -DHAVE_PQunescapeBytea -O2
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/CORE"   dbdimp.c       gcc -c  -I/opt/pgsql/include
-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI  -D_HPUX_SOURCE
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-DHAVE_PQescapeString -DHAVE_PQescapeBytea -DHAVE_PQunescapeBytea -O2
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/CORE"   quote.c
quote.c: In function `quote_bytea':
quote.c:366: warning: assignment makes pointer from integer without a cast       gcc -c  -I/opt/pgsql/include
-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/auto/DBI  -D_HPUX_SOURCE
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-DHAVE_PQescapeString -DHAVE_PQescapeBytea -DHAVE_PQunescapeBytea -O2
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.31\"
-DXS_VERSION=\"1.31\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/PA-RISC2.0/CORE"   types.c
Running Mkbootstrap for DBD::Pg ()       chmod 644 Pg.bs       rm -f blib/arch/auto/DBD/Pg/Pg.sl
LD_RUN_PATH="/opt/pgsql/lib"/usr/bin/ld  -b -L/usr/local/lib
 
-L/opt/local/lib Pg.o dbdimp.o quote.o types.o  -o
blib/arch/auto/DBD/Pg/Pg.sl   -L/opt/pgsql/lib -lpq
ld: Mismatched ABI (not an ELF file) for -lpq
Fatal error.
*** Error exit code 1

Stop.


Anyone help ?
Regards
Zoe




Zoe De Lacy <zoe@onsideuk.com> writes:
> Running Mkbootstrap for DBD::Pg ()
>         chmod 644 Pg.bs
>         rm -f blib/arch/auto/DBD/Pg/Pg.sl
>         LD_RUN_PATH="/opt/pgsql/lib" /usr/bin/ld  -b -L/usr/local/lib
> -L/opt/local/lib Pg.o dbdimp.o quote.o types.o  -o
> blib/arch/auto/DBD/Pg/Pg.sl   -L/opt/pgsql/lib -lpq
> ld: Mismatched ABI (not an ELF file) for -lpq
> Fatal error.

Hmm.  What have you got in /opt/pgsql/lib, and where did it come from?
This seems to indicate that you have a libpq.a or libpq.sl file that was
built for a different platform.
        regards, tom lane