develooper Front page | perl.libwww | Postings from February 2003

HTML::TreeBuilder and HTML::Parser problem on Solaris

From:
sborruso@austin.rr.com
Date:
February 2, 2003 15:35
Subject:
HTML::TreeBuilder and HTML::Parser problem on Solaris
Message ID:
410-22003202233435771@M2W077.mail2web.com
Greetings, 

I'm trying to use the HTML:TreeBuilder package on my virtual 
hosted Solaris server (learned about it in the new Perl & LWP book). 
I was told that I needed to install the package in a local dir 
since my hosting service was running a backlevel versionof one of 
the required modules. I installed HTML::Tagset, HTML::Parser, 
and HTML::Tree from links at CPAN.org (output from installs included
below). 

This is the first time I've ever installed a perl package. 

Running a test script on a local WIN2K desktop machine works fine (after
installing Perl with no local mods). 

Running the same script on Solaris produces - 

Can't find '_hparser_xs_state' element in HTML::Parser hash at newtree2.pl 
line 
14. 

I've seen others in newsgroups/mailing list that have had the 
same problem, have gone through the readme files, changed the 
"use" stmts in my script thinking I wasn't point at the right mods, 
read the DIAGNOSTICS section of the HTML::Parser, etc. and am still 
confused on how to to proceed with solving this. 

Any assistance is most appreciated. 
Steve 

Here's my test script .... 

#!/usr/bin/perl 
use URI::URL; 
use LWP::Simple; 
use lib qw(/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML); 
use lib qw(/home/myid/lib/perl5/site_perl/5.005/HTML); 

#require HTML::Tagset; 
require HTML::Parser; 
require HTML::TreeBuilder; 

my $myURL = 'http://www.google.com ; 
my $MainPage = get($myURL); # Get the main page for this user 
my $tree = HTML::TreeBuilder->new; # empty tree 
$tree->parse($MainPage); 
. 
. 

Output from installing the three perl mods - 

jupiter:/public_html/myperl_mods > ls -l 
total 1996 
-rw-r--r-- 1 myid cust 286720 Jan 12 15:09 HTML-Parser-3.26.tar 
-rw-r--r-- 1 myid cust 286720 Jan 28 00:41 HTML-Parser-3.27.tar 
-rw-r--r-- 1 myid cust 30720 Jan 26 18:01 HTML-Tagset-3.03.tar 
-rw-r--r-- 1 myid cust 389120 Jan 12 15:02 HTML-Tree-3.16.tar 
jupiter:/public_html/myperl_mods > tar -xof HTML-Tagset-3.03.tar 
jupiter:/public_html/myperl_mods > cd HTML-Tagset-3.03 
jupiter:/public_html/myperl_mods/HTML-Tagset-3.03 > perl Makefile.PL 
PREFIX=/home 
/myid INSTALLMAN1DIR=/home/myid/dump INSTALLMAN3DIR=/home/myid/dump 
Checking if your kit is complete... 
Looks good 
Writing Makefile for HTML::Tagset 
jupiter:/public_html/myperl_mods/HTML-Tagset-3.03 > make install 
mkdir blib 
mkdir blib/lib 
mkdir blib/lib/HTML 
mkdir blib/arch 
mkdir blib/arch/auto 
mkdir blib/arch/auto/HTML 
mkdir blib/arch/auto/HTML/Tagset 
mkdir blib/lib/auto 
mkdir blib/lib/auto/HTML 
mkdir blib/lib/auto/HTML/Tagset 
mkdir blib/man3 
cp Tagset.pm blib/lib/HTML/Tagset.pm 
Manifying blib/man3/HTML::Tagset.3 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Tagset.pm 
Installing /home/myid/dump/HTML::Tagset.3 
Writing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Tagset/.p 
acklist 
sh: /home/myid/lib/perl5/5.00502/sun4-solaris/perllocal.pod: cannot create 
Appending installation info to 
/home/myid/lib/perl5/5.00502/sun4-solaris/perl 
local.pod 

jupiter:/public_html/myperl_mods/HTML-Parser-3.27 > perl 
-I/home/myid/lib/perl 
5/site_perl/5.005 Makefile.PL PREFIX=/home/myid INSTALLMAN1DIR=/home/myid/ 
dump INSTALLMAN3DIR=/home/myid/dump 
Checking if your kit is complete... 
Looks good 
Processing hints file hints/solaris.pl 
Turning off optimizations to avoid compiler bug 
Writing Makefile for HTML::Parser 
jupiter:/public_html/myperl_mods/HTML-Parser-3.27 > make install 
mkdir blib 
mkdir blib/lib 
mkdir blib/lib/HTML 
mkdir blib/arch 
mkdir blib/arch/auto 
mkdir blib/arch/auto/HTML 
mkdir blib/arch/auto/HTML/Parser 
mkdir blib/lib/auto 
mkdir blib/lib/auto/HTML 
mkdir blib/lib/auto/HTML/Parser 
mkdir blib/man3 
cp Parser.pm blib/lib/HTML/Parser.pm 
cp lib/HTML/Entities.pm blib/lib/HTML/Entities.pm 
cp lib/HTML/Filter.pm blib/lib/HTML/Filter.pm 
cp lib/HTML/HeadParser.pm blib/lib/HTML/HeadParser.pm 
cp lib/HTML/TokeParser.pm blib/lib/HTML/TokeParser.pm 
cp lib/HTML/LinkExtor.pm blib/lib/HTML/LinkExtor.pm 
cp lib/HTML/PullParser.pm blib/lib/HTML/PullParser.pm 
/usr/bin/perl mkhctype >hctype.h 
/usr/bin/perl mkpfunc >pfunc.h 
/usr/bin/perl -I/usr/local/lib/perl5/5.00502/sun4-solaris 
-I/usr/local/lib/perl5 
/5.00502 /usr/local/lib/perl5/5.00502/ExtUtils/xsubpp -typemap 
/usr/local/lib/p 
erl5/5.00502/ExtUtils/typemap -typemap typemap Parser.xs >Parser.tc && mv 
Parser 
.tc Parser.c 
gcc -c -I/usr/local/include -DVERSION=\"3.27\" -DXS_VERSION=\"3.27\" 
-fPI 
C -I/usr/local/lib/perl5/5.00502/sun4-solaris/CORE -DMARKED_SECTION
Parser.c 
Running Mkbootstrap for HTML::Parser () 
chmod 644 Parser.bs 
LD_RUN_PATH="" gcc -o blib/arch/auto/HTML/Parser/Parser.so -G 
-L/usr/local/lib 
Parser.o 
chmod 755 blib/arch/auto/HTML/Parser/Parser.so 
cp Parser.bs blib/arch/auto/HTML/Parser/Parser.bs 
chmod 644 blib/arch/auto/HTML/Parser/Parser.bs 
Manifying blib/man3/HTML::Parser.3 
Manifying blib/man3/HTML::Entities.3 
Manifying blib/man3/HTML::Filter.3 
Manifying blib/man3/HTML::HeadParser.3 
Manifying blib/man3/HTML::LinkExtor.3 
Manifying blib/man3/HTML::TokeParser.3 
Manifying blib/man3/HTML::PullParser.3 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Parser 
/Parser.so 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Parser 
/Parser.bs 
Files found in blib/arch --> Installing files in blib/lib into architecture 
depe 
ndend library tree! 
Installing /home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/Parser.pm 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/Entities.pm 

Installing /home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/Filter.pm 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/HeadParser. 
pm 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/TokeParser. 
pm 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/LinkExtor.p 
m 
Installing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/HTML/PullParser. 
pm 
Installing /home/myid/dump/HTML::Parser.3 
Installing /home/myid/dump/HTML::Entities.3 
Installing /home/myid/dump/HTML::Filter.3 
Installing /home/myid/dump/HTML::HeadParser.3 
Installing /home/myid/dump/HTML::LinkExtor.3 
Installing /home/myid/dump/HTML::TokeParser.3 
Installing /home/myid/dump/HTML::PullParser.3 
Writing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Parser/.p 
acklist 
## Differing versions of HTML/Entities.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/HTML/Entities.pm 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/Entities.pm 
## Differing version of HTML/Filter.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/Filter.pm 
## Differing versions of HTML/HeadParser.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/HTML/HeadParser.pm 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/HeadParser.pm 
## Differing versions of HTML/LinkExtor.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/HTML/LinkExtor.pm 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/LinkExtor.pm 
## Differing versions of HTML/Parser.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/HTML/Parser.pm 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/Parser.pm 
## Differing versions of HTML/TokeParser.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/HTML/TokeParser.pm 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/TokeParser.pm 
## Differing version of auto/HTML/Parser/Parser.so found. You might like to 
rm 
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML/Parser/Parser.so

