Neophyte having trouble Installing XML::Parser module on OS X | Newbie | | Join Date: Sep 2006 Location: Doing a software contract in Logan, UT.
Posts: 10
| |
Environment: Mac OS X (10.4.10) on MacBook Pro
I'm a Perl Neophyte. I've downloaded the XML::Parser module and am attempting to install it in my working directory (referenced via PERL5LIB env): -
PERL5LIB=/Users/Ric/Library/Perl/
-
-
[/Users/Ric/Library/perl]ls
-
XML-Parser-2.34/ XML-Parser-2.34.tar
-
Per inclosed README, I performed the following:
1) Build the makefile: -
[/Users/Ric/Library/perl/XML-Parser-2.34]ls
-
Changes MANIFEST Parser/ README t/
-
Expat/ Makefile.PL Parser.pm samples/
-
-
[/Users/Ric/Library/perl/XML-Parser-2.34]perl MakeFile.PL
-
Checking if your kit is complete...
-
Looks good
-
Writing Makefile for XML::Parser::Expat
-
Writing Makefile for XML::Parser
-
2) Perform the make: -
[/Users/Ric/Library/perl/XML-Parser-2.34]make
-
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
-
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
-
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
-
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
-
...
-
Manifying blib/man3/XML::Parser::Style::Tree.3
-
Manifying blib/man3/XML::Parser::Style::Stream.3
-
3) make test: -
[/Users/Ric/Library/perl/XML-Parser-2.34]make test
-
make[1]: Entering directory `/Users/Ric/Library/Perl/XML-Parser-2.34/Expat'
-
make[1]: Leaving directory `/Users/Ric/Library/Perl/XML-Parser-2.34/Expat'
-
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
-
t/astress.........ok
-
t/cdata...........ok
-
t/decl............ok
-
t/defaulted.......ok
-
t/encoding........"my" variable $p masks earlier declaration in same scope at t/encoding.t line 94.
-
t/encoding........FAILED test 3
-
Failed 1/6 tests, 83.33% okay
-
t/external_ent....Couldn't load LWP based external entity handler
-
Switching to file-based external entity handler
-
(To avoid this message, use NoLWP option to XML::Parser)
-
t/external_ent....ok
-
t/file............ok
-
t/finish..........ok
-
t/namespaces......ok
-
t/parament........Couldn't load LWP based external entity handler
-
Switching to file-based external entity handler
-
(To avoid this message, use NoLWP option to XML::Parser)
-
t/parament........ok
-
t/partial.........ok
-
t/skip............ok
-
t/stream..........ok
-
t/styles..........ok
-
Failed Test Stat Wstat Total Fail List of Failed
-
-------------------------------------------------------------------------------
-
t/encoding.t 6 1 3
-
Failed 1/14 test scripts. 1/130 subtests failed.
-
Files=14, Tests=130, 0 wallclock secs ( 0.46 cusr + 0.14 csys = 0.60 CPU)
-
Failed 1/14 test programs. 1/130 subtests failed.
-
make: *** [test_dynamic] Error 255
-
-
[/Users/Ric/Library/perl/XML-Parser-2.34]
-
Question: What is the signifigance of this test and what is it saying in layman's terms?
4) Checking the Build Library: -
[/Users/Ric/Library/perl/XML-Parser-2.34]ls -R blib/
-
arch/ bin/ lib/ man1/ man3/ script/
-
-
blib//arch:
-
auto/
-
-
blib//arch/auto:
-
XML/
-
-
blib//arch/auto/XML:
-
Parser/
-
-
blib//arch/auto/XML/Parser:
-
Expat/
-
-
blib//arch/auto/XML/Parser/Expat:
-
Expat.bs Expat.bundle*
-
-
blib//bin:
-
-
blib//lib:
-
XML/ auto/
-
-
blib//lib/XML:
-
Parser/ Parser.pm
-
-
blib//lib/XML/Parser:
-
Encodings/ Expat.pm LWPExternEnt.pl Style/
-
-
blib//lib/XML/Parser/Encodings:
-
Japanese_Encodings.msg iso-8859-2.enc iso-8859-7.enc windows-1252.enc x-sjis-jdk117.enc
-
README iso-8859-3.enc iso-8859-8.enc x-euc-jp-jisx0221.enc x-sjis-jisx0221.enc
-
big5.enc iso-8859-4.enc iso-8859-9.enc x-euc-jp-unicode.enc x-sjis-unicode.enc
-
euc-kr.enc iso-8859-5.enc windows-1250.enc x-sjis-cp932.enc
-
-
blib//lib/XML/Parser/Style:
-
Debug.pm Objects.pm Stream.pm Subs.pm Tree.pm
-
-
blib//lib/auto:
-
XML/
-
-
blib//lib/auto/XML:
-
Parser/
-
-
blib//lib/auto/XML/Parser:
-
Expat/
-
-
blib//lib/auto/XML/Parser/Expat:
-
-
blib//man1:
-
-
blib//man3:
-
XML::Parser.3 XML::Parser::Style::Objects.3 XML::Parser::Style::Tree.3
-
XML::Parser::Expat.3 XML::Parser::Style::Stream.3
-
XML::Parser::Style::Debug.3 XML::Parser::Style::Subs.3
-
-
blib//script:
-
-
[/Users/Ric/Library/perl/XML-Parser-2.34]
-
The above looks 'okay' to me. Question: Can I access this module from my perl script? What would be the correct syntax to do so?
Here the calling routine (ric.pl): -
#!/usr/bin/perl
-
use diagnostics;
-
-
use XML::Parser;
-
-
print "Done.";
-
Here's the result: -
[/Users/Ric/workarea/perl]perl ric.pl
-
Can't locate XML/Parser.pm in @INC (@INC contains: /Users/Ric/Library/Perl/ /opt/local/lib/perl5/5.9.5/darwin-2level /opt/local/lib/perl5/5.9.5 /opt/local/lib/perl5/site_perl/5.9.5/darwin-2level /opt/local/lib/perl5/site_perl/5.9.5 /opt/local/lib/perl5/vendor_perl/5.9.5/darwin-2level /opt/local/lib/perl5/vendor_perl/5.9.5 /opt/local/lib/perl5/vendor_perl .) at ric.pl line 3.
-
BEGIN failed--compilation aborted at ric.pl line 3 (#1)
-
(F) You said to do (or require, or use) a file that couldn't be
-
found. Perl looks for the file in all the locations mentioned in @INC,
-
unless the file name included the full path to the file. Perhaps you
-
need to set the PERL5LIB or PERL5OPT environment variable to say where
-
the extra library is, or maybe the script needs to add the library name
-
to @INC. Or maybe you just misspelled the name of the file. See
-
perlfunc/require and lib.
-
-
Uncaught exception from user code:
-
Can't locate XML/Parser.pm in @INC (@INC contains: /Users/Ric/Library/Perl/ /opt/local/lib/perl5/5.9.5/darwin-2level /opt/local/lib/perl5/5.9.5 /opt/local/lib/perl5/site_perl/5.9.5/darwin-2level /opt/local/lib/perl5/site_perl/5.9.5 /opt/local/lib/perl5/vendor_perl/5.9.5/darwin-2level /opt/local/lib/perl5/vendor_perl/5.9.5 /opt/local/lib/perl5/vendor_perl .) at ric.pl line 3.
-
BEGIN failed--compilation aborted at ric.pl line 3.
-
at ric.pl line 3
-
-
[/Users/Ric/workarea/perl]
-
I'm lost here.
What am I missing?
Regards,
Ric.
P.S. The following is some supplemental info: -
[/Users/Ric/workarea/perl]perl -V
-
Summary of my perl5 (revision 5 version 9 subversion 5) configuration:
-
Platform:
-
osname=darwin, osvers=8.10.1, archname=darwin-2level
-
uname='darwin ricmac.ci.north-las-vegas.nv.us 8.10.1 darwin kernel version 8.10.1: wed may 23 16:33:00 pdt 2007; root:xnu-792.22.5~1release_i386 i386 i386 '
-
config_args='-des -Dprefix=/opt/local -Dccflags=-I'/opt/local/include' -Dldflags=-L/opt/local/lib -Dvendorprefix=/opt/local -Dusedevel -Dcc=/usr/bin/gcc-4.0'
-
hint=recommended, useposix=true, d_sigaction=define
-
useithreads=undef, usemultiplicity=undef
-
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
-
use64bitint=undef, use64bitall=undef, uselongdouble=undef
-
usemymalloc=n, bincompat5005=undef
-
Compiler:
-
cc='/usr/bin/gcc-4.0', ccflags ='-I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include',
-
optimize='-O3',
-
cppflags='-no-cpp-precomp -I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include'
-
ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5367)', gccosandvers=''
-
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
-
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, prototype=define
-
Linker and Libraries:
-
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/opt/local/lib -L/usr/local/lib'
-
libpth=/usr/local/lib /opt/local/lib /usr/lib
-
libs=-ldbm -ldb -ldl -lm -lc
-
perllibs=-ldl -lm -lc
-
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
-
gnulibc_version=''
-
Dynamic Linking:
-
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
-
cccdlflags=' ', lddlflags='-L/opt/local/lib -bundle -undefined dynamic_lookup -L/usr/local/lib'
-
-
-
Characteristics of this binary (from libperl):
-
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
-
USE_LARGE_FILES USE_PERLIO
-
Built under darwin
-
Compiled at Oct 12 2007 11:02:55
-
%ENV:
-
PERL5LIB="/Users/Ric/Library/Perl/"
-
@INC:
-
/Users/Ric/Library/Perl/
-
/opt/local/lib/perl5/5.9.5/darwin-2level
-
/opt/local/lib/perl5/5.9.5
-
/opt/local/lib/perl5/site_perl/5.9.5/darwin-2level
-
/opt/local/lib/perl5/site_perl/5.9.5
-
/opt/local/lib/perl5/vendor_perl/5.9.5/darwin-2level
-
/opt/local/lib/perl5/vendor_perl/5.9.5
-
/opt/local/lib/perl5/vendor_perl
-
.
-
-
[/Users/Ric/workarea/perl]
-
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,223 network members.
|