[opensuse] Where do I find perl module C::Scan?
Hello, To build a perl XS module with h2xs, I need the C::Scan module. Since I could not find this module with zypper, but h2xs suggests to install it via CPAN: $ h2xs -O --skip-autoload -b 5.8.0 -x -n Module module.h C::Scan required if you use -x option. To install C::Scan, execute perl -MCPAN -e "install C::Scan" $ So I decided to follow this suggestion and did (as root): # perl -MCPAN -e "install C::Scan" [ many lines of output deleted ] Installing /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm Installing /usr/share/man/man3/C::Scan.3pm Writing /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/auto/C/Scan/.packlist Appending installation info to /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/perllocal.pod HVDS/C-Scan-0.74.tar.gz /usr/bin/make install -- OK # But h2xs still complains that it can not find this module. "perl -v" claims /usr/lib/perl5/site_perl/5.10.0 is contained in the @INC array. But /usr/lib/perl5/site_perl/5.10.0/C is _not_ (notice the "/C" at the end) @INC: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl So here are my questions: 1. Is there a way to install this module with zypper? How do I find out which package contains this module? 2. What is the proper way to add a directory to the @INC array? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Josef Wolf (jw@raven.inka.de) [20090114 18:30]:
To build a perl XS module with h2xs, I need the C::Scan module. Since I could not find this module with zypper, but h2xs suggests to install it via CPAN:
$ h2xs -O --skip-autoload -b 5.8.0 -x -n Module module.h C::Scan required if you use -x option. To install C::Scan, execute perl -MCPAN -e "install C::Scan" $
So I decided to follow this suggestion and did (as root):
# perl -MCPAN -e "install C::Scan" [ many lines of output deleted ] Installing /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm Installing /usr/share/man/man3/C::Scan.3pm Writing /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/auto/C/Scan/.packlist Appending installation info to /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/perllocal.pod HVDS/C-Scan-0.74.tar.gz /usr/bin/make install -- OK #
Could it be that you're missing Data::Flow ? But to spare you the work, I've created packages for both C::Scan and Data::Flow. Just search for perl-C-Scan at http://software.opensuse.org/search and a one-click-install should install both packages. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Philipp Thomas wrote:
* Josef Wolf (jw@raven.inka.de) [20090114 18:30]:
To build a perl XS module with h2xs, I need the C::Scan module. Since I could not find this module with zypper, but h2xs suggests to install it via CPAN:
$ h2xs -O --skip-autoload -b 5.8.0 -x -n Module module.h C::Scan required if you use -x option. To install C::Scan, execute perl -MCPAN -e "install C::Scan" $
So I decided to follow this suggestion and did (as root):
# perl -MCPAN -e "install C::Scan" [ many lines of output deleted ] Installing /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm Installing /usr/share/man/man3/C::Scan.3pm Writing /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/auto/C/Scan/.packlist Appending installation info to /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/perllocal.pod HVDS/C-Scan-0.74.tar.gz /usr/bin/make install -- OK #
Could it be that you're missing Data::Flow ?
But to spare you the work, I've created packages for both C::Scan and Data::Flow. Just search for perl-C-Scan at http://software.opensuse.org/search and a one-click-install should install both packages.
Philipp
You could be setting yourself up for a bad precedent here. :-) There are an awful lot of CPAN modules. Many to compile successfully require source packages to be present. Which can make life complex. There is something called ovid on CPAN which purports to be a collection of scripts to generate RPMs from CPAN distribution modules which might take some of the grief out of this. I have not looked at this very closely. But this could be a more general solution. There does not seem to be currently a SuSE RPM for ovid, but it might get round an issue in that many of the SuSE Perl RPMS are little out of date. - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAklu/HgACgkQasN0sSnLmgJVWACg18+CFNjuumPR5oieK49KJnJl fLEAoO0+tDaKmNQqZmGzo+Ed2560ZHzB =/g07 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, On Wed, 14 Jan 2009, Josef Wolf wrote:
So I decided to follow this suggestion and did (as root):
# perl -MCPAN -e "install C::Scan" [ many lines of output deleted ] Installing /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm Installing /usr/share/man/man3/C::Scan.3pm Writing /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/auto/C/Scan/.packlist Appending installation info to /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/perllocal.pod HVDS/C-Scan-0.74.tar.gz /usr/bin/make install -- OK #
But h2xs still complains that it can not find this module. "perl -v" claims /usr/lib/perl5/site_perl/5.10.0 is contained in the @INC array. But /usr/lib/perl5/site_perl/5.10.0/C is _not_ (notice the "/C" at the end)
And it should not. When Perl searches for Modules, it replaces '::' in the modules name by the proper directory seperator (e.g. '/' on unix, '\' on Windows and ':' on MacOS. Then it iterates over @INC and some compiled in paths and tries to find a module under the concatenated path from @INC and the converted module name. i.e. "C::Scan" is searched for in
@INC: /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/C/Scan.pm /usr/lib/perl5/5.10.0/C/Scan.pm /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi/C/Scan.pm /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/C/Scan.pm /usr/lib/perl5/vendor_perl/5.10.0/C/Scan.pm /usr/lib/perl5/vendor_perl/C/Scan.pm so /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm would be found.
So here are my questions: [..] 2. What is the proper way to add a directory to the @INC array?
That depends. Use the environment-variable PERL5LIB or the 'use lib' directive. But, see above, that is not neccessary in your case. You only need to modify @INC when you're adding a whole module-tree, such as e.g. ~/lib/perl5/. Anyways, the reason for your problem is probably that your user does not have the rights to access the module file. Confirm by trying less /usr/lib/perl5/site_perl/5.10.0/C/Scan.pm as the user calling h2xs. If you cannot read the file, do a chmod -cR o+rX /usr/lib/perl5/site_perl/5.10.0/C and use OUMASK=`umask`; umask 022; perl -MCPAN ... ; umask $OUMASK or ( umask 022; perl -MCPAN ... ; ) in the future, if you want to install a module via CPAN. HTH, -dnh -- 276: SMP Fehlfunktion bei mehr als einer CPU. (nach Holger Veit) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
David Haller
-
G T Smith
-
Josef Wolf
-
Philipp Thomas