Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on mips with gcc 5.3 and botan 2.18.2 #2845

Closed
ffontaine opened this issue Nov 9, 2021 · 5 comments
Closed

Build failure on mips with gcc 5.3 and botan 2.18.2 #2845

ffontaine opened this issue Nov 9, 2021 · 5 comments

Comments

@ffontaine
Copy link
Contributor

We have the following build failure on one mips toolchain since version 2.18.2 and 219329f:

src/lib/hash/sha3/sha3.cpp: In function 'std::tuple<long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int> Botan::{anonymous}::xor_CNs(const uint64_t*)':
src/lib/hash/sha3/sha3.cpp:41:42: error: converting to 'std::tuple<long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int>' from initializer list would use explicit constructor 'constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int}; <template-parameter-2-2> = void; _Elements = {long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int}]'
       A[4] ^ A[9] ^ A[14] ^ A[19] ^ A[24]};
                                          ^

Build is fixed if I revert 219329f. Do you have some advise? Should we add a dependency on gcc 6 or above?

Full build log: http://autobuild.buildroot.org/results/1aa/1aafc2bfdb82c6424327062e17f5745c15417526/build-end.log

@randombit
Copy link
Owner

Sorry about that. I did not intend to increase the minimum compiler version. I thought we had a GCC 4.4 CI build to ensure this did not happen, but possibly that was lost when we converted from Travis to GitHub Actions for CI.

As long as you are building only with GCC, reverting 219329f is just fine. I'll work on something to fix this for the next release.

@ffontaine
Copy link
Contributor Author

ffontaine commented Nov 9, 2021

Thanks for your feedback, I'll revert this commit on buildroot. It should be noted that 'm not 100% sure that this is only linked to the gcc version. This could also be linked to this specific and very old toolchain.

@reneme
Copy link
Collaborator

reneme commented Nov 16, 2021

GCC 4.4 seems to choke on the implicit call to the std::tuple<> constructor. By specifically adding it to the return statement, it seems to be happy: https://godbolt.org/z/5YnvvKTfT (see line 28).

@reneme
Copy link
Collaborator

reneme commented Nov 16, 2021

See here for a patch.

@ffontaine
Copy link
Contributor Author

I confirm that #2849 fix the build failure on mips with gcc 5.3

@reneme reneme closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants