| Summary: | python3-maturin: Add 'maturin' PEP-517 backend support | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Tim Orling <tim.orling> |
| Component: | devtools / tool chain | Assignee: | Tim Orling <tim.orling> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher, pascal.bach, ross.burton, warthog9 |
| Version: | 5.0 | ||
| Target Milestone: | 5.0 M2 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Tim Orling
2023-12-07 22:40:04 UTC
An additional (much deeper) functional test is at the tip of: https://git.yoctoproject.org/poky-contrib/log/?h=timo/maturin_wip https://git.yoctoproject.org/poky-contrib/commit/?h=timo/maturin_wip&id=395521b21afc2be8298ab16ca2c2ad3a75c28864 But that is currently failing for Rust _reasons_, not related to the test case most likely. Put that test case on a back burner for now. I was able to build https://github.com/eclipse-zenoh/zenoh-python using the https://git.yoctoproject.org/poky-contrib/log/?h=timo/maturin_1.4.0 branch. I had to run `bitbake python3-maturin-native -c update_crates` as the crate list seems to have been out of date. Everything else worked. @Pascal: Thank you for reminding me of the "obvious". I was just banging my head on the fetch failure... https://lore.kernel.org/openembedded-core/cover.1702791173.git.tim.orling@konsulko.com/T/#t https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6341 (failures were completely unrelated to maturin) Merged as of commit: https://git.yoctoproject.org/poky/commit/?id=7d881f0214f9761990e52595d33246700c4da15c From the prior series, the main issue was the bzip2-sys crate needed a debug path mapping from CARGO_HOME (used TARGET_DBGSRC_DIR/cargo_home/ as the mapped path) in order to not inject TMPDIR into DW_AT_dir in /usr/bin/.debug/maturin (which also had the side effect of causing reordering). This resulted in a non-reproducible build. The solution that actually worked was to set the path mapping in CFLAGS (both a patch to build.rs in bzip2-sys and higher level RUST_DEBUG_REMAP were also attempted). CFLAGS:append = "-fdebug-prefix-map=${CARGO_HOME}=${TARGET_DBGSRC_DIR}/cargo_home" The second issue was figuring out how to get the 'maturin develop' testsdk case to not be skipped, which requires a full Rust environment in the SDK. This turned out to be two things in addition to TOOLCHAIN_HOST_TASK (which are set on the AB): TOOLCHAIN_HOST_TASK:append = " nativesdk-python3-maturin" SDK_INCLUDE_TOOLCHAIN = '1' SDK_TOOLCHAIN_LANGS += 'rust' testimage and testsdk were tested on qemux86-64 and qemuarm64. rust.RustCompileTest.test_cargo_build and maturin.MaturinDevelopTest.test_maturin_develop failed on qemuarm64 (SDKMACHINE x86_64 and i686). |