This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hi! I have build a rpm for w3c-validator using misc/w3c-markup-validator.spec After installing, I often had the following error : Base class package "Class::Accessor" is empty. (Perhaps you need to 'use' the module which defines that package first.) at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/SGML/Parser/OpenSP.pm line 13 BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/SGML/Parser/OpenSP.pm line 13. Compilation failed in require at /usr/share/w3c-markup-validator/cgi-bin/check line 61. BEGIN failed--compilation aborted at /usr/share/w3c-markup-validator/cgi-bin/check line 61. Then I installed perl-Class-Accessor rpm and the problem was gone. Is it possible to fix the spec file so that dependency with perl(Class::Accessor) is managed ?
That would not be the right thing to do. Validator does not use Class::Accessor directly, it's SGML::Parser::OpenSP that currently does, and that's an internal detail of SGML::Parser::OpenSP. The correct way to fix this is to fix it in the package where your SGML::Parser::OpenSP comes from [0], or if it is not installed from a rpm package, I'm afraid you'll need to make sure that Class::Accessor is installed yourself. [0] For example Fedora has it in the perl-SGML-Parser-OpenSP package which already has a dependency on perl(Class::Accessor) but then again Fedora has the validator packaged too (as w3c-markup-validator) which contains all the necessary dependencies, so I'm guessing you're using some other distribution.
I do agree with you (I realised a while after submitting the bug report) Sorry for disturbing.