| Summary: | dev-libs/crypto++-8.2.0 - donna_64.cpp:1388:67: error: invalid types ‘CryptoPP::Donna::Arch64::ge25519_pniels [8][__gnu_cxx::__enable_if<true, double>::__type {aka double}]’ for array subscript | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | david |
| Component: | Current packages | Assignee: | Sam James <sam> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | normal | CC: | maintainer-needed, noloader |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | ebuild environment and info | ||
|
Description
david
2019-10-09 04:59:01 UTC
>>>>>>>>>> SNIP <<<<<<<<<<
donna_64.cpp: In function ‘void CryptoPP::Donna::Ed25519::{anonymous}::ge25519_double_scalarmult_vartime(CryptoPP::Donna::Arch64::ge25519*, const CryptoPP::Donna::Arch64::ge25519*, const bignum256modm_element_t*, const bignum256modm_element_t*)’:
donna_64.cpp:1388:67: error: invalid types ‘CryptoPP::Donna::Arch64::ge25519_pniels [8][__gnu_cxx::__enable_if<true, double>::__type {aka double}]’ for array subscript
ge25519_pnielsadd_p1p1(&t, r, &pre1[abs(slide1[i]) / 2], (byte)slide1[i] >> 7);
Thanks David.
I'm having trouble duplicating the issue with Master and a CRYPTOPP_8_2_0 checkout:
CXXFLAGS="-march=broadwell -O2" make -j 8
I'm on a different platform, though. I don't have a Gentoo test machine at the moment. I'm using Ubuntu with GCC 7.4.0 and Fedora with GCC 9.2.1.
I'm not sure about this message:
donna_64.cpp:1388:67: error: invalid types
Donna::Arch64::ge25519_pniels [8][__gnu_cxx::__enable_if<true, double>::__type {aka double}]’ for array subscript
I believe it is coming from:
#define S1_SWINDOWSIZE 5
#define S1_TABLE_SIZE (1<<(S1_SWINDOWSIZE-2))
(S1_TABLE_SIZE takes the value of 8).
And then in ge25519_double_scalarmult_vartime:
ge25519_pniels pre1[S1_TABLE_SIZE];
Going back a little further in donna_64.h:
typedef word64 bignum25519[5];
struct ge25519_pniels {
bignum25519 ysubx, xaddy, z, t2d;
};
I don't see anything out of the ordinary, except word64 is typedef'd as 'unsigned long' under LP64 data models (instead of a double). Do you know why the compiler is trying to use a double there?
What compiler is x86_64-pc-linux-gnu-g++? What do you know about it?
i don't really know whats up with that compiler. i tried to track down whats up with it and here's what i was able to find. /usr/x86_64-pc-linux-gnu/gcc-bin/9.3.0/x86_64-pc-linux-gnu-g++ --version x86_64-pc-linux-gnu-g++ (Gentoo 9.3.0-r1 p3) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. my impression is that it's gnu g++ 9.3.0? (In reply to david from comment #2) > i don't really know whats up with that compiler. i tried to track down whats > up with it and here's what i was able to find. > > /usr/x86_64-pc-linux-gnu/gcc-bin/9.3.0/x86_64-pc-linux-gnu-g++ --version > x86_64-pc-linux-gnu-g++ (Gentoo 9.3.0-r1 p3) 9.3.0 > Copyright (C) 2019 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > my impression is that it's gnu g++ 9.3.0? yeah, it's just an extended name for that. Can you try with crypto++-8.3.0? |