Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 669436

Summary: dev-perl/Crypt-Curve25519-0.60.0 : curve25519-donna-c64.c:99:1: error: conflicting types for fmul
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal CC: chainsaw, mike, nbowler, noldor
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-perl:Crypt-Curve25519-0.60.0:20181023-080803.log
emerge-history.txt
environment
etc.portage.tbz2
temp.tbz2
build.log
emergeinfo.txt
Rename all instances of fmul to fixedvar in src_compile

Description Toralf Förster gentoo-dev 2018-10-23 19:04:57 UTC
x86_64-pc-linux-gnu-gcc -c   -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -march=native   -DVERSION=\"0.06\" -DXS_VERSION=\"0.06\" -fPIC "-I/usr/lib64/perl5/5.26.2/x86_64-linux/CORE"  -DUSE_X64=1 Curve25519.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/lib64/perl5/5.26.2/x86_64-linux/CORE/perl.h:2120,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_libressl-abi32+64_20181018-210907

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.6
  [3]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
java-config:
The following VMs are available for generation-2:


emerge -qpvO dev-perl/Crypt-Curve25519
Comment 1 Toralf Förster gentoo-dev 2018-10-23 19:05:00 UTC
Created attachment 552532 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-10-23 19:05:03 UTC
Created attachment 552534 [details]
dev-perl:Crypt-Curve25519-0.60.0:20181023-080803.log
Comment 3 Toralf Förster gentoo-dev 2018-10-23 19:05:06 UTC
Created attachment 552536 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-10-23 19:05:09 UTC
Created attachment 552538 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-10-23 19:05:12 UTC
Created attachment 552540 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-10-23 19:05:14 UTC
Created attachment 552542 [details]
temp.tbz2
Comment 7 noldor 2019-02-27 10:52:41 UTC
Same problem here:

x86_64-pc-linux-gnu-gcc -c   -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=ivybridge -mno-avx -mno-aes -mno-rdrnd -O2 -pipe   -DVERSION=\"0.06\" -DXS_VERSION=\"0.06\" -fPIC "-I/usr/lib64/perl5/5.28.0/x86_64-linux/CORE"  -DUSE_X64=1 Curve25519.c
In file included from Curve25519.xs:7:0:
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/lib64/perl5/5.28.0/x86_64-linux/CORE/perl.h:2028:0,
                 from Curve25519.xs:3:
/usr/include/bits/mathcalls-narrow.h:30:20: note: previous declaration of 'fmul' was here
 __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2);

gcc-config -l
 [1] x86_64-pc-linux-gnu-6.4.0
 [2] x86_64-pc-linux-gnu-7.3.0 *
 [3] x86_64-pc-linux-gnu-8.2.0
Comment 8 noldor 2019-02-27 10:56:23 UTC
Created attachment 566650 [details]
build.log
Comment 9 noldor 2019-02-27 11:20:55 UTC
Created attachment 566652 [details]
emergeinfo.txt
Comment 10 Mike Benson 2019-02-28 01:24:52 UTC
Created attachment 566872 [details]
Rename all instances of fmul to fixedvar in src_compile

See here: https://github.com/ajgb/crypt-curve25519/issues/9#issuecomment-447845725

Before compile: grep -rl "fmul" ./ | xargs sed -i 's/fmul/fixedvar/g'

This removes the clash with /usr/include/bits/mathcalls-narrow.h
Comment 11 Sandu Adrian 2019-05-27 08:50:06 UTC
Same happened to me...
gcc-8.3.0
llvm-7.1.0
clang-7.1.0
This happened when perl wanted to update and it requires a lot of packages ( including this one ) to recompile...

Tested the latest comment patch by forking the ebuild into local.
Added
src_prepare() { rep -rl "fmul" ./ | xargs sed -i 's/fmul/fixedvar/g' ; eapply_user ; }

Seems to compile for me now.
Comment 12 Larry the Git Cow gentoo-dev 2019-06-13 10:28:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e07299f804a8376bb5bf85d28916e0a360199f3e

commit e07299f804a8376bb5bf85d28916e0a360199f3e
Author:     Tony Vroon <chainsaw@gentoo.org>
AuthorDate: 2019-06-13 10:27:40 +0000
Commit:     Tony Vroon <chainsaw@gentoo.org>
CommitDate: 2019-06-13 10:27:40 +0000

    dev-perl/Crypt-Curve25519: Fix fmul conflicting types build breakage.
    
    With thanks to Mike Benson for trawling the upstream bug reports:
    https://github.com/ajgb/crypt-curve25519/issues/9#issuecomment-447845725
    
    No revision bump as the package does not install without the fix.
    This uses a patch rather than a sed statement, as the latter could fail
    silently.
    
    Closes: https://bugs.gentoo.org/669436
    Suggested-By: Mike Benson <mike@kambe.com.au>
    Signed-Off-By: Tony Vroon <chainsaw@gentoo.org>
    Package-Manager: Portage-2.3.66, Repoman-2.3.11

 .../Crypt-Curve25519-0.60.0.ebuild                 |   4 +-
 .../Crypt-Curve25519-0.60.0-fmul-fixedvar.patch    | 174 +++++++++++++++++++++
 2 files changed, 177 insertions(+), 1 deletion(-)