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 "Jason E. Stewart" <ja...@openinformatics.com> on 2003/11/11 17:47:43 UTC

Re: XML::Xerces trouble

Hi Chance,

Thanks for being so persistent...

jason@openinformatics.com (Jason E. Stewart) writes:

> >Ok, you didn't define XERCESCROOT - which (unfortunately) is critical
> >for building things with xerces-c.
>
> Yeah, I initiallly tried using XERCESCROOT, but then I got an error 
> message saying that the config.status file couldn't be found.  So, I saw 
> on your web page that I could use XERCES_LIB and XERCES_INCLUDE 
> directly, so I tried that.  Again, it couldn't find config.status.  So, 
> I found config.status myself, looked at Makefile.PL, and saw that it 
> used XERCES_CONFIG.  That's why you see XERCES_INCLUDE, XERCES_LIB, and 
> XERCES_CONFIG set explicitly.  When that still failed, I removed 
> XERCESCROOT entirely, but to no avail.

Ah, I see. Yes, if you define XERCESCROOT I expect you to have built
it from source, sorry. You are correct, in that case, you'll have to
set the XERCES_CONFIG variable to be the path to the config.status
file. 

> I changed the PERL_MAGIC_tied to be 'P'.  That made everything
> build, 

Good, thanks.

> but the "make test" command still fails.

expected.

> I did try it again, just in case I'm crazy...but it failed again.
> As I said, I still have to manually change the CC make variable from
> cc to CC.  I need to define XERCES_CONFIG myself, and then I can't
> run "make test."

If you set XERCES_CONFIG to be the path to the config.status file,
what does it report when you run 'perl Makefile.PL'? Does it get the
C++ compiler correct?

> The error I get is:
> 
> t/DOMCreate.........Can't load 'blib/arch/auto/XML/Xerces/Xerces.so' for 
> module XML::Xerces: ld.so.1: /apps/base/bin/perl: fatal: relocation 
> error: file blib/arch/auto/XML/Xerces/Xerces.so: symbol 
> __1cLxercesc_2_3QXMLPlatformUtilsKisRelative6FkpkH_c_: referenced symbol 
> not found at /apps/base/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200.
>
> I get this many times, once for each file in the t directory.  

Yuck. Ok, here goes...

the bad news:

This is a dynamic loading error that Test::Harness has uncovered. In
order to brutally test the modules, it runs in a special mode that
requires loading of *all* library symbols - usually the dynaloader
loads on demand, only loading the ones it needs for any given
application, but Test::Harness loads all of them, and you are missing
at least one.

the good news:

This is a known issue that is caused by some aggressive inlining of
certain methods in Xerces-C, and the fix is already available in the
latest nightly build of Xerces-C. 

> When I run a script from the samples directory, I get this error:
> 
> Can't locate loadable object for module XML::Xerces in @INC (@INC 
> contains: /home/younkin/install/XML-Xerces-2.3.0-3/blib/lib 
> /apps/base/lib/perl5/5.6.0/sun4-solaris /apps/base/lib/perl5/5.6.0 
> /apps/base/lib/perl5/site_perl/5.6.0/sun4-solaris 
> /apps/base/lib/perl5/site_perl/5.6.0 /apps/base/lib/perl5/site_perl .) 
> at /home/younkin/install/XML-Xerces-2.3.0-3/blib/lib/XML/Xerces.pm line 7
> Compilation failed in require at DOMCount.pl line 67.

This is surprising. Normally, the errors that you found don't actually
effect production code because the methods that got inlined are never
used by XML::Xerces... But you're still failing. It's finding the
Xerces.pm module in blib/lib but it's not able to load Xerces.so,
probably due to a loading error.

Huh.

> This seems related to the "make test" errors.  I've tried mucking with 
> LD_LIBRARY_PATH and LD_RUN_PATH but nothing seems to help.  Another 
> thing to note that I hadn't told you, I've tried 2 previous versions of 
> XML::Xerces and had basically the same problems with all three 
> versions.  The PERL_MAGIC_tied was a new one with the newest version, 
> but the inability to find config.status, the changing of the make var 
> CC, and the unlocatable so files has been consistent throughout.
> 
> I see that you posted a new version of XML::Xerces yesterday.  I'll give 
> it a try and report back.

I'm pretty certain this is a Xerces-C issue, so you'll need to get the
nightly build code. If you don't want to build Xerces-C from scratch I
can add a couple more method %ignore directives for the unneeded
XMLPlatformUtils methods that are causing your loading problem, that
way they will not be included in the Xerces.so library at all.

> Lastly, I see that you asked me to "post results to the list" if I have 
> trouble.  Well, if I could find "the list" I  would be happy to do that 
> and stop bothering you directly.  But I didn't see where I could do 
> that.  I checked on-line and in the downloaded doc files and couldn't 
> find any information on a list.  Please tell me where it is and I'll 
> make sure to use it in the future.

Sorry, it's on the To: line of this email (it is in the README, but I
agree, it's not obvious).

Cheers,
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: XML::Xerces trouble

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
Chance Younkin <cr...@owt.com> writes:

> 1.  Yes, I still get the wrong value for CC in the makefile after
>     running Makefile.PL.

Sorry, not sure here. Did you set XERCES_CONFIG properly? If so,
please show me the output of Makefile.PL, thanks.

> 3.  I'll try the next version of XML::Xerces today and see where that
>     gets me.  I'll post any info after that.

Unfortunately, it's not very unlikey to help. Those inline
declarations in Xerces-c are causing the trouble. I've just tried
building the XML-Xerces-2.3.0-4 code against the latest CVS snapshot,
and unfortunately they've changed the public API again.

So you have a few choices:

* build xerces-c-2.3.0 from source, and then delete the offending
  inline directives from XMLPlatformUtils.cpp

* I can add %ignore directives in XML-Xerces to eliminate offending
  methods from Xerces.so

* wait for me to make an experimental XML-Xerces-2.4 release so that
  you can build against the CVS Xerces-C snapshot.

The first is probably the most flexible.

> 4.  I have actually tried building the xerces-c in the past, too.  But
>     I ended up with the same results when building the perl code.
>     That is, "make test" still failed and the sample perls still
>     dumped core.  Basically, I've been having the same problems from
>     the beginning no matter which version of Xerces-C or XML::Xerces
>     perl I've used.  I have a suspicion that it's something simple on
>     my end that would fix all this.  I just can't figure out what the
>     'something simple' is.

I don't think so. If you look at the list archives for last month,
you'll see three other reports of this same problem. In all cases that
I know of, removing the inline directives solved the problem.

Cheers,
jas.

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