ci: nix-test fails to link on the ubuntu-26.04 runner image

Đang mở
#6,125 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, linux
Lĩnh vực
build-system, ci-cd

Hướng nghiên cứu

The failure is in the nix-test job, which is defined by runs-on: ubuntu-latest in .github/workflows/nix.yml. Start there, then find where the cgo flags add -L/usr/lib/llvm-20/lib so the host libedit.so.2 gets linked. Done means nix-test links and passes on the ubuntu-26.04 image. Pinning ubuntu-24.04 is the quick fix; keeping the build off host libraries is the durable one, and the maintainers have not chosen between them.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

The nix-test job fails to link tinygo on the new ubuntu-26.04 runner image. GitHub is moving ubuntu-latest from ubuntu-24.04 to ubuntu-26.04, and .github/workflows/nix.yml uses runs-on: ubuntu-latest. The PR does not cause the failure, and dev will fail in the same way when its runs get the new image.

Failing build (PR #6074, image ubuntu-26.04 version 20261015.610): https://github.com/tinygo-org/tinygo/actions/runs/41259602030/job/124713295365

Last passing build on dev (2170767e, image ubuntu-24.04 version 20261021.618): https://github.com/tinygo-org/tinygo/actions/runs/41159893174

/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfgetispeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfsetispeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfsetospeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfgetospeed@GLIBC_2.42'
collect2: error: ld returned 1 exit status

The link uses the -L/usr/lib/llvm-20/lib search paths from the cgo flags, so it finds the libedit.so.2 of the host. On ubuntu-26.04 that library needs glibc 2.42, but the nix toolchain links against an older glibc.

Possible fixes:

  • Pin runs-on: ubuntu-24.04 in nix.yml. This is a quick fix, but the problem comes back when 24.04 is removed.
  • Stop host library paths from getting into the nix build, so that it links only against nix libraries.

cc @dgryski

Ngôn ngữ chính
Go
Star
17.8k
Fork
1.1k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
380

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinygo-org/tinygo

Tất cả issue của tinygo-org/tinygo

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.