openmonero
openmonero copied to clipboard
No rule to make target
Hello, can you help me please
What do I build? Openmonero (devel branch 6688a00c) Monero version: v0.17.0.1 (1a9a984d)
What machine do I build on? Ubuntu 20.04.1 LTS (docker image) MacOs 10.15.7 (I am getting the exact same error on both)
What error message do I get [ 43%] Building CXX object src/CMakeFiles/myxmr.dir/RandomOutputs.cpp.o [ 46%] Linking CXX static library libmyxmr.a [ 62%] Built target myxmr Scanning dependencies of target openmonero [ 65%] Building CXX object CMakeFiles/openmonero.dir/main.cpp.o make[2]: *** No rule to make target 'distribution/library/librestbed.a', needed by 'openmonero'. Stop. make[1]: *** [CMakeFiles/Makefile2:161: CMakeFiles/openmonero.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
Question What can it be, how can I resolve the problem?
Thank you!
Did clone recursively?
git clone --recursive https://github.com/moneroexamples/openmonero.git
I just checked on Ubuntu 20.04.1 LTS and haven't encountered compilation issues.
Thanks for such a fast reply
Yes, I did clone recursively
Before this I have encountered this error
[ 34%] Building CXX object src/CMakeFiles/myxmr.dir/OpenMoneroRequests.cpp.o
In file included from /root/openmonero/src/../ext/restbed/source/restbed:5,
from /root/openmonero/src/OpenMoneroRequests.h:14,
from /root/openmonero/src/OpenMoneroRequests.cpp:8:
/root/openmonero/src/../ext/restbed/source/corvusoft/restbed/uri.hpp:15:10: fatal error: corvusoft/restbed/byte.hpp: No such file or directory
15 | #include <corvusoft/restbed/byte.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/myxmr.dir/build.make:128: src/CMakeFiles/myxmr.dir/OpenMoneroRequests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:269: src/CMakeFiles/myxmr.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Which I resolved by creating a symlink
ln -s /root/openmonero/ext/restbed/source/corvusoft /usr/include
This is more detailed error message
No implicit rule found for '/usr/lib/x86_64-linux-gnu/libhidapi-libusb.so'.
Finished prerequisites of target file '/usr/lib/x86_64-linux-gnu/libhidapi-libusb.so'.
No need to remake target '/usr/lib/x86_64-linux-gnu/libhidapi-libusb.so'.
Considering target file 'distribution/library/librestbed.a'.
File 'distribution/library/librestbed.a' does not exist.
Looking for an implicit rule for 'distribution/library/librestbed.a'.
Trying pattern rule with stem 'librestbed.a'.
Trying implicit prerequisite 'distribution/library/librestbed.a,v'.
Trying pattern rule with stem 'librestbed.a'.
Trying implicit prerequisite 'distribution/library/RCS/librestbed.a,v'.
Trying pattern rule with stem 'librestbed.a'.
Trying implicit prerequisite 'distribution/library/RCS/librestbed.a'.
Trying pattern rule with stem 'librestbed.a'.
Trying implicit prerequisite 'distribution/library/s.librestbed.a'.
Trying pattern rule with stem 'librestbed.a'.
Trying implicit prerequisite 'distribution/library/SCCS/s.librestbed.a'.
No implicit rule found for 'distribution/library/librestbed.a'.
Finished prerequisites of target file 'distribution/library/librestbed.a'.
Must remake target 'distribution/library/librestbed.a'.
make[2]: *** No rule to make target 'distribution/library/librestbed.a', needed by 'openmonero'. Stop.
Reaping losing child 0x55c42353a560 PID 625
make[1]: *** [CMakeFiles/Makefile2:161: CMakeFiles/openmonero.dir/all] Error 2
Removing child 0x55c42353a560 PID 625 from chain.
Reaping losing child 0x55a8fda61620 PID 609
make: *** [Makefile:84: all] Error 2
Removing child 0x55a8fda61620 PID 609 from chain.
Also I noticed, that openmonero/build/distribution folder is empty
I get the same result on a fresh remote server (Ubuntu 20.04.1 LTS)
What do I do?
#BUILD MONERO
sudo apt update
sudo apt install git build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libcurl4-openssl-dev libgtest-dev libreadline-dev libzmq3-dev libsodium-dev libhidapi-dev libhidapi-libusb0
cd ~
git clone --recursive -b release-v0.17 https://github.com/monero-project/monero.git
cd monero/
USE_SINGLE_BUILDDIR=1 make
#THEN I BUILD OPENMONERO
sudo apt install libmysql++-dev
cd ~
git clone --recursive https://github.com/moneroexamples/openmonero.git
cd openmonero
mkdir build && cd build
cmake ..
make #here I get error message
If you send me your ssh public key I can give you the access to the server
thanks
Hey @just4hacking I found a way around this error thanks to this snippet!
Also I noticed, that openmonero/build/distribution folder is empty
Here's what I did:
cd ~/openmonero/ext/restbed
# following this: https://github.com/Corvusoft/restbed#building-with-external-libraries
mkdir build && cd build
cmake ..
make install
cd ../distribution
# now copy the contents of this directory into ~/openmonero/build/distribution
And that did it for me! Should be able to make and run openmonero successfully after this.
Thank you! I will try this out!
@just4hacking @j-berman
Thanks. Sadly at present I can't find time to work actively on openmonero. Thus if you have any patches or fixes, PRs are welcomed.
Thanks @j-berman I'm unable to get restbed built. Due to a dependency on ASIO, which also has to be built. It's found here https://sourceforge.net/projects/asio/files/asio/1.18.1%20(Stable)/ Haven't figured out how to build it yet.
CMake Error at cmake/Findasio.cmake:9 (message): Failed to locate ASIO dependency. Call Stack (most recent call first): CMakeLists.txt:55 (find_package)
@just4hacking @t-900-a
Does that command I added in #174 work for you guys? Can ignore my previous comment and just try and compile openmonero normally after adding that command in
Edit: also, thank you very much for this library @moneroexamples Super clear and easy to follow what's happening in the code. It's much appreciated :)