xmr-stak icon indicating copy to clipboard operation
xmr-stak copied to clipboard

/VirtualMemory_unix.cpp: In static member function ‘static void* xmrstak::VirtualMemory::allocateLargePagesMemory(size_t, size_t)’:

Open MrAbaddon opened this issue 5 years ago • 6 comments

Hi, when compiling on CentOS 7 I get the following error:

make install

Scanning dependencies of target xmr-stak-randomx [ 2%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/aes_hash.cpp.o [ 4%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/allocator.cpp.o [ 6%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/argon2_core.c.o [ 8%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/argon2_ref.c.o [ 10%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/blake2_generator.cpp.o [ 13%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/blake2/blake2b.c.o [ 15%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/bytecode_machine.cpp.o [ 17%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/dataset.cpp.o [ 19%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/instructions_portable.cpp.o [ 21%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/randomx.cpp.o [ 23%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/reciprocal.c.o [ 26%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/soft_aes.cpp.o [ 28%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/superscalar.cpp.o [ 30%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/virtual_machine.cpp.o [ 32%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/virtual_memory.cpp.o [ 34%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_compiled_light.cpp.o [ 36%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_compiled.cpp.o [ 39%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_interpreted_light.cpp.o [ 41%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_interpreted.cpp.o [ 43%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/jit_compiler_x86_static.S.o [ 45%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/jit_compiler_x86.cpp.o [ 47%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp.o /root/xmr-stak/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp: In static member function ‘static void* xmrstak::VirtualMemory::allocateLargePagesMemory(size_t, size_t)’: /root/xmr-stak/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp:104:38: error: ‘MAP_HUGE_SHIFT’ was not declared in this scope constexpr int MAP_HUGE_2MB = (21 << MAP_HUGE_SHIFT); ^ make[2]: *** [CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmr-stak-randomx.dir/all] Error 2 make: *** [all] Error 2

Thanks. Regards, Bruno Morais

MrAbaddon avatar Dec 16 '19 21:12 MrAbaddon

thx for reporting. there is a open pr which fix this issue (can curently not link it)

psychocrypt avatar Dec 17 '19 12:12 psychocrypt

Revision 2623 "latest" at this time still has the issue. Is this expected? I could not seem to find a pr that may match the issue. Regards

pjwelsh avatar Dec 20 '19 15:12 pjwelsh

the issue is fixed with #2635

psychocrypt avatar Dec 20 '19 15:12 psychocrypt

Sadly, the latest rev 2656 (1.0.5-rx) seems to have this issue again. svn update xmr-stak.git Updating 'xmr-stak.git': At revision 2656.

[ 44%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/jit_compiler_x86.cpp.o [ 46%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp.o /xmr-stak.git/tags/1.0.5-rx/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp: In static member function \u2018static void* xmrstak::VirtualMemory::allocateLargePagesMemory(size_t, size_t)\u2019: /xmr-stak.git/tags/1.0.5-rx/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp:109:38: error: \u2018MAP_HUGE_SHIFT\u2019 was not declared in this scope constexpr int MAP_HUGE_2MB = (21 << MAP_HUGE_SHIFT); ^~~~~~~~~~~~~~ /xmr-stak.git/tags/1.0.5-rx/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp:109:38: note: suggested alternative: \u2018MAP_HUGE_2MB\u2019 constexpr int MAP_HUGE_2MB = (21 << MAP_HUGE_SHIFT); ^~~~~~~~~~~~~~ MAP_HUGE_2MB make[2]: *** [CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmr-stak-randomx.dir/all] Error 2 make: *** [all] Error 2

pjwelsh avatar May 13 '20 14:05 pjwelsh

Not sure if this compile issue was noticed as being back again. It was fixed, but seems to have some part of the fix removed/regressed. No SVN update is found.

pjwelsh avatar May 22 '20 15:05 pjwelsh

Nudge... Any chance to look at this issue again. The build has been broken since the 1.0.5 release on CentOS 7.

pjwelsh avatar Apr 15 '21 19:04 pjwelsh