Cpuminer compilation

The problem is as follows:

  • compiling on ubuntu 14.4
  • migrating the binary to four debian machines
  • on one it starts normally on the remaining it gives the following error:

Error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Or libcrypto.so. with a different number

Tell me, is it possible to compile a binary so that it contains all the necessary data? libraries and dependencies?

I compile as follows:

sudo apt-get install -y git automake  pkg-config build-essential libcurl4-openssl-dev
git clone https://github.com/wolf9466/cpuminer-multi
cd cpuminer-multi
./autogen.sh
./configure CFLAGS= --with-crypto --with-curl
make

I also tried to compile on debian, but the situation has not changed.

Author: diralik, 2017-06-24

4 answers

Can. To do this, you need to collect static data. To do this, first run ./configure --help and see if it is already being offered to us. CFLAGS=" -static" before the configuration or make-up can also help. Well, to put the desired version of all the libraries, is also an option.

 1
Author: bukkojot, 2017-06-26 04:41:09

Problem

To do this, you will first have to statically build everything-all the libraries that your binary depends on, as well as the libraries that the libraries that the binary depends on depend on, and so on, until they are exhausted. enter a description of the image here

There is a solution

This is exactly what container virtualization is designed for! Build a Docker image from your binary (this is not difficult at all), distribute it to your servers, and deploy it. The image will include all the necessary versions of all the libraries.

Sample image creation process

  1. You choose the base image, on the basis of which you will build your miner. Choose something that you know well, for example, fedora:25.
  2. You write Dockerfile, in which you list the commands to install and build your binary inside the container based on the selected image.
  3. It remains to extend your Dockerfile to all machines. According to the instructions from it, they will download the basic one themselves the image, drag the necessary packages into it, assemble the miner and run it.
 1
Author: gbg, 2017-06-25 06:40:44

Not everything is so sad :- ) If you installed this program on all four computers, it means that you have administrator rights there.

Since the library libcrypto.so included in the package libssl1. 0. 0 then you just need to install this package. If you do this with a package manager that tracks external dependencies, then no additional problems will arise. For example, like this:

sudo apt-get install libssl1.0.0
 0
Author: Sergey, 2017-06-26 04:12:32

EMNIP, ./configure --disable-shared will enable the static build

 0
Author: user291359, 2018-03-25 23:09:46