Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

CLN v26.06.8 doesn't compile on nixOS

Đang mở Phù hợp với người mới
#9,593 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 2 ngày

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

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
90/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nixos, python
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu với nix/pkgs/default.nix và so sánh release branch với các bản sửa lỗi trên master; chỉ kiểm tra rule trong doc/Makefile và devtools/blockreplace.py khi cần. Chạy lệnh nix build đã được báo cáo trên NixOS và coi issue là hoàn tất khi v26.06.8 build thành công target doc/index.rst.

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

Mô tả

Summary

nix build fails for v26.06.8 when building the doc/index.rst target. The fix is already on master but isn't in any release tag. Meanwhile, the NixOS section of the installation docs on master tells users to build a release tag (v26.06.1), and that tag doesn't include the fix either.

Steps to reproduce

On NixOS (I reproduced it in a nixos/nix:latest container, linux/amd64):

git clone https://github.com/ElementsProject/lightning.git
cd lightning
git checkout v26.06.8
git submodule update --init --recursive
nix build '.?submodules=1' --print-build-logs
Error
cln> /nix/store/ciarnmsx8lvsrmdbjddpmx0pqjrm8imb-bash-5.3p3/bin/bash: line 1: devtools/blockreplace.py: Permission denied
cln> make: *** [doc/Makefile:324: doc/index.rst] Error 126
cln> rm ccan-tal.o ccan-err.o ccan-time.o ccan-crypto-shachain.o ccan-opt-parse.o ccan-isaac.o ccan-closefrom.o external/build-x86_64-unknown-linux-gnu/jsmn-build/jsmn.o ccan-strset.o ccan-tal-link.o ccan-ilog.o ccan-rbuf.o ccan-opt-usage.o ccan-membuf.o ccan-utf8.o ccan-str.o ccan-list.o ccan-bitops.o ccan-mem.o ccan-crypto-hkdf.o ccan-crypto-siphash24.o ccan-io-fdpass.o ccan-noerr.o ccan-opt-helpers.o ccan-bitmap.o ccan-htable.o ccan-json_escape.o ccan-pipecmd.o ccan-io-poll.o ccan-timer.o ccan-crc32c.o ccan-str-base32.o ccan-tal-str.o ccan-crypto-ripemd160.o ccan-take.o ccan-tal-grab_file.o ccan-read_write_all.o ccan-rune-rune.o ccan-fdpass.o ccan-asort.o ccan-breakpoint.o ccan-json_out.o ccan-strmap.o ccan-cdump.o ccan-tal-path.o ccan-crypto-hmac.o ccan-str-hex.o external/build-x86_64-unknown-linux-gnu/libwally-core-build/src/secp256k1/libsecp256k1.la ccan-ptr_valid.o external/build-x86_64-unknown-linux-gnu/libwally-core-build/src/libwallycore.la ccan-isaac64.o ccan-intmap.o ccan-base64.o ccan-io-io.o ccan-rune-coding.o ccan-opt.o ccan-crypto-sha256.o
error: Cannot build '/nix/store/ri03gak9d26yw4qpj5c20823p8rx4mmn-cln.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/pdsk63hz0k39iz3y42m66k4k7zpgw3si-cln
Cause
  1. configure looks for Python with uv run python3 --version (default_python()). uv isn't part of the Nix derivation, so PYTHON ends up empty.
  2. The doc/index.rst rule runs $(PYTHON) devtools/blockreplace.py ..., so with PYTHON empty the shell runs the script directly.
  3. In the release tree, devtools/blockreplace.py is mode 100644 (not executable), so the shell fails with Permission denied.
Fix on master, missing from releases

master already has both fixes:

  • 531673a441 nix: fix nix build and simplify NixOS install docs: adds preConfigure = "export PYTHON=python3"; to nix/pkgs/default.nix (and blockreplace.py to patchShebangs)
  • fb0c10cde6 devtools/blockreplace.py: make executable

Running git tag --contains 531673a441 returns nothing, so the release hasn't the fix.

The smallest change that fixes the build on the release branch is this one line in nix/pkgs/default.nix after line 77:

preConfigure = "export PYTHON=python3";
Environment
  • Core Lightning: v26.06.8
  • Nix: nixos/nix:2.35.2 Docker image, nix-command and flakes enabled
Ngôn ngữ chính
C
Star
3.1k
Fork
1k
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
40

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 ElementsProject/lightning

Tất cả issue của ElementsProject/lightning

Issue tương tự

Thêm issue về C

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.