CLN v26.06.8 doesn't compile on nixOS
维护者通常 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
configurelooks for Python withuv run python3 --version(default_python()).uvisn't part of the Nix derivation, soPYTHONends up empty.- The
doc/index.rstrule runs$(PYTHON) devtools/blockreplace.py ..., so withPYTHONempty the shell runs the script directly. - In the release tree,
devtools/blockreplace.pyis mode100644(not executable), so the shell fails withPermission denied.
Fix on master, missing from releases
master already has both fixes:
531673a441nix: fixnix buildand simplify NixOS install docs: addspreConfigure = "export PYTHON=python3";tonix/pkgs/default.nix(andblockreplace.pytopatchShebangs)fb0c10cde6devtools/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.2Docker image,nix-commandandflakesenabled
- 主要语言
- C
- 星标
- 3.1k
- 派生
- 1k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 45
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ElementsProject/lightning 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
ElementsProject/lightning#9322 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ElementsProject/lightning#9206 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ElementsProject/lightning#9187 · 1 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
QA
难度 1/5 1 小时以内 新手友好度 88/100
ElementsProject/lightning#9117 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 57/100
ElementsProject/lightning#9608 · 2 条评论 ·
维护者通常 2 天内回复
查看 ElementsProject/lightning 的全部 Issue
相似的 Issue
-
backend
难度 2/5 1-3 小时 新手友好度 68/100
BasedHardware/omi#20940 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
kovidgoyal/kitty#10625 ·
维护者通常 1 天内回复
-
Feature Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
docs
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复