System installed Perl is version 5.10.1, which I know is old; these are the joys of RHEL-based distributions! I get the same results whether I use cpan, or download the module and make it:
/usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap Sodium.xs > Sodium.xsc && mv Sodium.xsc Sodium.c
Error: Cannot parse function definition from 'crypto_generichash_state * T_PTRREF' in Sodium.xs, line 715
Error: 'crypto_generichash_state *' not in typemap in Sodium.xs, line 735
Error: 'crypto_generichash_state *' not in typemap in Sodium.xs, line 739
Error: 'crypto_generichash_state *' not in typemap in Sodium.xs, line 748
make: *** [Sodium.c] Error 1
The section around line 715 looks like this:
TYPEMAP: <<EOT
crypto_generichash_state * T_PTRREF
EOT
I assume the "not in typemap" errors are a result of the initial one, but I'm completely inexperienced with how Perl modules are built; I'm not even sure what this XS stuff is. Any suggestions for how to continue?
The version of
ExtUtils::ParseXSthat comes stock with Centos 6 does not support embeddedtypemap. Installing the latestExtUtils::ParseXSandlibsodiumshould fix the issue.From https://perldoc.perl.org/perlxstypemap.html#Anatomy-of-a-typemap: