sartura / replica

Replica.one is an easy to use build system designed to deliver both secure and flexible firmware images.
MIT License
26 stars 12 forks source link

Issue building on Fedora 34 #5

Closed bcstinch closed 3 years ago

bcstinch commented 3 years ago

Distribution: Fedora 34 RAM: 256GB Filesystem: ext4 Docker daemon logs:

Aug 11 14:02:15 xunlai dockerd[1478824]: time="2021-08-11T14:02:15.214477433-04:00" level=info msg="API listen on /run/docker.sock"
Aug 11 14:03:22 xunlai dockerd[1478824]: time="2021-08-11T14:03:22.004887490-04:00" level=info msg="parsed scheme: \"\"" module=grpc
Aug 11 14:03:22 xunlai dockerd[1478824]: time="2021-08-11T14:03:22.005157835-04:00" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
Aug 11 14:03:22 xunlai dockerd[1478824]: time="2021-08-11T14:03:22.005191735-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{localhost  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Aug 11 14:03:22 xunlai dockerd[1478824]: time="2021-08-11T14:03:22.005209626-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Aug 11 14:28:53 xunlai dockerd[1478824]: time="2021-08-11T14:28:53.335855127-04:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost  <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
Aug 11 14:45:25 xunlai dockerd[1478824]: time="2021-08-11T14:45:25.182067596-04:00" level=info msg="parsed scheme: \"\"" module=grpc
Aug 11 14:45:25 xunlai dockerd[1478824]: time="2021-08-11T14:45:25.182139787-04:00" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
Aug 11 14:45:25 xunlai dockerd[1478824]: time="2021-08-11T14:45:25.182166418-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{localhost  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Aug 11 14:45:25 xunlai dockerd[1478824]: time="2021-08-11T14:45:25.182182378-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Aug 11 14:57:14 xunlai dockerd[1478824]: time="2021-08-11T14:57:14.140918264-04:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost  <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
Aug 11 15:01:49 xunlai dockerd[1478824]: time="2021-08-11T15:01:49.874472402-04:00" level=info msg="parsed scheme: \"\"" module=grpc
Aug 11 15:01:49 xunlai dockerd[1478824]: time="2021-08-11T15:01:49.874529723-04:00" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
Aug 11 15:01:49 xunlai dockerd[1478824]: time="2021-08-11T15:01:49.874548764-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{localhost  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Aug 11 15:01:49 xunlai dockerd[1478824]: time="2021-08-11T15:01:49.874558974-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Aug 11 15:13:42 xunlai dockerd[1478824]: time="2021-08-11T15:13:42.648576909-04:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost  <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
Aug 11 15:34:10 xunlai dockerd[1478824]: time="2021-08-11T15:34:10.155688124-04:00" level=info msg="parsed scheme: \"\"" module=grpc
Aug 11 15:34:10 xunlai dockerd[1478824]: time="2021-08-11T15:34:10.155764395-04:00" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
Aug 11 15:34:10 xunlai dockerd[1478824]: time="2021-08-11T15:34:10.155796606-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{localhost  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Aug 11 15:34:10 xunlai dockerd[1478824]: time="2021-08-11T15:34:10.155813416-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Aug 11 15:35:59 xunlai dockerd[1478824]: time="2021-08-11T15:35:59.145124719-04:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost  <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
Aug 11 15:36:07 xunlai dockerd[1478824]: time="2021-08-11T15:36:07.938390885-04:00" level=info msg="parsed scheme: \"\"" module=grpc
Aug 11 15:36:07 xunlai dockerd[1478824]: time="2021-08-11T15:36:07.938467976-04:00" level=info msg="scheme \"\" not registered, fallback to default scheme" module=grpc
Aug 11 15:36:07 xunlai dockerd[1478824]: time="2021-08-11T15:36:07.938496916-04:00" level=info msg="ccResolverWrapper: sending update to cc: {[{localhost  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Aug 11 15:36:07 xunlai dockerd[1478824]: time="2021-08-11T15:36:07.938513307-04:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Aug 11 15:50:44 xunlai dockerd[1478824]: time="2021-08-11T15:50:44.302488744-04:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {localhost  <nil> 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc

Additional logs: https://pastebin.com/XeWni5Nj

Issue description: I am having issues building at all on Fedora 34. All logs are above and versions are below. Any help would be appreciated as this failure occurs after ~1400 seconds of compiling.

[bcs@xunlai replica]$ m4 --version
m4 (GNU M4) 1.4.18
Copyright (C) 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.

Written by Rene' Seindal.
[bcs@xunlai replica]$ make -v
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 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.
[bcs@xunlai replica]$ docker --version
Docker version 20.10.8, build 3967b7d
jpetrina commented 3 years ago

Thanks for the report, this seems to be an issue with bpftool specifically:

[...]
#12 699.9 ./bpftool-bootstrap btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
#12 699.9 Error: failed to load BTF from /sys/kernel/btf/vmlinux: Invalid argument
#12 699.9 make: *** [Makefile:140: vmlinux.h] Error 22
#12 699.9  * ERROR: dev-util/bpftool-5.9::host failed (compile phase):
#12 699.9  *   emake failed
#12 699.9  *
[...]

If you are not building the vmlinux target, removing *dev-util/bpftool from repos/host/profiles/default/packages ought to resolve the issue for you.

The underlying issue seems to be the fact that no /sys/kernel/btf/vmlinux exists or it cannot be accessed on Fedora. Can you check with zcat /proc/config.gz | grep BTF?

robimarko commented 3 years ago

@bcstinch The issue should now be fixed. I also use Fedora 34.

bcstinch commented 3 years ago

I pulled the latest and tried and I still saw the same error. @robimarko

@jpetrina I tried commenting out *dev-util/bpftool in repos/host/profiles/default/packages and that worked. Here is the output of zcat /proc/config.gz | grep BTF

[bcs@xunlai ~]$ zcat /proc/config.gz | grep BTF
gzip: /proc/config.gz: No such file or directory
jpetrina commented 3 years ago

@bcstinch after pulling Robert's changes, have you updated repository submodules with git submodule update --init --recursive? I feel this might have been the issue here.

The idea with /proc/config.gz was to check BPF Type Format support in the kernel. It seems Fedora 34 already supports this with CONFIG_DEBUG_INFO_BTF=y which should expose /sys/kernel/btf/vmlinux.

Regardless, @robimarko has updated bpftool; the underlying issue seems to be an old bpftool version not being compatible with new kernel BTF. This should now be fixed so please try building from clean slate.

bcstinch commented 3 years ago

Confirmed, I am just a git noob. Everything seems to be working now! Feel free to close.