RandomX: Can't Build in FreeNAS Jail
I’m trying to build this on a FreeNAS box, in a jail.
The jail’s version: FreeBSD 11.2-STABLE
root@randomX:~ # gcc --version
gcc (FreeBSD Ports Collection) 8.3.0
Copyright (C) 2018 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.
root@randomX:~/RandomX # git checkout v1.0.3
HEAD is now at e4b2270 Merge pull request #47 from tevador/pr-doc
root@randomX:~/RandomX # make
make: "/root/RandomX/makefile" line 16: Missing dependency operator
make: "/root/RandomX/makefile" line 19: Need an operator
make: "/root/RandomX/makefile" line 20: Missing dependency operator
make: "/root/RandomX/makefile" line 23: Need an operator
make: "/root/RandomX/makefile" line 162: warning: duplicate script for target "obj/%.o" ignored
make: "/root/RandomX/makefile" line 159: warning: using previous script for "obj/%.o" defined here
make: "/root/RandomX/makefile" line 165: warning: duplicate script for target "obj/%.o" ignored
make: "/root/RandomX/makefile" line 159: warning: using previous script for "obj/%.o" defined here
make: Fatal errors encountered -- cannot continue
make: stopped in /root/RandomX
I get slightly farther with gmake:
root@randomX:~/RandomX # gmake --version
GNU Make 4.2.1
Built for amd64-portbld-freebsd11.2
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@randomX:~/RandomX # gmake
c++ -std=c++11 -maes -O3 -flto -c src/virtual_memory.cpp -o obj/virtual_memory.o
src/virtual_memory.cpp:119:83: error: use of undeclared identifier 'MAP_HUGETLB'
mem = mmap(nullptr, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, -1, 0);
^
src/virtual_memory.cpp:119:97: error: use of undeclared identifier 'MAP_POPULATE'
mem = mmap(nullptr, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_POPULATE, -1, 0);
^
2 errors generated.
gmake: *** [makefile:162: obj/virtual_memory.o] Error 1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (6 by maintainers)
We will be deprecating the makefile soon in favor of
cmake.For the time being, you can build it easily like this: