fireice-uk / xmr-stak

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

‘MAP_HUGETLB’ was not declared in this scope MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0); #1658

Open hqylwrx opened 6 years ago

hqylwrx commented 6 years ago

[ 53%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o /root/xmr-stak-2.4.5/xmrstak/backend/cpu/crypto/cryptonight_common.cpp: In function ‘cryptonight_ctx cryptonight_alloc_ctx(size_t, size_t, alloc_msg)’: /root/xmr-stak-2.4.5/xmrstak/backend/cpu/crypto/cryptonight_common.cpp:258:33: error: ‘MAP_HUGETLB’ was not declared in this scope MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, 0, 0); ^ make[2]: [CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o] 错误 1 make[1]: [CMakeFiles/xmr-stak-backend.dir/all] 错误 2

Help,How can I fixd this error?

Spudz76 commented 6 years ago

CentOS?

hqylwrx commented 6 years ago

centos 6.9 64bit

JerichoJones commented 6 years ago

@hqylwrx Did you ever get this resolved?

Spudz76 commented 6 years ago

If you really must CentOS, then I hear 7.4 is closest to compatible with xmr-stak and its dependencies and the drivers that work well. Anything older won't have the proper compiler or headers for C++ 11 standards (GCC 5.4 but even better 5.5 or 5.6 or newer, but clang 3.8 or newer also works, but neither is likely easily available on CentOS 6.x)

But friends don't let friends CentOS, srsly.

Kevinsss commented 5 years ago

@hqylwrx It seems that your system doesn't define this. Try to add this code, #define MAP_HUGETLB 0x0040000

Spudz76 commented 5 years ago

I would and have defined it as 0 on systems where it is unsupported (aka not already in the headers) Probably have to do the same to MAP_POPULATE