Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

CLN v26.06.8 doesn't compile on nixOS

未关闭 适合新手
#9,593 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
90/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
nixos, python
领域
build-system

调研方向

从 nix/pkgs/default.nix 开始,将 release branch 与 master 上的修复进行比较;仅在需要时检查 doc/Makefile 中的规则和 devtools/blockreplace.py。在 NixOS 上运行报告中的 nix build 命令,并在 v26.06.8 成功构建 doc/index.rst 目标后认为该 issue 已完成。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
C
星标
3.1k
派生
1k
平均合并
4 天 2 小时
30 天内合并 PR
45

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ElementsProject/lightning 的其他 Issue

查看 ElementsProject/lightning 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。