Closed PsychoSec2 closed 2 years ago
Hi, This won't work like you do it. With a system on libc you can't create a full static build. It has always depencies to the platform glibc libs.
If you want to create a full static build you need to use a system like Alpine which uses musl instead.
Regards,
@Bendr0id Thanks for fast reply! I'll try to start up a Alpine VM and see if I can make a static build from there! If I have any issues then I'll post it here. Much thanks!
If your rigs don't run on a various of different Linux distributions, a non static build but with using static dependency libs (openssl, libuv, hwloc) will also work.
Compiled it using an Alpine VM and followed build instructions, everything works perfectly!
@Bendr0id I tried to do it as you told, because fully dynamically linked isn't possible anymore, because Debian doesn't have libssl 1.1 anymore. So I thought it is necessary to build some deps and link them statically. I did this:
(cd scripts && ./build_deps.sh)
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DXMRIG_DEPS=../scripts/deps -DWITH_OPENCL=OFF -DWITH_CUDA=OFF ..
cmake --build . --config Release
It still complains:
$ ./xmrigServer ./xmrigServer: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Hey @Bendr0id, I'm trying to compile a static build for my rigs. I am planning on using custom code but as a test I'm using the fresh source code from the repo. The only thing changed is the BUILD_STATIC option which I set to ON in the CMakeLists.txt file.
When I try to build get this error: