cryptonotefoundation / cryptonote

CryptoNote protocol implementation. This is the reference repository for starting a new CryptoNote currency. See /src/cryptonote_config.h
https://cryptonote.org/
990 stars 6.08k forks source link

make error 2 #336

Open hugocrazydog opened 3 years ago

hugocrazydog commented 3 years ago

In file included from /root/minecraftcoin/src/CryptoNoteCore/CryptoNoteSerializa tion.h:8, from /root/minecraftcoin/src/CryptoNoteProtocol/CryptoNoteProto colDefinitions.h:13, from /root/minecraftcoin/include/INode.h:14, from /root/minecraftcoin/src/PaymentGate/NodeFactory.h:7, from /root/minecraftcoin/src/PaymentGate/NodeFactory.cpp:5: /root/minecraftcoin/src/crypto/chacha8.h: In function 'void Crypto::generate_cha cha8_key(Crypto::cn_context&, const string&, Crypto::chacha8_key&)': /root/minecraftcoin/src/crypto/chacha8.h:48:40: error: 'void memcpy(void, cons t void*, size_t)' writing to an object of non-trivially copyable type 'struct Cr ypto::chacha8_key'; use copy-assignment or copy-initialization instead [-Werror= class-memaccess] 48 | memcpy(&key, &pwd_hash, sizeof(key)); | ^ /root/minecraftcoin/src/crypto/chacha8.h:23:10: note: 'struct Crypto::chacha8_ke y' declared here 23 | struct chacha8_key { | ^~~ cc1plus: all warnings being treated as errors make[3]: [src/CMakeFiles/PaymentGate.dir/build.make:63: src/CMakeFiles/Payme ntGate.dir/PaymentGate/NodeFactory.cpp.o] Error 1 make[3]: Leaving directory '/root/minecraftcoin/build/release' make[2]: [CMakeFiles/Makefile2:423: src/CMakeFiles/PaymentGate.dir/all] Erro r 2 make[2]: Leaving directory '/root/minecraftcoin/build/release' make[1]: [Makefile:95: all] Error 2 make[1]: Leaving directory '/root/minecraftcoin/build/release' make: [Makefile:20: build-release] Error 2

booth-f commented 3 years ago

Seconded.

I've tried looking at the few remaining Cryptonote implementations and they seem to have added so much more into the implementation that finding a replacement line just to fix the problem becomes a non-trivial change due to the lack of maintenance on this project :(

Really is a shame too because this was one of my favorite projects to quickly get up and running on your own blockchain to test/develop against.

k-ool commented 3 years ago

I have this same issue as well, I remember reading somewhere that there is an issue with modern computers. I think an older version of ubuntu is required, but im not too sure.

torresc4 commented 3 years ago

What is the preferred OS when this issue is discovered? I was able to resolve by building on Ubuntu 16.04 but it has reached EOL so I want to continue learning on a supported OS.

k-ool commented 3 years ago

What is the preferred OS when this issue is discovered? I was able to resolve by building on Ubuntu 16.04 but it has reached EOL so I want to continue learning on a supported OS.

I was able to use Ubuntu in a VM to build it and generate the genesis. I've published it here
https://github.com/71Zombie/scarlett

Although I wasnt able to setup the seed nodes even with the same version of ubuntu.

I've also forked monero

https://github.com/71Zombie/TroutBucks

Although I wasnt able to generate the genesis

3v5TCX commented 2 years ago

Only Ubuntu 14.

JoshuaPaulBarnard commented 10 months ago

How to Compile a CryptoNote Coin on Windows 10/11

There has been an active issue for over 5 years now when trying to build the source on modern compilers.

Here is how I was able to compile my CryptoNote Coin using Windows 10.
You can also check for any updates to this guide at my blog: https://joshuapaulbarnard.tech.blog/2023/10/04/how-to-compile-a-cryptonote-coin-on-windows-10-11/

I made this guide on Windows 10 in October, 2023.

If you need help compiling on Linux, then you can check my Ubuntu 14/16 guide.

WINDOWS DEPENDENCIES FOR CRYPTONOTE

We are going to build for 64-bit Windows.

Download the Build Tools for Visual Studio 2019 Installer When it opens up select C++ build tools, it automatically selects the needed parts. Make sure MSVC v141 Build Tools is selected. Install Boost v1.71.0. Select the appropriate version for your system. Boost 64-bit

COMPILING CRYPTONOTE ON WINDOWS WITH VS2019

From the start menu, open Developer Command Prompt for VS 2019. cd mkdir build cd build cmake -G "Visual Studio 16 2019" -A x64 .. -DBOOST_ROOT=B:/local/boost_1_71_0 MSBuild CryptoNote.sln /p:Configuration=Release /p:PlatformToolset=v141 /m