Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello oh wise a great monks. I have spent a day on this without a solution so I am turning to you for help. I am trying to install HTML::Tidy on a Windows 10 server and am stuck! I know that tidyp is need so I'm trying to install Alien::Tidyp first as it searches the box for tidyp and if it's not there should install it. That's where I get this error:/
-c src/buffio.c -o src/buffio.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/clean.c -o src/clean.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/config.c -o src/config.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/entities.c -o src/entities.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/fileio.c -o src/fileio.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/istack.c -o src/istack.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/lexer.c -o src/lexer.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/localize.c -o src/localize.o gcc -Isrc -Iinclude -O2 -Wall -D_WIN32_WINNT=0x0500 -DSUPPORT_ACCESSIB +ILITY_CHECKS=1 -DSUPPORT_ASIAN_ENCODINGS=1 -DSUPPORT_UTF16_ENCODINGS= +1 -c src/mappedio.c -o src/mappedio.o In file included from src/mappedio.c:100: src/streamio.h:204:15: error: expected identifier or '(' before numeri +c constant #define CR 0xD ^~~ gmake: *** [C:\STRAWB~1\cpan\build\Alien-Tidyp-v1.4.7-7\patches\Makefi +le.mingw:45: src/mappedio.o] Error 1 ###ERROR### [512] during make ... at inc/My/Builder/Windows.pm line 3 +9. KMX/Alien-Tidyp-v1.4.7.tar.gz C:\Strawberry\perl\bin\perl.exe ./Build -- NOT OK Stopping: 'install' failed for 'Alien::Tidyp'. Failed during this command: KMX/Alien-Tidyp-v1.4.7.tar.gz : make NO
Please note I'm trying to install using CPAN. I even installed cpanm to try and get the pms thinking it might do something different. So I'm stuck my script uses Tidy::HTML but I can't get tidyp on the box so I can't install HTML::Tidy. I'm not doing anything too fancy with Tidy, here's my code:
my $contents_of_file = 1; @files = glob "$call_dir/*.html"; printf "Got %d files\n", scalar @files; my $tidy = HTML::Tidy->new( { tidy_mark => 1, #output_xhtml => 1, # yes #output_xhtml => 1, # yes add_xml_decl => 1, # no wrap => 76, error_file => 'errs.txt', char_encoding => 'utf8', indent_cdata => 1, clean => 1, fix_bad_comments =>1 }); for my $file (@files){ $$temp_var = read_file( $file ); if ( $$temp_var =~ m|^URL.*| ){ next } # this + is empty file for error message in output. my $tres = $tidy->parse( $file, $$temp_var ); print "Tidy file: $file, result is $tres\n"; open OUT,'>',$file or die "$!"; print OUT $tidy->clean( $file, $$temp_var ); print "cleaning " . $file. "\n"; close OUT; } $temp_var = undef;
I would be open to using another module that I could install that could do this. Up till 3AM last night trying to find a solution, not looking to go there again tonight
Thanks in advance for any help/insight!
The tired nub
PS - I also did take the time to install Cygwin thinking I could d/l the source and compile by I've got no clue what I'm doing there.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Tidy - Tidyp install issues
by syphilis (Archbishop) on Aug 06, 2020 at 06:01 UTC | |
by Anonymous Monk on Aug 06, 2020 at 16:50 UTC | |
by Anonymous Monk on Aug 06, 2020 at 18:05 UTC | |
by syphilis (Archbishop) on Aug 07, 2020 at 00:41 UTC | |
by roboticus (Chancellor) on Aug 07, 2020 at 11:59 UTC |