in reply to Re^4: Undefined subroutine on ARM but not i686
in thread Undefined subroutine on ARM but not i686

Works fine for me, even without the @EXPORT_OK change. You'll need to find out why the loop that starts with for $alg (1, 224, 256, 384, 512) doesn't get executed for you.

Start by making sure you are loading the module you think you are loading. You can do so using

use Cwd qw( realpath ); print(realpath($INC{'Digest/SHA/PurePerl.pm'}), "\n");

If you are indeed executing the module you think you are executing, you've probably got a very serious problem with your Perl build.

Replies are listed 'Best First'.
Re^6: Undefined subroutine on ARM but not i686
by cbanker (Beadle) on Jun 02, 2009 at 21:27 UTC
    I decided to unroll that loop to some extent and manually create one of the functions, sha256, as follows:
    sub sha256 { my $state = _shaopen('256') or return; for (@_) { _shawrite($_, length($_) << 3, $state) } _shafinish($state); _sha($state); } push(@EXPORT_OK, 'sha256');

    For whatever reason, this works fine, but the generation of the function and export does not.

    I'll report back if I figure out exactly why this is happening, but for now I am content with having it work with the functions I need hard-coded in.
Re^6: Undefined subroutine on ARM but not i686
by cbanker (Beadle) on Jun 02, 2009 at 19:47 UTC
    It is loading the correct perl module, as that command shows the location I expected.

    Perhaps it is an issue with my perl build. I don't have a whole lot of options as far as building perl. I am using a target that cannot fit a toolchain on it, so everything needs to be cross-compiled using buildroot. I tried everything I could to build a full version of perl for it, but without any success.