Open nsec1 opened 2 months ago
In file included from /Users/woodser/git/monero-java/external/monero-cpp/external/monero-project/src/cryptonote_basic/connection_context.cpp:33: /Users/woodser/git/monero-java/external/monero-cpp/external/monero-project/src/p2p/p2p_protocol_defs.h:195:7: error: static assertion failed due to requirement 'std::is_pod<boost::uuids::uuid>::value': t_type must be a POD type. KV_SERIALIZE_VAL_POD_AS_BLOB(network_id)
I was able to reproduce this error on debian-test using clang. Then I downgraded boost to 1.84 and the build has succeeded.
Bounty bumped to 4 XMR.
@woodser , could you send me this command output: export | grep CMAKE
?
It doesn't return any output.
Hey, happy to see more changes coming in. Please just let me know when it's ready for retesting.
I finally figured out what was happening with sodium include path. Monero-project considers that include path for sodium is the same for boost and openssl. Now with this PR, it is not true. I have to modify monero-project in my fork.
I have problems with macos emulation, cmake is stucking on darling for example. I emulated the problem installing monero dependencies using homebrew on linux.
I have kept Trezor support off because it failed to load Monero native libraries: java.lang.UnsatisfiedLinkError: /tmp/libmonero15436476446366776625/libmonero-java.so: undefined symbol: _ZTIN6google8protobuf7MessageE
.
Monero-cpp and monero-project are pointing to my branches in forked repos, to test more easily. We need change this before go upstream.
Dont run bin/update_submodules.sh
because branches will back to master. Use git submodule update --init --force --recursive
.
If your test were succeed on macos, I will send a PR to monero-project. For now, we could apply a patch of monero-project modifications in monero-cpp until PR merged and released.
I had to put libsodium as module in monero-java and build with -fPIC.
Could delete monero-cpp external/libsodium?
Using boost-1.84 (1.86 incompatible with monero).
I have tested haveno with native lib on linux. Hope this work on macos.
I'm hitting this error with your PR, which is probably related to your monero-project branch not having the latest fix for macOS:
/Users/woodser/git/monero-java/external/monero-cpp/external/monero-project/src/p2p/p2p_protocol_defs.h:195:7: error: static assertion failed due to requirement 'std::is_pod<boost::uuids::uuid>::value': t_type must be a POD type.
KV_SERIALIZE_VAL_POD_AS_BLOB(network_id)
monero-cpp/external/libsodium is being used in the monero-ts project.
Perhaps it's better to move your libsodium solution to monero-cpp/external so it can be used by monero-ts as well?
Applying that fix from monero-project myself, I then get this error with your PRs:
/Users/woodser/git/monero-java/external/monero-cpp/external/monero-project/contrib/epee/include/span.h:165:5: error: static assertion failed due to requirement 'std::is_trivially_copyable<epee::mlocked<tools::scrubbed<crypto::ec_scalar>>>()': type must be trivially copyable
These errors are about boost-1.85+. I just downgraded boost to 1.84 in this solution because this. Could you send me out log?
I would confirm it with output log but for now, could you try to remove boost from homebrew and do a clean build again?
I was able to finally successfully build libmonero-cpp.a and libmonero-java.dylib. :)
By uninstallingn boost through brew and by making these changes to CMakeLists.txt to include hidapi: patch.txt
However, basic tests to execute the libraries through JNI are hitting an error.
To recreate the error, simply run the tests within TestMoneroUtils.java. They can easily be invoked by importing the project into Visual Studio Code (or Eclipse if you prefer):
I was able to finally successfully build libmonero-cpp.a and libmonero-java.dylib. :)
Cool!!
By uninstallingn boost through brew and by making these changes to CMakeLists.txt to include hidapi: patch.txt
Hidapi is needed only for Trezor support but it is off on monero build. I didnt understand why it is needed on mac. If we had to include hidapi on monero-java build (your patch), maybe it should become a module build with fPIC because it is dynamically linked.
However, basic tests to execute the libraries through JNI are hitting an error.
I will fix this.
@woodser , any problem keep on without hardware wallet support? Because this has new dependencies that we will have to build with static and fPIC.
Ideally we can keep existing hardware wallet dependencies, unless they are not already included? In which case, no need to add them as part of this PR.
Ref. #74 haveno-dex/haveno#795
Now, there is only monero-java.so. It wraps monero, monero-cpp, boost etc. Working with haveno on linux (--useNativeXmrWallet=true). Depends woodser/monero-cpp#64