Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / November 2005



Tip: Looking for answers? Try searching our database.

XML::Simple install problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shawn O'Donnell - 09 Nov 2005 18:06 GMT
I'm trying to install XML::Simple 2.14 using cpan.

Running perl v5.8.6 built for darwin-2level on OS 10.3.9

The problems start in the install report about here:

  # Package                        Version
  #  perl                           5.8.6
  #  XML::Simple                    2.14
  #  Storable                       2.13
  #  XML::Parser                    2.34
  #  XML::SAX                       0.13
  #  XML::NamespaceSupport          1.09
  #  XML::SAX::PurePerl             0.90 (default parser)
  t/0_Config........ok
  t/1_XMLin.........ok 5/122Unable to recognise encoding of this document
  at /Library/Perl/5.8.6/XML/SAX/PurePerl/EncodingDetect.pm line 96.
  t/1_XMLin.........ok 7/122Unable to recognise encoding of this document
  at /Library/Perl/5.8.6/XML/SAX/PurePerl/EncodingDetect.pm line 96.

And so forth with the encoding errors for a couple of pages.  There
are a few other errors along the way but things appear to have gone
bad well before thm.  Finally, cpan reports:

  Failed Test  Stat Wstat Total Fail  Failed  List of Failed
  -----------------------------------------------------------------------
  t/1_XMLin.t     4  1024   122    4   3.28%  32 38-39 122
  t/2_XMLout.t    1   256   196    1   0.51%  47
  1 subtest skipped.
  Failed 2/11 test scripts, 81.82% okay. 5/468 subtests failed, 98.93% okay.
  make: *** [test_dynamic] Error 2
    /usr/bin/make test -- NOT OK
  Running make install
    make test had returned bad status, won't install without force

Any ideas what I've done wrong?

Another question: I've a lot of bad luck with cpan not installing
modules.  If I install OS X 10.4, will I get a clean perl
installation to work with?
Sherm Pendley - 09 Nov 2005 22:32 GMT
> I'm trying to install XML::Simple 2.14 using cpan.
>
> Running perl v5.8.6 built for darwin-2level on OS 10.3.9

>   t/1_XMLin.........ok 5/122Unable to recognise encoding of this  
> document
>   at /Library/Perl/5.8.6/XML/SAX/PurePerl/EncodingDetect.pm line 96.

> Another question: I've a lot of bad luck with cpan not installing  
> modules.  If I install OS X 10.4, will I get a clean perl  
> installation to work with?

As shown above, you've installed your copy of 5.8.6 in the location  
normally reserved for the Apple-supplied Perl. It's configured with a  
different architecture (darwin-2level) than that used by the Perl  
included with Tiger (darwin-thread-multi-2level), so that *probably*  
won't cause any major show-stopping problems, since architecture-
specific libraries and modules are stored in different  
subdirectories. Panther-to-Tiger upgrades are much smoother in that  
regard than Jaguar-to-Panther upgrades were.

On the other hand, because it's configured to use a different  
architecture, many of the CPAN modules you've installed for this Perl  
will not work with the standard Tiger Perl. And if problems do happen  
to crop up, they'll be obscure and difficult to diagnose and debug.

For future reference, it's worth keeping in mind that the easiest  
thing is to take the advice in readme.macosx, and install your custom  
Perl in an out-of-the-way location. OS upgrades are like an oncoming  
train - it's easy to see them coming, and you know where they'll be  
going, so the easy way to avoid most problems is to simply stay off  
the tracks.

As far as the XML::Simple module goes... I'd use "force install".  
With 463 out of 468 subtests passing and only 5 failing, the odds are  
very good that your own script won't trip over the problem indicated  
by the failures.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Shawn O'Donnell - 10 Nov 2005 20:54 GMT
>On the other hand, because it's configured to use a different
>architecture, many of the CPAN modules you've installed for this Perl
>will not work with the standard Tiger Perl. And if problems do happen
>to crop up, they'll be obscure and difficult to diagnose and debug.

Thanks.  I'll pay more attention next time I mess with the
installation.  I guess I told cpan to do the wrong thing last time I
upgraded.

Besides README.macosx, do you know of other good documentation on
perl installation hygiene?

--Shawn
Sherm Pendley - 10 Nov 2005 22:47 GMT
>> On the other hand, because it's configured to use a different
>> architecture, many of the CPAN modules you've installed for this Perl
[quoted text clipped - 4 lines]
> installation.  I guess I told cpan to do the wrong thing last time  
> I upgraded.

It's not really a question of the right vs. wrong configuration. It's  
just options, whether you want Perl to support multi-threading or  
not, 32- or 64-bit, etc. A module that was compiled for a multi-
threaded Perl isn't compatible with one that was compiled for a  
single-threaded Perl. Same thing with 32- vs. 64-bit, 5.6.x vs.  
5.8.x, etc.

But Perl's installer knows all about that, so it very rarely causes  
problems. It's why some modules are installed in specific  
subdirectories such as "5.8.6/darwin-thread-multi-2level". Only a  
that specific version and configuration of perl will include that  
subdir in @INC by default.

A few years ago, the problem was much worse - Apple's installation of  
5.6.0 on 10.0, 10.1, and 10.2 omitted the version subdirectory, and  
the configure script for 5.8.0 had problems of its own. That resulted  
in a lot of problems for folks who tried to upgrade. But that's all  
ancient history now.

> Besides README.macosx, do you know of other good documentation on  
> perl installation hygiene?

The generic README is pretty thorough, and now that we're using a  
*nix system it's virtually all relevant. The first part of the  
"ExtUtils::MakeMaker" man page is very informative about what module  
pieces are installed where.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.