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 Michael Grabenstein <mi...@isinet.com> on 2002/04/25 22:47:08 UTC
solaris: Can't load 'blib/..../Xerces.so' Help
This built sweetly on Linux, but on our old solaris box I am having
problems...
uname -a:
SunOS myhostname 5.6 Generic_105181-28 sun4u sparc SUNW,Ultra-Enterprise
Trying to build XML-Xerces-1.7.0-1 (also failed on 1.7.0) using C
library xerces-c-src1_7_0.
Built xerces-c from scratch, built perl from scratch.
g++ -v
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
The make looks clean, but make test and all fail like:
t/domTest...........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for
module XML::Xerces: ld.so.1: /u/mgrabens/bin/perl: fatal: relocation
error: file blib/arch/auto/XML/Xerces/Xerces.so: symbol
_16XMLPlatformUtils.fgTransService: referenced symbol not found at
/u/mgrabens/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
at blib/lib/XML/Xerces.pm line 8
Compilation failed in require at t/domTest.t line 13.
BEGIN failed--compilation aborted at t/domTest.t line 13.
t/domTest...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
I have been beating this for two days now and I am out of ideas...
Anyone else ?
Thanks,
Mike
PS:
perl -V:
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos myhost 5.6 generic_105181-28 sun4u sparc
sunw,ultra-enterprise '
config_args='-e -Dprefix=/u/mgrabens/'
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags ='-I/u/mgrabens/include -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-I/u/mgrabens/include -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccversion='', gccversion='egcs-2.91.60 19981201 (egcs-1.1.1
release)', gccosandvers='solaris2.6'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags ='-L/u/mgrabens/lib -L/usr/local/lib '
libpth=/u/mgrabens/lib /usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R
/u/mgrabens/lib/perl5/5.6.1/sun4-solaris/CORE'
cccdlflags='-fPIC', lddlflags='--export-dynamic -G -L/u/mgrabens/lib
-L/usr/local/lib'
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by Michael Grabenstein <mi...@isinet.com>.
Jason, I am resending this message... Sent it out from the wrong
address...
Thanks for the kudos... But I built the Perl and the Xerces-C from
scratch with the same g++...Just checked the Makefile for xercesc:
PLATFORM = SOLARIS
CC = gcc
CXX = g++
Oh and a co-worker tried Sun's compilier for the packages as well. I
believe he compiled Perl, Xerces-C, and XML::Xerces with the same
compilier. I know he was getting basically the same error.
Was hoping I would not have to go the route of a new
compiler...(chalk it up to being lazy).
Later,
Mike
Jason E. Stewart wrote:
>
>
> Here's my gues. You're using the Apache Xerces-C binary for Solaris,
> aren't you? If so, they build it with the native C++ compiler which
> mangles it's symbol names completely differently than g++ does, which
> means that the libraries are incompatible with one another.
> You'll have to download the Xerces-C source and build it with g++, and
> the problem should go away.
>
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Michael Grabenstein" <mi...@isinet.com> writes:
> Finally figured this one out, thanks to Robert Schiele from the
> xerces-c-dev list... (Thanks to Jason too, got me going down the
> right path. :-)
Glad you got things working!
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by Michael Grabenstein <mi...@isinet.com>.
Finally figured this one out, thanks to Robert Schiele from the
xerces-c-dev list... (Thanks to Jason too, got me going down the right
path. :-)
Basically my Xerces-c parser was not built properly.
Reason was the gcc I was trying to use was not built properly from
the start. Then when I tried to build a new gcc I created another
problem...
I have only two failures now on make test, but that is my next
e-mail... :-)
Attached below is what I sent to the xerces-c-dev list.
Later,
Mike
Basically I had two problems:
1) The gcc I was trying to build with was not built with
--enable-shared (because with v2.95.2 it was not the default)
2) The ldflags did not have the correct order of library directories
to include via -L...
Now my conditions brought about the second error. The condition that
prompted it was that in order for me to test this quickly I built the
latest gcc (v3.0.4) in my home directory and installed its libraries in
a non-standard location. Now I knew this, but I thought I only had to
fix up my LD_LIBRARY_PATH to make things right.
Rebuilding gcc was the solution for problem #1...
The configure script had placed ldflags (ALLLIBS in Makefile.incl) of
-L/usr/local/lib which Robert Schiele pointed out to me will over ride
anything I specify in my LD_LIBRARY_PATH on Solaris. The reason the
order was important for me was the fact that the old poorly built gcc
from problem #1 was not being replaced. And at link time the libstdc++.a
that was built for gcc v2.95.2 was being linked in and not my new v3.0.4
version. This lead to all my undefined symbol references from my
original e-mail (ld: fatal: Symbol referencing errors).
There are probably more elegant ways to fix problem #2, but what I
did was edit the Makefile.incl and inserted a -L/path/to/gccv3.0.4/lib
into the ALLLIBS variable for where I had installed gcc v3.0.4's
libraries were.
Rebuilding after applying these two things.... I have a working copy
of the Xerces-c parser.
Hope someone else finds this useful...
Take care,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by Michael Grabenstein <mi...@isinet.com>.
(Jason, resending this one too... just noticed I sent them from the
wrong account.)
OK, tried:
g++ -v
Reading specs from
/usr/local/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Same error:
t/domTest...........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for
module XML::Xerces: ld.so.1: /u/epsystem/mgrabens/enWeb/bin/perl: fatal:
relocation error: file blib/arch/auto/XML/Xerces/Xerces.so: symbol
__ti12XMLException: referenced symbol not found at
/u/epsystem/mgrabens/enWeb//lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm
line 206.
at blib/lib/XML/Xerces.pm line 8
Compilation failed in require at t/domTest.t line 13.
BEGIN failed--compilation aborted at t/domTest.t line 13.
t/domTest...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
I rebuit everything:
perl-5.6.1
xerces-c-src1_7_0
XML-Xerces-1.7.0-1
Thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by "Steven N. Hirsch" <hi...@btv.ibm.com>.
On 25 Apr 2002, Jason E. Stewart wrote:
>
> > ccversion='', gccversion='egcs-2.91.60 19981201 (egcs-1.1.1
> > release)', gccosandvers='solaris2.6'
>
> Also useful - Perl was built with the same version of gcc that you are
> using to compile the library.
>
> Here's my gues. You're using the Apache Xerces-C binary for Solaris,
> aren't you? If so, they build it with the native C++ compiler which
> mangles it's symbol names completely differently than g++ does, which
> means that the libraries are incompatible with one another.
>
> You'll have to download the Xerces-C source and build it with g++, and
> the problem should go away.
Jason,
This is a general "gotcha" on almost every Unix platform where a vendor
compiler exists. Perhaps a point to be covered in the 'README'?
Also, never heard anything back from you regarding my comments on
Makefile.PL and the build process.
Steve
--
----------------------------------------------------------------
Steven N. Hirsch tie-line: 446-6557 ext: 802-769-6557
Staff Engineer Methodology Integration Team
ASIC Product Development IBM Microelectronics
----------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: solaris: Can't load 'blib/..../Xerces.so' Help
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
Hey Michael,
Excellent build report, thanks for the detail
"Michael Grabenstein" <mi...@isinet.com> writes:
> This built sweetly on Linux, but on our old solaris box I am having
> problems...
Built on linux ... that's useful, it should have, but I'm still glad
to know it worked for you.
> uname -a:
> SunOS myhostname 5.6 Generic_105181-28 sun4u sparc SUNW,Ultra-Enterprise
Likewise, useful to know what the arch details are.
> Trying to build XML-Xerces-1.7.0-1 (also failed on 1.7.0) using C
> library xerces-c-src1_7_0.
Good, you it's a general 1.7 issue, not just 1.7.0-1
> Built xerces-c from scratch, built perl from scratch.
>
> g++ -v
> Reading specs from
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.60/specs
>
> gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
Good man - compiler version and everything. Geez. Every user should be
like you.
Isn't that a bit old? I'd suggest upgrading to 2.95. A lot has
happened since then.
> The make looks clean, but make test and all fail like:
> t/domTest...........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so'
> for module XML::Xerces: ld.so.1: /u/mgrabens/bin/perl: fatal:
> relocation error: file blib/arch/auto/XML/Xerces/Xerces.so: symbol
> _16XMLPlatformUtils.fgTransService: referenced symbol not found at
> /u/mgrabens/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
Ok, this is a dynamic loading problem. It's not find the
XMLPlatformUtils::fgTransService transService variable in your
libxerces.so file.
> perl -V:
> ccversion='', gccversion='egcs-2.91.60 19981201 (egcs-1.1.1
> release)', gccosandvers='solaris2.6'
Also useful - Perl was built with the same version of gcc that you are
using to compile the library.
Here's my gues. You're using the Apache Xerces-C binary for Solaris,
aren't you? If so, they build it with the native C++ compiler which
mangles it's symbol names completely differently than g++ does, which
means that the libraries are incompatible with one another.
You'll have to download the Xerces-C source and build it with g++, and
the problem should go away.
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