bazel build //beacon-chain:beacon-chain failed with following error.
INFO: Analyzed target //beacon-chain:beacon-chain (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/0mkar/.cache/bazel/_bazel_0mkar/e296e45656aa185b8cd980b23a1da66a/external/zlib/BUILD.bazel:31:1: C++ compilation of rule '@zlib//:zlib' failed (Exit 1) gcc failed: error executing command
(cd /home/0mkar/.cache/bazel/_bazel_0mkar/e296e45656aa185b8cd980b23a1da66a/sandbox/linux-sandbox/58/execroot/prysm && \
exec env - \
PATH=/bin:/usr/bin:/usr/local/bin \
PWD=/proc/self/cwd \
/usr/lib64/ccache/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/host/bin/external/zlib/_objs/zlib/zutil.d '-frandom-seed=bazel-out/host/bin/external/zlib/_objs/zlib/zutil.o' -iquote external/zlib -iquote bazel-out/host/bin/external/zlib -isystem external/zlib/zlib/include -isystem bazel-out/host/bin/external/zlib/zlib/include -g0 -Wno-unused-variable -Wno-implicit-function-declaration -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/zlib/zutil.c -o bazel-out/host/bin/external/zlib/_objs/zlib/zutil.o)
Execution platform: @local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox
ccache: error: Failed to create temporary file for /home/0mkar/.ccache/tmp/zutil.stdout: Read-only file system
Target //beacon-chain:beacon-chain failed to build
INFO: Elapsed time: 0.268s, Critical Path: 0.07s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
Summarizing the conversation from discord with @0mkara :
2 potential solutions to this:
dnf install patch
and exporting the environment variables
export CC="/usr/bin/gcc"
export CXX="/usr/bin/g++"
as detailed here https://stackoverflow.com/questions/52370202/how-to-get-bazel-ccache-and-sandboxing-to-work-together-ccache-read-only-file.
Leaving this here in case any other fedora user runs into the same issues
To resolve this issue, we can perhaps we can add a section on Fedora in the install GNU/Linux section of our docs portal @har00ga using the suggestions @nisdas posted above
Sorry I missed this, using Github's new notification panel and still getting used to it :sweat_smile: No problem! Will post here after merge.
Merged :) Can be seen under dependencies here: https://docs.prylabs.network/docs/install/linux/
Most helpful comment
To resolve this issue, we can perhaps we can add a section on Fedora in the install GNU/Linux section of our docs portal @har00ga using the suggestions @nisdas posted above