-
Notifications
You must be signed in to change notification settings - Fork 29
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
Compilation issue on Fedora 28 #5
Comments
What is compiler version/libc version? Seems like some strange compiler issue. Would you be able to investigate more on this topic? |
Here is requested info:
Yes, would be willing to investigate more. Please advise how I could help. The As a workround Linux/GCC could be added to the if statement in CMakeLists.txt:
|
Well, any kind of help is more than welcomed :) You could try to figure out the real reason behind this compiler error, what in the source code of safexcore/src/crypto/chacha.h itself is triggering this compiler warning (and hence error). That would be the better way to solve it. Worse way would be to disable warning as error for this particular warning -Wno-error=class-memaccess, but also to isolate this workaround as much as possible, i.e. only for GCC version >8, Linux OS and only in safexcore/src/crypto/CMakeLists.txt. CMake gives much flexibility and power for this kind of configurations. We do not want to globally disable warnings as errors as they remind us and force us to pay more attention to code quality. If you have some good proposal for solution feel free to make fork and pull request ;) |
@denifednu can you try to build with latest code? We merged some changes that fix the build issues with gcc 8.1 |
@hitripekac built with latest code, issue is resolved, thank you! Safex 'Safex Blockchain Launch v0.1' (v0.1-master-b541aae) |
On Fedora 28, fails to compile many files due to error:
use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
One example:
safexcore/src/crypto/chacha.h:77:46: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘using chacha_key = tools::scrubbed_arr<unsigned char, 32>’ {aka ‘struct tools::scrubbed<std::array<unsigned char, 32> >’}; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
As a kludgy workaround I commented out the following line in:
src/CMakeLists.txt
andcontrib/CMakeLists.txt
:add_compile_options("${WARNINGS_AS_ERRORS_FLAG}")
Then it built successfully.
The text was updated successfully, but these errors were encountered: