HTML::Tidy のインストールでちょいはまり
自分の環境(FreeBSD7.1 perl5.8.9)で HTML::Tidy をインストールしようとするとエラーになり正常にインストールできない
その時のログがこちら
Finding PREREQ from Makefile ... Checking if you have Test::More 0 ... Yes (0.96) Checking if you have Test::Builder 0 ... Yes (0.96) Checking if you have overload 0 ... Yes (1.06) Checking if you have constant 0 ... Yes (1.17) Checking if you have Exporter 0 ... Yes (5.63) Checking if you have Carp 0 ... Yes (1.10) Building and testing HTML-Tidy-1.54 cp lib/HTML/Tidy/Message.pm blib/lib/HTML/Tidy/Message.pm cp lib/HTML/Tidy.pm blib/lib/HTML/Tidy.pm /usr/local/bin/perl /usr/local/lib/perl5/5.8.9/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/5.8.9/ExtUtils/typemap Tidy.xs > Tidy.xsc && mv Tidy.xsc Tidy.c cc -c -I. -I/usr/include/tidyp -I/usr/local/include/tidyp -I/usr/include/tidyp -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O2 -pipe -march=pentiumpro -fno-strict-aliasing -DVERSION=\"1.54\" -DXS_VERSION=\"1.54\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.9/mach/CORE" Tidy.c Tidy.xs:5:19: error: tidyp.h: No such file or directory Tidy.xs:6:20: error: buffio.h: No such file or directory Tidy.xs:12: error: expected ')' before 'tdoc' Tidy.xs: In function 'XS_HTML__Tidy__tidy_messages': Tidy.xs:50: error: 'TidyBuffer' undeclared (first use in this function) Tidy.xs:50: error: (Each undeclared identifier is reported only once Tidy.xs:50: error: for each function it appears in.) Tidy.xs:50: error: expected ';' before 'errbuf' Tidy.xs:51: error: 'TidyDoc' undeclared (first use in this function) Tidy.xs:51: error: expected ';' before 'tdoc' Tidy.xs:55: error: 'errbuf' undeclared (first use in this function) Tidy.xs:56: error: 'tdoc' undeclared (first use in this function) Tidy.xs:56: error: 'TidyCharEncoding' undeclared (first use in this function) Tidy.xs:80: error: 'TidyNewline' undeclared (first use in this function) Tidy.xs:81: error: 'TidyLF' undeclared (first use in this function) Tidy.xs:84: error: 'TidyCR' undeclared (first use in this function) Tidy.xs: In function 'XS_HTML__Tidy__tidy_clean': Tidy.xs:113: error: 'TidyBuffer' undeclared (first use in this function) Tidy.xs:113: error: expected ';' before 'errbuf' Tidy.xs:114: error: expected ';' before 'output' Tidy.xs:115: error: 'TidyDoc' undeclared (first use in this function) Tidy.xs:115: error: expected ';' before 'tdoc' Tidy.xs:119: error: 'output' undeclared (first use in this function) Tidy.xs:120: error: 'errbuf' undeclared (first use in this function) Tidy.xs:123: error: 'tdoc' undeclared (first use in this function) Tidy.xs:123: error: 'TidyWrapLen' undeclared (first use in this function) Tidy.xs:132: error: 'TidyCharEncoding' undeclared (first use in this function) Tidy.xs:152: error: 'TidyForceOutput' undeclared (first use in this function) Tidy.xs:152: error: 'yes' undeclared (first use in this function) Tidy.xs:168: error: 'TidyNewline' undeclared (first use in this function) Tidy.xs:169: error: 'TidyLF' undeclared (first use in this function) Tidy.xs:172: error: 'TidyCR' undeclared (first use in this function) Tidy.xs: In function 'XS_HTML__Tidy__tidyp_version': Tidy.xs:199: warning: assignment makes pointer from integer without a cast *** Error code 1 Stop in /root/.cpanm/work/1298789436.22076/HTML-Tidy-1.54.
どうやら HTML::Tidy から利用するライブラリがインストールされてない為失敗してる様子
でググってみると libtidy 及び tidyp の2つのライブラリが必要なようだ
OSがFreeBSDなのでportsにないか調べるとありました
www/tidy-lib textproc/tidyp
portsなのでportinstall とか pkg_add でサクっとインストール
で最後に cpanm を使って一丁あがりです
$ cpanm HTML::Tidy
created: