[main] Revert "Jenkinsfile: temporarily disable Fedora Rawhide"#371
Conversation
|
New error this time; |
b0f11ee to
ee577db
Compare
|
Ha! Looks like we found a bug in our script; this PR rand a build from the same commit that was used to tag the new containerd As that's a sub module, it must be tagged with the module path as prefix; in this case |
ee577db to
1fc3aba
Compare
1fc3aba to
2b19d37
Compare
|
Error above should be fixed through #375 |
|
Remaining failure on DetailsError is here; go build -gcflags=-trimpath=/go/src -buildmode=pie -o bin/gen-manpages -ldflags '-X github.com/containerd/containerd/v2/version.Version=0.20240723.181935~c3bed76 -X github.com/containerd/containerd/v2/version.Revision=c3bed76eeb24ab6671a8134ce32fd2b22b0af667 -X github.com/containerd/containerd/v2/version.Package=github.com/containerd/containerd/v2 -s -w ' -tags "" ./cmd/gen-manpages
# github.com/containerd/containerd/v2/cmd/gen-manpages
/usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
collect2: fatal error: cannot find ‘ld’
compilation terminated.Found a StackOverflow question about a similar case, but need to do more searching; https://stackoverflow.com/questions/35970824/gcc-collect2-fatal-error-cannot-find-ld |
2b19d37 to
26502bf
Compare
26502bf to
d982d4d
Compare
|
Looks like it also fails on Fedora 41 (not yet released);
Dockerfile used to test variations; # syntax=docker/dockerfile:1
ARG USE=pkg
FROM fedora:41 AS base
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH="${PATH}:/usr/local/go/bin:${GOPATH}/bin"
ENV CC=gcc
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
RUN dnf install -y gcc
ADD --link https://github.com/containerd/containerd.git /containerd
WORKDIR /containerd/
FROM base AS golangimg
COPY --link --from=golang:1.23 /usr/local/go /usr/local/go
FROM base AS golangpkg
RUN dnf install -y golang
FROM golang${USE}
RUN ldd $(command -v go) || true
RUN go version -v $(command -v go)
RUN go version
RUN go build -o bin/gen-manpages ./cmd/gen-manpagesBuilding with the Fedora package; docker build --no-cache --progress=plain --build-arg USE=pkg .
#12 [golangpkg 1/1] RUN dnf install -y golang
#12 CACHED
#13 [stage-3 1/4] RUN ldd $(command -v go) || true
#13 0.110 not a dynamic executable
#13 DONE 0.1s
#14 [stage-3 2/4] RUN go version -v $(command -v go)
#14 0.168 /usr/bin/go: go1.23.0
#14 DONE 0.2s
#15 [stage-3 3/4] RUN go version
#15 0.118 go version go1.23.0 linux/arm64
#15 DONE 0.1s
#16 [stage-3 4/4] RUN go build -o bin/gen-manpages ./cmd/gen-manpages
#16 DONE 12.9sBuilding with the Golang image docker build --no-cache --progress=plain --build-arg USE=img .
#14 [golangimg 1/1] COPY --link --from=golang:1.23 /usr/local/go /usr/local/go
#14 CACHED
#15 [stage-3 1/4] RUN ldd $(command -v go) || true
#15 0.116 not a dynamic executable
#15 DONE 0.1s
#16 [stage-3 2/4] RUN go version -v $(command -v go)
#16 0.190 /usr/local/go/bin/go: go1.23.0
#16 DONE 0.2s
#17 [stage-3 3/4] RUN go version
#17 0.134 go version go1.23.0 linux/arm64
#17 DONE 0.1s
#18 [stage-3 4/4] RUN go build -o bin/gen-manpages ./cmd/gen-manpages
#18 11.38 # github.com/containerd/containerd/v2/cmd/gen-manpages
#18 11.38 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
#18 11.38 /usr/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-1738353519/go.o /tmp/go-link-1738353519/000000.o /tmp/go-link-1738353519/000001.o /tmp/go-link-1738353519/000002.o /tmp/go-link-1738353519/000003.o /tmp/go-link-1738353519/000004.o /tmp/go-link-1738353519/000005.o /tmp/go-link-1738353519/000006.o /tmp/go-link-1738353519/000007.o /tmp/go-link-1738353519/000008.o /tmp/go-link-1738353519/000009.o /tmp/go-link-1738353519/000010.o /tmp/go-link-1738353519/000011.o /tmp/go-link-1738353519/000012.o /tmp/go-link-1738353519/000013.o /tmp/go-link-1738353519/000014.o /tmp/go-link-1738353519/000015.o /tmp/go-link-1738353519/000016.o /tmp/go-link-1738353519/000017.o /tmp/go-link-1738353519/000018.o /tmp/go-link-1738353519/000019.o /tmp/go-link-1738353519/000020.o /tmp/go-link-1738353519/000021.o /tmp/go-link-1738353519/000022.o /tmp/go-link-1738353519/000023.o /tmp/go-link-1738353519/000024.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g
#18 11.38 collect2: fatal error: cannot find 'ld'
#18 11.38 compilation terminated.
#18 11.38
#18 ERROR: process "/bin/sh -c go build -o bin/gen-manpages ./cmd/gen-manpages" did not complete successfully: exit code: 1
------
> [stage-3 4/4] RUN go build -o bin/gen-manpages ./cmd/gen-manpages:
11.38 # github.com/containerd/containerd/v2/cmd/gen-manpages
11.38 /usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
11.38 /usr/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-1738353519/go.o /tmp/go-link-1738353519/000000.o /tmp/go-link-1738353519/000001.o /tmp/go-link-1738353519/000002.o /tmp/go-link-1738353519/000003.o /tmp/go-link-1738353519/000004.o /tmp/go-link-1738353519/000005.o /tmp/go-link-1738353519/000006.o /tmp/go-link-1738353519/000007.o /tmp/go-link-1738353519/000008.o /tmp/go-link-1738353519/000009.o /tmp/go-link-1738353519/000010.o /tmp/go-link-1738353519/000011.o /tmp/go-link-1738353519/000012.o /tmp/go-link-1738353519/000013.o /tmp/go-link-1738353519/000014.o /tmp/go-link-1738353519/000015.o /tmp/go-link-1738353519/000016.o /tmp/go-link-1738353519/000017.o /tmp/go-link-1738353519/000018.o /tmp/go-link-1738353519/000019.o /tmp/go-link-1738353519/000020.o /tmp/go-link-1738353519/000021.o /tmp/go-link-1738353519/000022.o /tmp/go-link-1738353519/000023.o /tmp/go-link-1738353519/000024.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g
11.38 collect2: fatal error: cannot find 'ld'
11.38 compilation terminated.
11.38
------
Dockerfile:25
--------------------
23 | RUN go version -v $(command -v go)
24 | RUN go version
25 | >>> RUN go build -o bin/gen-manpages ./cmd/gen-manpages
26 |
--------------------
ERROR: failed to solve: process "/bin/sh -c go build -o bin/gen-manpages ./cmd/gen-manpages" did not complete successfully: exit code: 1 |
|
This patch in Fedora's packages looks related; https://src.fedoraproject.org/rpms/golang/blob/rawhide/f/0006-Default-to-ld.bfd-on-ARM64.patch / https://src.fedoraproject.org/rpms/golang/blob/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77/f/0006-Default-to-ld.bfd-on-ARM64.patch From 46ec67413008607e2150e3395668e54e538c5b6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
Date: Wed, 19 Jun 2024 10:18:58 +0200
Subject: [PATCH] Default to ld.bfd on ARM64
---
src/cmd/link/internal/ld/lib.go | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index eab74dc328..b401f58727 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1620,22 +1620,16 @@ func (ctxt *Link) hostlink() {
}
if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" {
- // On ARM64, the GNU linker will fail with
- // -znocopyreloc if it thinks a COPY relocation is
- // required. Switch to gold.
- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962
- // https://go.dev/issue/22040
- altLinker = "gold"
-
- // If gold is not installed, gcc will silently switch
- // back to ld.bfd. So we parse the version information
- // and provide a useful error if gold is missing.
+ // Use ld.bfd as the default linker
+ altLinker = "bfd"
+
+ // Provide a useful error if ld.bfd is missing
name, args := flagExtld[0], flagExtld[1:]
- args = append(args, "-fuse-ld=gold", "-Wl,--version")
+ args = append(args, "-fuse-ld=bfd", "-Wl,--version")
cmd := exec.Command(name, args...)
if out, err := cmd.CombinedOutput(); err == nil {
- if !bytes.Contains(out, []byte("GNU gold")) {
- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out)
+ if !bytes.Contains(out, []byte("GNU ld")) {
+ log.Fatalf("ARM64 external linker must be ld.bfd, but is not: %s", out)
}
}
}
--
2.45.1That patch is related to https://go.dev/issue/22040; So go contains a workaround (added in golang/go@cd77738 - go1.21), but that enforces the uses of |
7de9505 to
d8e9526
Compare
This reverts commit c1625f7. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
d8e9526 to
7868010
Compare
This reverts commit c1625f7.
- A picture of a cute animal (not mandatory but encouraged)