Subject: linking problems
To: None <tech-userlevel@netbsd.org>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: tech-userlevel
Date: 03/24/2001 12:31:34
Hi!

I'm trying ot port Xerces-Perl to NetBSD, and I have problem with
linking.

It builds a shared object, like this:
LD_RUN_PATH=3D"/usr/pkg/lib" gcc -o blib/arch/auto/XML/Xerces/Xerces.so
--whole-archive -shared  -L/usr/pkg/lib Xerces.o    -L/usr/pkg/lib
-L/usr/pkg/lib -lncurses -lncurses++ -lmenu -lform -lpanel -lxerces-c1_3
-lpthread=20

The problem occurs at run time ,qhen I do a make test:
PERL_DL_NONLAZY=3D1 /usr/pkg/bin/perl -Iblib/arch -Iblib/lib
-I/usr/pkg/lib/perl5/5.6.0/powerpc-netbsd -I/usr/pkg/lib/perl5/5.6.0 -e
'use Test::Harness qw(&runtests $verbose); $verbose=3D0; runtests @ARGV;'
t/*.t
t/DOMCreate.........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for
module XML::Xerces:
/usr/local/src/xml-xerces/perl/blib/arch/auto/XML/Xerces/Xerces.so:
Undefined PLT symbol "__eh_alloc" (reloc type =3D 21, symnum =3D 667) at
/usr/pkg/lib/perl5/5.6.0/powerpc-netbsd/DynaLoader.pm line 200.

__eh_alloc is defined in libgcc.a. If I link with libgcc.a, I will end
up with a error 10, non supported PLT relocation, because libgcc.a is
not PIC code.

And anyway, __eh_allow being in libgcc, it should be in perl, so I don't
understand what is wrong here...

--=20
Emmanuel Dreyfus. En tant que serveur, Windows NT fait en moins bien=20
ce que UNIX fait depuis des ann=E9es avec une interface utilisateur=20
que seul un utilisateur d'UNIX est capable d'admirer.
p99dreyf@criens.u-psud.fr