rv8
rv8 copied to clipboard
Fail run make in centos machine
Im tried run the make in centos machine but a have the next error. Somebody can help me.
AR build/linux_x86_64/lib/libasmjit_x86.a
CC build/linux_x86_64/obj/mem/mmap-linux.o
CC build/linux_x86_64/obj/mem/mmap-core.o
src/mem/mmap-core.c:31:47: error: ‘MAP_ANONYMOUS’ undeclared here (not in a function)
static const int METADATA_FLAGS = MAP_FIXED | MAP_ANONYMOUS | MAP_PRIVATE;
^~~~~~~~~~~~~
make: *** [Makefile:719: build/linux_x86_64/obj/mem/mmap-core.o] Error 1
What version of CentOS are you using?
I can test in CentOS 7 (2014) but CentOS 6 (2011) is too old and is out of support.
Can you run gcc --version?
I have centos6, because my school use this version.
My gcc version is :
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Ungraving this one...
I faced the exact, same problem on our (corporate) rhel6.
I'd suggest make CC=/path/to/gcc-8.3.0/bin/g++ CXX=/path/to/gcc-8.3.0/bin/g++ as it proved helpful in my case.
On my machine, browsing system header files shows that MAP_ANONYMOUS depends on __USE_MISC
Hope this helps