Skip to content

bcachefs-tools: fix riscv build - #550473

Merged
JohnRTitor merged 1 commit into
NixOS:staging-nixosfrom
onny:bcachefs-riscv-fix
Aug 11, 2026
Merged

JohnRTitor merged 1 commit into
NixOS:staging-nixosfrom
onny:bcachefs-riscv-fix

Conversation

@onny

@onny onny commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes cross-compilation for the bcachefs-tools package on RISCV.

Former error was:

nix build -L .#pkgsCross.riscv64.bcachefs-tools
[...]
bcachefs-tools-riscv64-unknown-linux-gnu>    Compiling serde_json v1.0.143
bcachefs-tools-riscv64-unknown-linux-gnu> error: failed to run custom build command for `bcachefs-kernel v0.1.0 (/build/source/fs)`
bcachefs-tools-riscv64-unknown-linux-gnu> Caused by:
bcachefs-tools-riscv64-unknown-linux-gnu>   process didn't exit successfully: `/build/source/target/release/build/bcachefs-kernel-e8c0ccdad112401b/build-script-build` (exit status: 1)
bcachefs-tools-riscv64-unknown-linux-gnu>   --- stdout
bcachefs-tools-riscv64-unknown-linux-gnu>   cargo::rustc-check-cfg=cfg(kernel)
bcachefs-tools-riscv64-unknown-linux-gnu>   cargo:rerun-if-changed=codegen.rs
bcachefs-tools-riscv64-unknown-linux-gnu>   cargo:rerun-if-changed=../doc/opts_macro.h
[...]
bcachefs-tools-riscv64-unknown-linux-gnu>   cargo:rerun-if-changed=../include/linux/seq_buf.h
bcachefs-tools-riscv64-unknown-linux-gnu>   --- stderr
bcachefs-tools-riscv64-unknown-linux-gnu>   warning: optimization flag '-fkeep-inline-functions' is not supported [-Wignored-optimization-argument]
bcachefs-tools-riscv64-unknown-linux-gnu>   error: unknown target triple 'riscv64gc-unknown-linux-gnu'
bcachefs-tools-riscv64-unknown-linux-gnu>   panicked at /build/rust-bindgen-unwrapped-0.72.1-vendor/source-registry-0/bindgen-0.72.1/ir/context.rs:562:15:
bcachefs-tools-riscv64-unknown-linux-gnu>   libclang error; possible causes include:
bcachefs-tools-riscv64-unknown-linux-gnu>   - Invalid flag syntax
bcachefs-tools-riscv64-unknown-linux-gnu>   - Unrecognized flags
bcachefs-tools-riscv64-unknown-linux-gnu>   - Invalid flag arguments
bcachefs-tools-riscv64-unknown-linux-gnu>   - File I/O errors
bcachefs-tools-riscv64-unknown-linux-gnu>   - Host vs. target architecture mismatch
bcachefs-tools-riscv64-unknown-linux-gnu>   If you encounter an error missing from this list, please file an issue or a PR!

Upstream issue koverstreet/bcachefs-tools#850

Things done

@onny onny added 6.topic: riscv64 RISC-V is an open standard instruction set architecture backport release-26.05 Backport PR automatically labels Aug 8, 2026
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Aug 8, 2026
@onny
onny marked this pull request as ready for review August 8, 2026 12:56
@onny
onny force-pushed the bcachefs-riscv-fix branch from 93c4047 to 4315f4c Compare August 8, 2026 13:08
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". label Aug 8, 2026
@nixpkgs-ci
nixpkgs-ci Bot requested review from JohnRTitor and davidak August 8, 2026 13:13
@onny onny added backport staging-nixos-26.05 Backport PR automatically and removed backport release-26.05 Backport PR automatically labels Aug 9, 2026
@onny
onny changed the base branch from master to staging August 9, 2026 10:57
@nixpkgs-ci nixpkgs-ci Bot closed this Aug 9, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Aug 9, 2026
@JohnRTitor
JohnRTitor changed the base branch from staging to staging-nixos August 9, 2026 10:58
@nixpkgs-ci nixpkgs-ci Bot closed this Aug 9, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Aug 9, 2026
@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed their stale review August 9, 2026 11:03

Review dismissed automatically

@onny
onny requested a review from SuperSandro2000 August 10, 2026 07:34
@JohnRTitor
JohnRTitor added this pull request to the merge queue Aug 11, 2026
Merged via the queue into NixOS:staging-nixos with commit 0d56d1d Aug 11, 2026
67 of 80 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for staging-nixos-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Aug 11, 2026
felixonmars added a commit to felixonmars/archriscv-packages that referenced this pull request Sep 12, 2026
Keep the canonical Clang target override for build(). Upstream v1.39.6 normalizes bch_bindgen, but its newer fs/codegen.rs path still passes Rust's riscv64gc triple directly to bindgen; libclang rejects it. This is also tracked upstream and fixed the same way in NixOS.

Use BFD for check(). Arch Rust's default LLD revisits the generated static-wrapper archive after later Rust objects introduce references, then reports the wrappers' unlinked userspace C implementations as undefined. Retain the complete cargo test suite.

koverstreet/bcachefs-tools#850

NixOS/nixpkgs#550473
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 6.topic: riscv64 RISC-V is an open standard instruction set architecture 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. backport staging-nixos-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants