Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MrAbaddon opened this issue Dec 16, 2019 · 6 comments

Comments

@MrAbaddon
Copy link

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

@psychocrypt
Copy link
Collaborator

psychocrypt commented Dec 17, 2019 via email

@pjwelsh
Copy link

pjwelsh commented Dec 20, 2019

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

@psychocrypt
Copy link
Collaborator

psychocrypt commented Dec 20, 2019 via email

@pjwelsh
Copy link

pjwelsh commented May 13, 2020

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
Copy link

pjwelsh commented May 22, 2020

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
Copy link

pjwelsh commented Apr 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants