You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by Emmanuel Dreyfus <p9...@criens.u-psud.fr> on 2001/03/27 09:02:03 UTC

problem linking 1.3.3

Hi!

I've troubles with dynamic linking both on 1.3.3 and previous versions
from the CVS:

$ make test
PERL_DL_NONLAZY=1 /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=0; runtests @ARGV;'
t/*.t
t/DOMCreate.........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for
module XML::Xerces:
/usr/pkgsrc/textproc/xerces-p/work/XML-Xerces-1.3.3/blib/arch/auto/XML/X
erces/Xerces.so: Undefined PLT symbol "__eh_alloc" (reloc type = 21,
symnum = 660) at /usr/pkg/lib/perl5/5.6.0/powerpc-netbsd/DynaLoader.pm
line 200.
 at blib/lib/XML/Xerces.pm line 7

__eh_alloc is in libgcc.a, I would have expected it to be in the perl
executable. Anyone has an idea why it does not link?

-- 
Emmanuel Dreyfus.
"L'achitecture x86 est impossible à aimer." (John Hennessy)
p99dreyf@criens.u-psud.fr

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: problem linking 1.3.3

Posted by Emmanuel Dreyfus <p9...@criens.u-psud.fr>.
[link failure might be caused by an old gcc version]
> This is for pretty old versions of gcc, but I wonder if something
> similar is happening. What version of gcc are you using?

$ gcc -v 
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

> If that isn't the issue, I check would be the link line for Xerces.so,
> whether it included all the necessary libraries.
> 
> In the Makefile.PL call to WriteMakefile, you may need to add some
> NetBSD system dependancies, in one of the following lines:

Well, the missing symbol, __eh_alloc, can be found only in libgcc.
libgcc is a static library only, if I try to link with -lgcc, I will get
other link errors (non supported relocation), because libgcc is not PIC
code.

-- 
Emmanuel Dreyfus.
Sryvpvgngvbaf!
Ibhf irarm qr creqer ibger grzcf n qrpbqre har fvtangher fnaf vagrerg.
p99dreyf@criens.u-psud.fr

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: problem linking 1.3.3

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
Hi Emmanuel,

Thanks for giving it a whorl on NetBSD!! I hope we can get it working.

"Emmanuel Dreyfus" <p9...@criens.u-psud.fr> writes:

> I've troubles with dynamic linking both on 1.3.3 and previous versions
> from the CVS:
> 
> $ make test
> PERL_DL_NONLAZY=1 /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=0; runtests @ARGV;'
> t/*.t
> t/DOMCreate.........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for
> module XML::Xerces:
> /usr/pkgsrc/textproc/xerces-p/work/XML-Xerces-1.3.3/blib/arch/auto/XML/X
> erces/Xerces.so: Undefined PLT symbol "__eh_alloc" (reloc type = 21,
> symnum = 660) at /usr/pkg/lib/perl5/5.6.0/powerpc-netbsd/DynaLoader.pm
> line 200.
>  at blib/lib/XML/Xerces.pm line 7
> 
> __eh_alloc is in libgcc.a, I would have expected it to be in the perl
> executable. Anyone has an idea why it does not link?

I'm surprised by this. Searching the WWW I found:

> > > during the link procedure for an application we have got this
> > > error message "...undefined references to _eh_alloc". Could
> > > someone tell what's wrong?  We use Linux (Red Head 5.1) and gcc
> > > 2.8.1.
> 
> This is generally caused by a compiler installation problem. I suggest
> grabbing the latest release of egcs (1.1.2) and the latest binutils and
> installing these.

This is for pretty old versions of gcc, but I wonder if something
similar is happening. What version of gcc are you using?

If that isn't the issue, I check would be the link line for Xerces.so,
whether it included all the necessary libraries.

In the Makefile.PL call to WriteMakefile, you may need to add some
NetBSD system dependancies, in one of the following lines:

  'CCFLAGS'     => '-D_REENTRANT -DDEBIAN -DHAS_BOOL -D$(SWIG_VERSION)',
  'INC'         => "-I. -INew_classes_perl $INCLUDES",
  'LIBS'        => "$LIBS -lxerces-c1_3 -lpthread",

I might have access to a BSD machine at the CS dept, and I can try
building it there. 

HTH,
jas.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org