zow has asked for the wisdom of the Perl Monks concerning the following question:

I have been trying to get this installed for a few days now on a HP-UX 11 machine so that I can install Net::SFTP.

I have configured pari-2.1.7 but not installed it as I understand I only need the sources to install Math::Pari. Make test and make install always get me to the same point, an error from ld about duplicate symbols.

I have included the output from make test. I configured pari as such: sh Configure -a -s --host=none --prefix=/local/dir/pari.

I have tried to configure pari and build Math::Pari with dynamic linking as well to no avail. Hoping the wisdome of the sages can help me....

I generated the Makfile for Math::Pari like this: /opt/perl5/5.8.8/bin/perl "-I/local/perl/lib/site_perl" Makefile.PL machine=none LINKTYPE=static PREFIX='/local/perl/lib'

make test outbput:
Math-Pari-2.001804> make test
cd libPARI && make LIBPERL_A="libperl.a" LINKTYPE="static" OPTIMIZE="-g -O" PREFIX="/opt/b2bcc/app" PASTHRU_DEFINE="" PASTHRU_INC=""
rm -rf blib/arch/auto/Math/Pari/Pari.a
cp libPARI/libPARI.a blib/arch/auto/Math/Pari/Pari.a
/usr/bin/ar cr blib/arch/auto/Math/Pari/Pari.a Pari.o && : blib/arch/auto/Math/Pari/Pari.a
chmod 755 blib/arch/auto/Math/Pari/Pari.a
Writing "Makefile.aperl" for this perl
Found PARI build directory in ../pari-2.1.7
(formatted ../pari-002001007).
Note (probably harmless): No library found for -lgnuplot
Writing Makefile.aperl for Math::Pari
make -f Makefile.aperl perl
Writing ./perlmain.c
cd . && gcc -c "-I/opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/CORE" \
-D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O \
-DVERSION=\"2.001804\" \
-DXS_VERSION=\"2.001804\" "-I/opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/CORE" perlmain.c
perlmain.c: In function 'xs_init':
perlmain.c:122: warning: passing argument 3 of 'Perl_newXS' discards qualifiers from pointer target type
perlmain.c:127: warning: passing argument 3 of 'Perl_newXS' discards qualifiers from pointer target type
gcc -c -I../pari-2.1.7/src/headers -I../pari-2.1.7/src -I./libPARI -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -DVERSION=\"2.001804\" -DXS_VERSION=\"2.001804\" -fPIC "-I/opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/CORE" -DPARI_VERSION_EXP=2001007 -DDEBUG_PARI -DLSB_in_U32=3 -Derr=pari_err Pari.c
cd libPARI && make LIBPERL_A="libperl.a" LINKTYPE="static" OPTIMIZE="-g -O" PREFIX="/opt/b2bcc/app" PASTHRU_DEFINE="" PASTHRU_INC=""
rm -rf blib/arch/auto/Math/Pari/Pari.a
cp libPARI/libPARI.a blib/arch/auto/Math/Pari/Pari.a
/usr/bin/ar cr blib/arch/auto/Math/Pari/Pari.a Pari.o && : blib/arch/auto/Math/Pari/Pari.a
chmod 755 blib/arch/auto/Math/Pari/Pari.a
cat /opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/auto/DynaLoader/extralibs.ld >> blib/arch/auto/Math/Pari/extralibs.all
cat blib/arch/auto/Math/Pari/extralibs.ld >> blib/arch/auto/Math/Pari/extralibs.all
gcc -L/usr/local/lib -Wl,-E -Wl,-B,deferred -o perl -g -O ./perlmain.o Pari.o blib/arch/auto/Math/Pari/Pari.a /opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/auto/DynaLoader/DynaLoader.a /opt/perl5/5.8.8/lib/5.8.8/PA-RISC2.0/CORE/libperl.a `cat blib/arch/auto/Math/Pari/extralibs.all` -lnsl -lnm -lmalloc -ldld -lm -lcrypt -lsec -lc
/usr/ccs/bin/ld: Duplicate symbol "main" in files ./perlmain.o and blib/arch/auto/Math/Pari/Pari.a(kerntest.o)
/usr/ccs/bin/ld: Duplicate symbol "gerepilemanysp" in files blib/arch/auto/Math/Pari/Pari.a(init.o) and blib/arch/auto/Math/Pari/Pari.a(kerntest.o)
/usr/ccs/bin/ld: Duplicate symbol "gerepilemany" in files blib/arch/auto/Math/Pari/Pari.a(init.o) and blib/arch/auto/Math/Pari/Pari.a(kerntest.o)
/usr/ccs/bin/ld: Duplicate symbol "pari_err" in files blib/arch/auto/Math/Pari/Pari.a(init.o) and blib/arch/auto/Math/Pari/Pari.a(kerntest.o)
/usr/ccs/bin/ld: Duplicate symbol "gerepileuptoint" in files blib/arch/auto/Math/Pari/Pari.a(init.o) and blib/arch/auto/Math/Pari/Pari.a(kerntest.o)
/usr/ccs/bin/ld: Found 5 duplicate symbol(s)
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1 Stop.

Replies are listed 'Best First'.
Re: Trying to Build Math::Pari-2.001804
by salva (Canon) on Jan 23, 2010 at 17:13 UTC
      I will definitely check that out but I would love to make that build work even if I don't use it, it has vexed me :-)

      Gracias