Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Installing Crypt::Curve25519 failed

by thanos1983 (Parson)
on May 06, 2019 at 09:55 UTC ( #1233387=perlquestion: print w/replies, xml ) Need Help??

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

Hello fellow Monks,

I was trying to install Crypt::Curve25519 on my LinuxOS box via cpanm and I get the following error:

$ sudo cpanm Crypt::Curve25519 --> Working on Crypt::Curve25519 Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.0 +6.tar.gz ... OK Configuring Crypt-Curve25519-0.06 ... OK Building and testing Crypt-Curve25519-0.06 ... FAIL ! Installing Crypt::Curve25519 failed. See /home/tinyos/.cpanm/work/15 +57136045.12229/build.log for details. Retry with --force to force ins +tall it.

If I open the log file:

$ cat /home/tinyos/.cpanm/work/1557136045.12229/build.log cpanm (App::cpanminus) 1.7044 on perl 5.026002 built for x86_64-linux- +gnu-thread-multi Work directory is /home/tinyos/.cpanm/work/1557136045.12229 You have make /usr/bin/make You have LWP 6.35 You have /bin/tar: tar (GNU tar) 1.30 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/g +pl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching Crypt::Curve25519 () on cpanmetadb ... --> Working on Crypt::Curve25519 Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.0 +6.tar.gz -> OK Unpacking Crypt-Curve25519-0.06.tar.gz Entering Crypt-Curve25519-0.06 Checking configure dependencies from META.json Configuring Crypt-Curve25519-0.06 Running Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Crypt::Curve25519 Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have File::Spec 0 ... Yes (3.75) Checking if you have Test::More 0 ... Yes (1.302164) Checking if you have IPC::Open3 0 ... Yes (1.20) Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34) Checking if you have IO::Handle 0 ... Yes (1.36) Building and testing Crypt-Curve25519-0.06 cp lib/Crypt/Curve25519.pm blib/lib/Crypt/Curve25519.pm Running Mkbootstrap for Curve25519 () chmod 644 "Curve25519.bs" "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curve25519 +.bs blib/arch/auto/Crypt/Curve25519/Curve25519.bs 644 "/usr/bin/perl" "/usr/share/perl/5.26/ExtUtils/xsubpp" -typemap '/usr +/share/perl/5.26/ExtUtils/typemap' -typemap '/home/tinyos/.cpanm/work +/1557136045.12229/Crypt-Curve25519-0.06/typemap' Curve25519.xs > Cur +ve25519.xsc mv Curve25519.xsc Curve25519.c x86_64-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.06\" -DXS_VERSION=\"0.06 +\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE" -DUSE_X64=1 Cu +rve25519.c In file included from Curve25519.xs:7: curve25519-donna-c64.c:99:1: error: conflicting types for ‘fmul’ fmul(felem output, const felem in2, const felem in) { ^~~~ In file included from /usr/lib/x86_64-linux-gnu/perl/5.26/CORE/perl.h: +2118, from Curve25519.xs:3: /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h:30:20: note: pre +vious declaration of ‘fmul’ was here __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul) +, 2); ^~~~~~~~~~~~~~~ make: *** [Makefile:335: Curve25519.o] Error 1 -> FAIL Installing Crypt::Curve25519 failed. See /home/tinyos/.cpanm/w +ork/1557136045.12229/build.log for details. Retry with --force to for +ce install it.

I have even tried to force it to install it still fails. I also found this bug report since 2017 (open last update Friday) dev-perl / Crypt-Curve25519

I updated all the dependencies to the latest version but it stills fails.

Anyone knows if this will be fixed any time soon or any workaround on this?

Thanks again for your time and effort reading and replying to my question.

Update: It seems that this bug has been reported on GitHub as well ajgb/crypt-curve25519. As proposed workaround is to downgrade to the previous version 0.05.

BR / Thanos

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re: Installing Crypt::Curve25519 failed
by syphilis (Bishop) on May 06, 2019 at 11:24 UTC
    Hi,

    In curve25519-donna-c64.c and curve25519-donna.c (both of which are in the top level directory of the Crypt::Curve25519 source) replace every occurrence of "fmul" with a symbol (eg "donna_fmul") that's not going to clash.
    IIUC the module will then build cleanly on linux.

    Cheers,
    Rob

      Hello syphilis,

      Works perfectly. Thank you for the tip. :)

      BR / Thanos

      Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2020-06-04 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (30 votes). Check out past polls.

    Notices?