Skip to content

update QNX scripts to work with QEMU built from source#2422

Merged
bors-ferrocene[bot] merged 2 commits into
mainfrom
ja-qnx-with-custom-qnx-build
Jul 10, 2026
Merged

update QNX scripts to work with QEMU built from source#2422
bors-ferrocene[bot] merged 2 commits into
mainfrom
ja-qnx-with-custom-qnx-build

Conversation

@japaric

@japaric japaric commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

qemu-system-$ARCH -netdev bridge,(..) uses the qemu-bridge-helper script that was installed with qemu-system-$ARCH. However, to set up the bridge network in the QNX scripts, we are using the qemu-bridge-helper of the system installed QEMU.

When using a QEMU built from source, we have seen the VM fail to initialize due to a different version of qemu-bridge-helper being used to set up the network bridge. To ensure the right qemu-bridge-helper is using in the QNX script, we search for it using the absolute path of the qemu-system-$ARCH as the reference, instead of assuming it'll be in /usr as that only works when the system installed QEMU is used.

`qemu-system-$ARCH -netdev bridge,(..)` uses the qemu-bridge-helper script that
was installed with `qemu-system-$ARCH`. However, to set up the bridge network in
the QNX scripts, we are using the qemu-bridge-helper of the system installed
QEMU.

When using a QEMU built from source, we have seen the VM fail to initialize due
to a different version of qemu-bridge-helper being used to set up the network
bridge. To ensure the right qemu-bridge-helper is using in the QNX script, we
search for it using the absolute path of the `qemu-system-$ARCH` as the
reference, instead of assuming it'll be in `/usr` as that only works when
the system installed QEMU is used.

@jyn514 jyn514 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable.

bors r+

@bors-ferrocene

Copy link
Copy Markdown
Contributor

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

bors-ferrocene Bot added a commit that referenced this pull request Jun 26, 2026
2412: Automated pull from upstream `HEAD` r=jyn514 a=ferrocene-automations[bot]

:warning: **The automation reported these warnings:** :warning:

* There are merge conflicts in this PR. Merge conflict markers have been committed.
* Couldn't regenerate the symbol report. Please run './x test ferrocene/doc/symbol-report.csv --bless' after fixing the conflicts.

This PR pulls the following changes from the upstream repository:

* `158268`: [Rollup of 8 pull requests](https://www.github.com/rust-lang/rust/issues/158268)
  * `158262`: [Change compiler leads in triagebot.toml](https://www.github.com/rust-lang/rust/issues/158262)
  * `158258`: [Use an unexpanded span for actually written down opt out params](https://www.github.com/rust-lang/rust/issues/158258)
  * `158230`: [Include `Item::stability` info in rustdoc JSON.](https://www.github.com/rust-lang/rust/issues/158230)
  * `158172`: [update `asm_experimental_reg` comments](https://www.github.com/rust-lang/rust/issues/158172)
  * `158171`: [rustdoc: Avoid ICE on unevaluated `type const` projections in array lengths](https://www.github.com/rust-lang/rust/issues/158171)
  * `158119`: [Refactor `proc_macro_decls_static`](https://www.github.com/rust-lang/rust/issues/158119)
  * `157978`: [Avoid `&raw` recovery ICE after trailing comma](https://www.github.com/rust-lang/rust/issues/157978)
  * `158242`: [Fix linking for wasm with crate metadata included](https://www.github.com/rust-lang/rust/issues/158242)
* `158221`: [Specify target list for `#[export_stable]`](https://www.github.com/rust-lang/rust/issues/158221)
* `158240`: [Rollup of 3 pull requests](https://www.github.com/rust-lang/rust/issues/158240)
  * `157832`: [test: make riscv-float-struct-abi.rs robust against LLVM scheduling](https://www.github.com/rust-lang/rust/issues/157832)
  * `158170`: [parse attrs if a loop's parent hir node is a stmt](https://www.github.com/rust-lang/rust/issues/158170)
  * `157529`: [Add `tests/debuginfo` data classes to define schema](https://www.github.com/rust-lang/rust/issues/157529)
* `157689`: [Lint cleanups](https://www.github.com/rust-lang/rust/issues/157689)
* `158228`: [Rollup of 9 pull requests](https://www.github.com/rust-lang/rust/issues/158228)
  * `158195`: [Add me to some rotation groups](https://www.github.com/rust-lang/rust/issues/158195)
  * `158178`: [Use the target checking infrastructure for the diagnostic attributes](https://www.github.com/rust-lang/rust/issues/158178)
  * `158150`: [Update backtrace submodule to pick up AIX related fixes.](https://www.github.com/rust-lang/rust/issues/158150)
  * `158108`: [Update actions/download-artifact action to v8.0.1](https://www.github.com/rust-lang/rust/issues/158108)
  * `158226`: [miri subtree update](https://www.github.com/rust-lang/rust/issues/158226)
  * `158214`: [Don't try to remove assignments in SimplifyComparisonIntegral](https://www.github.com/rust-lang/rust/issues/158214)
  * `157836`: [rebuild LLVM when `bootstrap.toml` config changes](https://www.github.com/rust-lang/rust/issues/157836)
  * `157711`: [Move proc-macro dlopen from proc-macro-srv to rustc_metadata](https://www.github.com/rust-lang/rust/issues/157711)
  * `156356`: [bootstrap: add bootstrap step to run intrinsic-test in CI](https://www.github.com/rust-lang/rust/issues/156356)
* `157346`: [ GVN: Don't assume nested shared references are read-only.](https://www.github.com/rust-lang/rust/issues/157346)
* `158218`: [Rollup of 2 pull requests](https://www.github.com/rust-lang/rust/issues/158218)
  * `156750`: [Improve E0637 suggestions for associated type bindings](https://www.github.com/rust-lang/rust/issues/156750)
  * `158187`: [Avoid uploading package-version on forced-channel jobs](https://www.github.com/rust-lang/rust/issues/158187)
* `158212`: [Rollup of 4 pull requests](https://www.github.com/rust-lang/rust/issues/158212)
  * `158204`: [More general assert in Interner const fn check](https://www.github.com/rust-lang/rust/issues/158204)
  * `158193`: [Remove `has_delayed_lints` optimization](https://www.github.com/rust-lang/rust/issues/158193)
  * `157942`: [Do not use desugared local names in tail_expr_drop_order diagnostics](https://www.github.com/rust-lang/rust/issues/157942)
  * `155439`: [Enable Cargo's new build-dir layout](https://www.github.com/rust-lang/rust/issues/155439)
* `155421`: [Document panic in `RangeInclusive::from(legacy::RangeInclusive)`](https://www.github.com/rust-lang/rust/issues/155421)
* `158140`: [Reorganize `tests/ui/issues` [11/N]](https://www.github.com/rust-lang/rust/issues/158140)
* `158189`: [Reorganize `tests/ui/issues` [12/N]](https://www.github.com/rust-lang/rust/issues/158189)
* `158184`: [Rollup of 3 pull requests](https://www.github.com/rust-lang/rust/issues/158184)
  * `158177`: [rustc-dev-guide subtree update](https://www.github.com/rust-lang/rust/issues/158177)
  * `158141`: [[AArch64] FEAT_SVE implies FEAT_FP16](https://www.github.com/rust-lang/rust/issues/158141)
  * `158137`: [Only copy visible content in clipboard in source code pages](https://www.github.com/rust-lang/rust/issues/158137)
* `158164`: [Update cargo submodule](https://www.github.com/rust-lang/rust/issues/158164)
* `157977`: [c-variadic: initialize the copied `VaList` in const-eval](https://www.github.com/rust-lang/rust/issues/157977)
* `158162`: [Rollup of 3 pull requests](https://www.github.com/rust-lang/rust/issues/158162)
  * `158157`: [Use the direct `From` in `Clone for OnceLock<T>`](https://www.github.com/rust-lang/rust/issues/158157)
  * `157382`: [Suggest `type` next to visibility for const items](https://www.github.com/rust-lang/rust/issues/157382)
  * `157976`: [Improve `NumBufferTrait` associated items](https://www.github.com/rust-lang/rust/issues/157976)
* `158159`: [Rollup of 3 pull requests](https://www.github.com/rust-lang/rust/issues/158159)
  * `158125`: [add a test for the `getrandom` fallback](https://www.github.com/rust-lang/rust/issues/158125)
  * `158106`: [Expand diagnostic for attributes on macro calls](https://www.github.com/rust-lang/rust/issues/158106)
  * `149267`: [fix: clarify that fs::rename on unix accepts targets that don't exist](https://www.github.com/rust-lang/rust/issues/149267)
* `158145`: [Rollup of 8 pull requests](https://www.github.com/rust-lang/rust/issues/158145)
  * `158138`: [Remove redundant check for `#[loop_match]` and `#[const_continue]`](https://www.github.com/rust-lang/rust/issues/158138)
  * `158132`: [std: correctly report file size on UWP](https://www.github.com/rust-lang/rust/issues/158132)
  * `158128`: [std: use correct low surrogate range in Windows standard I/O code](https://www.github.com/rust-lang/rust/issues/158128)
  * `158084`: [`-Znext-solver` Emit error instead of ICE when combining {int, float} var with alias](https://www.github.com/rust-lang/rust/issues/158084)
  * `158075`: [Point to the unstable segment of an import path instead of to the whole path](https://www.github.com/rust-lang/rust/issues/158075)
  * `157926`: [Implement `#[diagnostic::on_unknown]` for modules.](https://www.github.com/rust-lang/rust/issues/157926)
  * `158134`: [Rename `lint-rust-version` to `hint-msrv`](https://www.github.com/rust-lang/rust/issues/158134)
  * `158129`: [ensure the new solver bootstraps on CI](https://www.github.com/rust-lang/rust/issues/158129)
* `158122`: [Revert "Add expansion info to implied bounds"](https://www.github.com/rust-lang/rust/issues/158122)
* `158124`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/158124)
  * `158118`: [Convert '.' to '_' in bootstrap envify](https://www.github.com/rust-lang/rust/issues/158118)
  * `158109`: [Change `EarlyCheckNode` from a trait to an enum.](https://www.github.com/rust-lang/rust/issues/158109)
  * `141266`: [Stabilize `substr_range` and `subslice_range`](https://www.github.com/rust-lang/rust/issues/141266)
  * `158040`: [Codegen ctors in Runtime mir phase](https://www.github.com/rust-lang/rust/issues/158040)
  * `157878`: [`impl [const] Default for BTreeMap`](https://www.github.com/rust-lang/rust/issues/157878)
* `157384`: [Add `#[rustc_dump_generics]` attribute](https://www.github.com/rust-lang/rust/issues/157384)
* `158104`: [Rollup of 2 pull requests](https://www.github.com/rust-lang/rust/issues/158104)
  * `158101`: [Initialize directly in `From<T> for OnceLock<T>`](https://www.github.com/rust-lang/rust/issues/158101)
  * `158026`: [`RegionValues`: disable unnecessary range check](https://www.github.com/rust-lang/rust/issues/158026)
* `158098`: [Rollup of 12 pull requests](https://www.github.com/rust-lang/rust/issues/158098)
  * `158089`: [Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro](https://www.github.com/rust-lang/rust/issues/158089)
  * `158088`: [codegen_ssa: no dbginfo for scalable vec local w/ `-O0`](https://www.github.com/rust-lang/rust/issues/158088)
  * `158086`: [renovate: Loosen dashboard approval and adopt recommended config](https://www.github.com/rust-lang/rust/issues/158086)
  * `158077`: [rustdoc-json-types: Replace bincode dev-dependency with postcard](https://www.github.com/rust-lang/rust/issues/158077)
  * `158074`: [Document transient connection errors from TcpListener::accept](https://www.github.com/rust-lang/rust/issues/158074)
  * `158072`: [Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103](https://www.github.com/rust-lang/rust/issues/158072)
  * `158034`: [Fix reborrow source expression visits](https://www.github.com/rust-lang/rust/issues/158034)
  * `158009`: [Reject `impl const Trait` since the right syntax is `const impl Trait` now](https://www.github.com/rust-lang/rust/issues/158009)
  * `158002`: [Replace `unwrap` with `expect` in `get_module_children`](https://www.github.com/rust-lang/rust/issues/158002)
  * `157935`: [Make `proc_macro::ConversionErrorKind` non exhaustive](https://www.github.com/rust-lang/rust/issues/157935)
  * `157694`: [Enhance documentation on wake call memory ordering](https://www.github.com/rust-lang/rust/issues/157694)
  * `156795`: [Handle generic reborrow in expression-use adjustment walking](https://www.github.com/rust-lang/rust/issues/156795)
* `158068`: [Rollup of 8 pull requests](https://www.github.com/rust-lang/rust/issues/158068)
  * `158062`: [rustc book: Update wasm32-wasip1-threads's maintainers list](https://www.github.com/rust-lang/rust/issues/158062)
  * `158054`: [fix unresolved import suggestion before outer attributes](https://www.github.com/rust-lang/rust/issues/158054)
  * `158051`: [Document `with_added_extension` edge cases](https://www.github.com/rust-lang/rust/issues/158051)
  * `158048`: [Revert "add regression test for Redundant memory strores with mut parameters in by-value returns"](https://www.github.com/rust-lang/rust/issues/158048)
  * `157912`: [stabilize str_from_utf16_endian](https://www.github.com/rust-lang/rust/issues/157912)
  * `157644`: [wasm32-wasip1-threads: Correct llvm target name](https://www.github.com/rust-lang/rust/issues/157644)
  * `151132`: [Take care to use MSG_EOR with SOCK_SEQPACKET sockets](https://www.github.com/rust-lang/rust/issues/151132)
  * `158056`: [Put internal lints into a single combined pass](https://www.github.com/rust-lang/rust/issues/158056)
* `158042`: [Outline part of `evaluate_goal_raw` into its own `#[cold]` function](https://www.github.com/rust-lang/rust/issues/158042)


2422: update QNX scripts to work with QEMU built from source r=jyn514 a=japaric

`qemu-system-$ARCH -netdev bridge,(..)` uses the qemu-bridge-helper script that was installed with `qemu-system-$ARCH`. However, to set up the bridge network in the QNX scripts, we are using the qemu-bridge-helper of the system installed QEMU.

When using a QEMU built from source, we have seen the VM fail to initialize due to a different version of qemu-bridge-helper being used to set up the network bridge. To ensure the right qemu-bridge-helper is using in the QNX script, we search for it using the absolute path of the `qemu-system-$ARCH` as the reference, instead of assuming it'll be in `/usr` as that only works when the system installed QEMU is used.

Co-authored-by: mejrs <[email protected]>
Co-authored-by: Zac Harrold <[email protected]>
Co-authored-by: solunolab <[email protected]>
Co-authored-by: qaijuang <[email protected]>
Co-authored-by: Kevin Valerio <[email protected]>
Co-authored-by: Tshepang Mbambo <[email protected]>
Co-authored-by: Oli Scherer <[email protected]>
Co-authored-by: Kevin Valerio <[email protected]>
Co-authored-by: Jana Dönszelmann <[email protected]>
Co-authored-by: Filiprogrammer <[email protected]>
Co-authored-by: Tim Hutt <[email protected]>
Co-authored-by: pbkx <[email protected]>
Co-authored-by: Nicholas Nethercote <[email protected]>
Co-authored-by: Mohamed Ali <[email protected]>
Co-authored-by: Nikolai Nechaev <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Jacob Pratt <[email protected]>
Co-authored-by: Jorge Aparicio <[email protected]>
@bors-ferrocene

Copy link
Copy Markdown
Contributor

Build failed (retrying...):

bors-ferrocene Bot added a commit that referenced this pull request Jun 26, 2026
2422: update QNX scripts to work with QEMU built from source r=jyn514 a=japaric

`qemu-system-$ARCH -netdev bridge,(..)` uses the qemu-bridge-helper script that was installed with `qemu-system-$ARCH`. However, to set up the bridge network in the QNX scripts, we are using the qemu-bridge-helper of the system installed QEMU.

When using a QEMU built from source, we have seen the VM fail to initialize due to a different version of qemu-bridge-helper being used to set up the network bridge. To ensure the right qemu-bridge-helper is using in the QNX script, we search for it using the absolute path of the `qemu-system-$ARCH` as the reference, instead of assuming it'll be in `/usr` as that only works when the system installed QEMU is used.

Co-authored-by: Jorge Aparicio <[email protected]>
@bors-ferrocene

Copy link
Copy Markdown
Contributor

Build failed:

@jyn514

jyn514 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

seems like a real error.

^@^@QNX_SHARED_LICENSE_FILE=/home/ci/project/qnx710-472/license/licenses
QNX_HOST=/home/ci/project/qnx710-472/host/linux/x86_64
QNX_TARGET=/home/ci/project/qnx710-472/target/qnx7
MAKEFLAGS=-I/home/ci/project/qnx710-472/target/qnx7/usr/include

===> setting up QEMU bridge network
error: bridge.conf not found; update this search logic (helper=/usr/lib/qemu/qemu-bridge-helper)

@jyn514 jyn514 added the waiting-on-author If this PR was opened by an automation, the "author" is the assignee. label Jun 29, 2026
@japaric

japaric commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

seems like a real error.

yeah, bridge.conf does not exist in the Docker image as it is created in the container by the QNX SDP net.sh script so we cannot check for its presence to confirm that it is in one of the expected locations. I have changed the logic to extract the expected location from the bridge helper binary instead

@japaric japaric added waiting-on-review and removed waiting-on-author If this PR was opened by an automation, the "author" is the assignee. labels Jun 29, 2026
Comment on lines +52 to +67
# The location where `qemu-bridge-helper` expects `bride.conf` to be is
# different on a custom QEMU build vs on the Debian packaged QEMU. Also, the
# file is not contained in the Debian package not created by
# `make install` on a custom build; instead the QNX SDP's `net.sh` script
# will create it. As `bridge.conf` does not exist we cannot search for it
# using `find`. The most reliable way to get its expected location seems to
# be to extract the location directly from the helper binary itself
#
# Examples of bridge-qemu-helper and bridge.conf locations
# - Ubuntu/Debian package:
# - `/usr/lib/qemu/qemu-bridge-helper`;
# - `/etc/qemu/bridge.conf`
# - custom build:
# - `$PREFIX/libexec/qemu-bridge-helper`;
# - `$PREFIX/etc/qemu/bridge.conf`
strings "$qemu_bridge_helper" | grep '^/.*/bridge.conf$'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well this is a little terrifying 😆 is there any way we can run net.sh ahead of time so we can see where it actually puts the bridge?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net.sh takes the full path to bridge.conf as an argument and it will create/extend it there, where you tell it to put it even if it's wrong. you have to pass the full bridge.conf path that QEMU expects to net.sh or qemu-bridge-helper will fail later on. so, we cannot get the expected bridge.conf location from net.sh, only from QEMU itself, or rather, from qemu-bridge-helper.

the other option I can think of is running a dummy QEMU invocation first that tries to use the bridge network and helper, which will fail because bridge.conf does not exist, and then parse the error message. the expected bridge.conf location will be contained there

the expected bridge.conf appears to be in the --sysconfdir location you pass to QEMU's configure script but qemu-system-* --version does not print this (or any) configuration setting , like say gcc -v does.

qemu-bridge-helper itself has a very primitive command line parsing. it does not accept --help or --version flags; it only prints an "usage" one liner if the arguments are wrong.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so sad. i guess this is ok; you're the one using this script most often, if you're willing to maintain it i'm ok with the change.

@jyn514 jyn514 added waiting-on-author If this PR was opened by an automation, the "author" is the assignee. and removed waiting-on-review labels Jun 30, 2026

@jyn514 jyn514 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@jyn514 jyn514 added waiting-on-ci and removed waiting-on-author If this PR was opened by an automation, the "author" is the assignee. labels Jul 10, 2026
@bors-ferrocene
bors-ferrocene Bot merged commit 31cd51a into main Jul 10, 2026
13 checks passed
@bors-ferrocene

Copy link
Copy Markdown
Contributor

Build succeeded:

@github-actions github-actions Bot added the backport:maybe PR candidate for backport label Jul 10, 2026
@bors-ferrocene
bors-ferrocene Bot deleted the ja-qnx-with-custom-qnx-build branch July 10, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants