fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

./xmr-stak: error while loading shared libraries: libmicrohttpd.so.10: cannot open shared object file: No such file or directory #1936

Open rocke opened 5 years ago

rocke commented 5 years ago

./xmr-stak: error while loading shared libraries: libmicrohttpd.so.10: cannot open shared object file: No such file or directory

Q1:I see the following instructions in compile.md, but I can't run it on other operating systems after compiling binaries. How can I integrate libmicrohttpd.so.10 into xmr-stak so that I can use xmr-stak on other operating systems?

If you use static compile to run the miner on another system set -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic

Can you give me detailed steps on how to solve this problem?

[2018-10-15 11:10:02] : Mining coin: cryptonight_v8
[2018-10-15 11:10:02] : Starting 2x thread, affinity: 0.
[2018-10-15 11:10:02] : hwloc: memory pinned
[2018-10-15 11:10:02] : Starting 2x thread, affinity: 1.
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : hwloc: memory pinned
[2018-10-15 11:10:02] : Starting 2x thread, affinity: 2.
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : hwloc: memory pinned
[2018-10-15 11:10:02] : Starting 2x thread, affinity: 3.
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : hwloc: memory pinned
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : MEMORY ALLOC FAILED: mmap failed, check attribute 'use_slow_memory' in 'config.txt'
[2018-10-15 11:10:02] : Fast-connecting to pool.supportxmr.com:3333 pool ...
[2018-10-15 11:10:04] : Pool pool.supportxmr.com:3333 connected. Logging in...
[2018-10-15 11:10:05] : Difficulty changed. Now: 5000.
[2018-10-15 11:10:05] : Pool logged in.
[2018-10-15 11:10:31] : Result rejected by the pool.
[2018-10-15 11:10:31] : Difficulty changed. Now: 5001.
[2018-10-15 11:10:31] : New block detected.
[2018-10-15 11:10:31] : New block detected.

ERROR: miner was not able to allocate memory.

Q2 : I don't know why the above error was caused.

psychocrypt commented 5 years ago

Q1: Your other systems missed some dependencies e.g. libmicrohttpd.so.10

Q2: Which error? I can not see any error in the log. If you mean MEMORY ALLOC FAILED: ... than please follow https://github.com/fireice-uk/xmr-stak/blob/dev/doc/FAQ.md#error-memory-alloc-failed-mmap-failed

rocke commented 5 years ago

@psychocrypt How can I compile libmicrohttpd.so into xmr-stak and let it run on other operating systems without installing libmicrohttpd.so?

psychocrypt commented 5 years ago

This requires that you compile all dependencies static. I have never done it because it is not very easy. But if it is the same OS but only another system than copy the .so file into the folder of xmr-stak and set LD_LIBRARY_PATH to the xmr-stak folder.

rocke notifications@github.com schrieb am Mo., 15. Okt. 2018, 09:49:

@psychocrypt https://github.com/psychocrypt How can I compile libmicrohttpd.so into xmr-stak and let it run on other operating systems without installing libmicrohttpd.so?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fireice-uk/xmr-stak/issues/1936#issuecomment-429742165, or mute the thread https://github.com/notifications/unsubscribe-auth/AYsxtiCb_FlNzK_-2RwcC52WQa1fCrLxks5ulD3wgaJpZM4Xbdga .

rocke commented 5 years ago

@psychocrypt

I am using Centos 7 to compile miners, now I am running my miner on centos 6 and I am prompted with the following error:

./xmr-stak: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./xmr-stak)

I used it

-DXMR-STAK_COMPILE=generic

Why is it still missing? /lib64/libc.so.6:

psychocrypt commented 5 years ago

You must set static compile in xmr-stak. I am on my mobile phine therefore I can not point to the docu but we have it in our docs.

rocke commented 5 years ago

@psychocrypt

I seem to have added less -DCMAKE_LINK_STATIC=ON parameter

Spudz76 commented 5 years ago

I have never gotten CentOS6 to do anything but get in my way. The core OS is just too old (they call it "stable") to even run fully static binaries most of the time.

You might have luck by using RHEL DTS to get a usable C++11 compiler on CentOS6 itself, then it might compile against all the old CentOS6 junk libs and run. Or, it might hit the next dependency that is too old or too oversecured or overstabilized. The stock GCC is definitely way too old, and I don't think it even has a usable LLVM/clang (3.5 minimum that works, 3.8 best) - I seem to remember it only offers libmicrohttpd-0.7 or something silly (current is 1.x, I think we can't use older than 0.8) and then you have OpenSSL problems most likely (it still has 0.9.8something not 1.1.1 or even 1.0.0) and then libhwloc is probably either unavailable or too old also.

CentOS is just RHEL with some mods (like Ubuntu is for Debian) except RHEL is the worst linux to begin with and then they went and made it even worse (sorry I mean "more stable and secure")