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

Centos7.9 Building Error "fatal error: sys/random.h: No such file or directory" #438

Open
cuimingkun opened this issue Nov 17, 2023 · 3 comments

Comments

@cuimingkun
Copy link

Centos7.9 Building executing the command is an error

cmake --build . --target bladebit --config Release

[ 21%] Building CXX object _deps/bls-build/src/CMakeFiles/bls.dir/schemes.cpp.o
[ 21%] Building C object _deps/bls-build/src/CMakeFiles/bls.dir///blst-src/src/server.c.o
[ 22%] Building ASM object _deps/bls-build/src/CMakeFiles/bls.dir///blst-src/build/assembly.S.o
[ 22%] Linking CXX static library libbls.a
[ 22%] Built target bls
Scanning dependencies of target bladebit_core
[ 22%] Building CXX object CMakeFiles/bladebit_core.dir/src/pos/chacha8.cpp.o
[ 23%] Building C object CMakeFiles/bladebit_core.dir/src/fse/debug.c.o
[ 23%] Building C object CMakeFiles/bladebit_core.dir/src/fse/entropy_common.c.o
[ 23%] Building C object CMakeFiles/bladebit_core.dir/src/fse/fse_compress.c.o
[ 25%] Building C object CMakeFiles/bladebit_core.dir/src/fse/fse_decompress.c.o
[ 25%] Building C object CMakeFiles/bladebit_core.dir/src/fse/hist.c.o
[ 26%] Building C object CMakeFiles/bladebit_core.dir/src/b3/blake3.c.o
[ 26%] Building C object CMakeFiles/bladebit_core.dir/src/b3/blake3_dispatch.c.o
[ 27%] Building C object CMakeFiles/bladebit_core.dir/src/b3/blake3_portable.c.o
[ 27%] Building ASM object CMakeFiles/bladebit_core.dir/src/b3/blake3_avx2_x86-64_unix.S.o
[ 28%] Building ASM object CMakeFiles/bladebit_core.dir/src/b3/blake3_avx512_x86-64_unix.S.o
[ 28%] Building ASM object CMakeFiles/bladebit_core.dir/src/b3/blake3_sse41_x86-64_unix.S.o
[ 28%] Building C object CMakeFiles/bladebit_core.dir/src/bech32/segwit_addr.c.o
[ 29%] Building CXX object CMakeFiles/bladebit_core.dir/src/platform/linux/SysHost_Linux.cpp.o
/tmp/bladebit/src/platform/linux/SysHost_Linux.cpp:13:14: fatal error: sys/random.h: No such file or directory
#include <sys/random.h>
^~~~~~~~~~~~~~
compilation terminated.
gmake[3]: *** [CMakeFiles/bladebit_core.dir/src/platform/linux/SysHost_Linux.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/bladebit_core.dir/all] Error 2
gmake[1]: *** [CMakeFiles/bladebit.dir/rule] Error 2
gmake: *** [bladebit] Error 2

@LeroyINC
Copy link

did you try to build it using the bash script? like "sh build-cuda.sh" or "sh build.sh" (for non cuda)

@cuimingkun
Copy link
Author

did you try to build it using the bash script? like "sh build-cuda.sh" or "sh build.sh" (for non cuda)

It's still the same error, because the script content is only

cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --target clean --config Release
cmake --build . --target bladebit --config Release -j32

@karlestira
Copy link

centos7 has no <sys/random.h>, you need to update your libc(and this is very difficult), update to newer kernel or use containers(docker or singularity) will be easier.

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