2

Currently I have a limited server with small memory and capacity. I need to compile Monero on a local Linux system then copy the binary to the server. However I don't see the dependencies.

When I tried to static compile using make static-lib, make SHARED=0 cc='gcc-staic' or using cmake set (cmake-find-library-suffixes ".a") and set (build-shared-libs off) set (cmake-exe-linker-flags "-static"), I keep suffering from a libboost update mismatch and many other libraries libcrypto libssl libhidapi-libusb.

I need to find out the dependencies of the binary to copy them at once? How can I do this?

Also, I need to correctly static link the binary?

1 Answer 1

2

The correct build command to build Monero statically is make release-static. Before doing this, you will have needed to have installed all the dependencies on the system you are building on (you local Linux machine) and these dependencies will need to have static versions of the libraries. Dependencies required and build instructions are detailed in the projects README. Per the documentation, on Ubuntu the dependencies can be installed like:

sudo apt update && sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev doxygen graphviz libpgm-dev

It's worth noting that once you succeed in building a static release, none of these libraries will need to be present on your server. Static builds are the same as the actual release binaries available from https://web.getmonero.org/downloads/#linux, so you could of course not even bother building from source and just use those.

Lastly, if your server is the exact same version of Linux as your local machine, you could perform a dynamic build locally and copy the compiled binaries to your server. Then you would just install the same library dependencies detailed above on the server.

1
  • thank you for the reply. Yes i know i can download the binary :) but i want to learn a little bit more linux with you guys. I want to try building the binary because I have fun in this Commented Jun 5, 2019 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.