## Running 'make install UNINST=1' will unlink all those files for you. 
sh: /home/myid/lib/perl5/5.00502/sun4-solaris/perllocal.pod: cannot create 
Appending installation info to 
/home/myid/lib/perl5/5.00502/sun4-solaris/perl 
local.pod 
jupiter:/public_html/myperl_mods/HTML-Parser-3.27 > cd .. 
jupiter:/public_html/myperl_mods > tar -xof HTML-Tree-3.16.tar 
jupiter:/public_html/myperl_mods > cd HTML-Tree-3.16 
jupiter:/public_html/myperl_mods/HTML-Tree-3.16 > perl 
-I/home/myid/lib/perl5/ 
site_perl/5.005 Makefile.PL PREFIX=/home/myid INSTALLMAN1DIR=/home/myid/du 
mp INSTALLMAN3DIR=/home/myid/dump 
Checking if your kit is complete... 
Looks good 
Writing Makefile for HTML-Tree 
jupiter:/public_html/myperl_mods/HTML-Tree-3.16 > make 
mkdir blib 
mkdir blib/lib 
mkdir blib/arch 
mkdir blib/arch/auto 
mkdir blib/arch/auto/HTML-Tree 
mkdir blib/lib/auto 
mkdir blib/lib/auto/HTML-Tree 
mkdir blib/man3 
cp lib/HTML/Parse.pm blib/lib/HTML/Parse.pm 
cp lib/HTML/Tree.pm blib/lib/HTML/Tree.pm 
cp lib/HTML/AsSubs.pm blib/lib/HTML/AsSubs.pm 
cp lib/HTML/Tree/AboutTrees.pod blib/lib/HTML/Tree/AboutTrees.pod 
cp lib/HTML/Element/traverse.pm blib/lib/HTML/Element/traverse.pm 
cp lib/HTML/Tree/Scanning.pod blib/lib/HTML/Tree/Scanning.pod 
cp lib/HTML/TreeBuilder.pm blib/lib/HTML/TreeBuilder.pm 
cp lib/HTML/Tree/AboutObjects.pod blib/lib/HTML/Tree/AboutObjects.pod 
cp lib/HTML/Element.pm blib/lib/HTML/Element.pm 
Manifying blib/man3/HTML::Parse.3 
Manifying blib/man3/HTML::Tree.3 
Manifying blib/man3/HTML::AsSubs.3 
Manifying blib/man3/HTML::Tree::AboutTrees.3 
Manifying blib/man3/HTML::Element::traverse.3 
Manifying blib/man3/HTML::Tree::Scanning.3 
Manifying blib/man3/HTML::TreeBuilder.3 
Manifying blib/man3/HTML::Element.3 
Manifying blib/man3/HTML::Tree::AboutObjects.3 
jupiter:/public_html/myperl_mods/HTML-Tree-3.16 > make install 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Parse.pm 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Tree.pm 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/AsSubs.pm 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Tree/AboutTrees.pod 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Tree/Scanning.pod 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Tree/AboutObjects.pod 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Element/traverse.pm 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/TreeBuilder.pm 
Installing /home/myid/lib/perl5/site_perl/5.005/HTML/Element.pm 
Installing /home/myid/dump/HTML::Parse.3 
Installing /home/myid/dump/HTML::Tree.3 
Installing /home/myid/dump/HTML::AsSubs.3 
Installing /home/myid/dump/HTML::Tree::AboutTrees.3 
Installing /home/myid/dump/HTML::Element::traverse.3 
Installing /home/myid/dump/HTML::Tree::Scanning.3 
Installing /home/myid/dump/HTML::TreeBuilder.3 
Installing /home/myid/dump/HTML::Element.3 
Installing /home/myid/dump/HTML::Tree::AboutObjects.3 
Writing 
/home/myid/lib/perl5/site_perl/5.005/sun4-solaris/auto/HTML-Tree/.pac 
klist 
## Differing version of HTML/AsSubs.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/AsSubs.pm 
## Differing version of HTML/Element.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/Element.pm 
## Differing version of HTML/Parse.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/Parse.pm 
## Differing version of HTML/TreeBuilder.pm found. You might like to 
rm /usr/local/lib/perl5/site_perl/5.005/HTML/TreeBuilder.pm 
## Running 'make install UNINST=1' will unlink all those files for you. 
sh: /home/myid/lib/perl5/5.00502/sun4-solaris/perllocal.pod: cannot create 
Appending installation info to 
/home/myid/lib/perl5/5.00502/sun4-solaris/perl 
local.pod 
jupiter:/public_html/myperl_mods/HTML-Tree-3.16 >

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About