Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Failure Implimenting GnuPG

by dReKurCe (Scribe)
on Jun 06, 2005 at 15:26 UTC ( [id://463937]=perlquestion: print w/replies, xml ) Need Help??

dReKurCe has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks:

I am attempting to install the GnuPG set of modules on my system however perl -MCPAN -eshell returns the following error:
Bareword "POSIX::_SC_OPEN_MAX" not allowed while "strict subs" in use +at blib/lib/GnuPG.pm line 267. BEGIN failed--compilation aborted at test.pl line 18. Running make install make test had returned bad status, won't install without force


I am wondering how to go about installing with force. Any tips would be appreciated.

UPDATE:
when using the following code:
#! /usr/bin/perl use GnuPG qw(:algo); my $gpg=new GnuPG(); $gpg->gen_key(name=>"dReKurCe"; comment=>"Test Key"; passphrase=>$secret; );
the same error was produced after install:
Bareword "POSIX::_SC_OPEN_MAX" not allowed while "strict subs" in use +at /usr/l line 267. Compilation failed in require at keygen line 3. BEGIN failed--compilation aborted at keygen line 3.

Any guidence would be appreciated.

Replies are listed 'Best First'.
Re: MCPAN returns failure :
by Corion (Patriarch) on Jun 06, 2005 at 17:05 UTC

    This module seems to be broken since 0.09, which was released in 2001. Please do read the CPAN bug reports.

      In replying to this node, I have learned to be very careful. So, here, I wish to pose a question instead of offer an answer.

      The module seems to have not worked since the year 2001 and version 0.08, according to the link above. However, I will go out on a limb here: I think that back in 2001 the program did compile and work; that is, I think something has changed in Perl's use strict: either a bug got fixed or introduced. (Does anyone have Perl 5.6.0 to check whether GnuPG works there?) Compare:

      $ perl -MPOSIX -e'use strict; print POSIX::OREAD;' $ perl -MPOSIX -e'use strict; print abs(POSIX::OREAD);' Bareword "POSIX::OREAD" not allowed while "strict subs" in use at -e l +ine 1. Execution of -e aborted due to compilation errors. $ perl -MPOSIX -e'use strict; print POSIX::OREAD();' OREAD is not a valid POSIX macro at -e line 1
      What's the difference? What should the behavior be?

      Update: For more code that seems to imply that use strict; has changed, see use strict;. At least for me, personally, it does not pass strict:

      Bareword "Use" not allowed while "strict subs" in use at - line 14. Bareword "strict" not allowed while "strict subs" in use at - line 15. Bareword "Be" not allowed while "strict subs" in use at - line 16. Bareword "Love" not allowed while "strict subs" in use at - line 21. Bareword "Forever" not allowed while "strict subs" in use at - line 23 +.

Re: Failure Implimenting GnuPG
by kaif (Friar) on Jun 06, 2005 at 17:14 UTC

    Change POSIX::_SC_OPEN_MAX to POSIX::_SC_OPEN_MAX() in GnuPG.pm on line 267. Submitting a bug report probably won't do, as Corion mentions, since it hasn't been updated since 2001.

    If there are any more problems with the module, consider using something else. Does anyone have any suggestions?

    Update: Fixed it so that it actually works, rather than just compiles. Sorry about all the trouble; my apologies for misinformation.

      Is the maintainer maintaining it? If not, maybe someone else can pick it up?

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re: MCPAN returns failure :
by kaif (Friar) on Jun 06, 2005 at 15:29 UTC

    It should just be force install MODULE_NAME. Does that work?

    Update: It has been brought to attention that although force install does force an install, the problem is not simply with test.pl. See http://testers.cpan.org/show/GnuPG.html#GnuPG-0.09 for more details --- thank you, Corion.

      Hi,

      I would bring this to the attention of the maintainer of the module. If confirmed, it should be treated as a bug by the maintainer. Atleast that's what I would do.

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

        I agree that this should be brought to the attention to the maintainer. However, the error occurs simply in test.pl; thus, force-installing the module should still work. In the short term, one probably wishes to have a working module first, and then wait for the test cases upgrade. Thanks for your comment.

      Yes that produced a succesfull install.
      Thanks kaif
Re: Failure Implimenting GnuPG
by dReKurCe (Scribe) on Jun 06, 2005 at 17:42 UTC
    Thanks for you help everyone:
    I have removed use strict from the module and replaced the semi colons (thanks kaif) with commas in the above code. This seems to have worked.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://463937]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-16 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found