Skip to content

(re)set environment variables used by cargo in prepare step of Cargo easyblock#3774

Merged
Micket merged 1 commit intoeasybuilders:developfrom
boegel:20250613154536_new_pr_cargo
Jun 13, 2025
Merged

(re)set environment variables used by cargo in prepare step of Cargo easyblock#3774
Micket merged 1 commit intoeasybuilders:developfrom
boegel:20250613154536_new_pr_cargo

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Jun 13, 2025

(created using eb --new-pr)

This fixes a failure in the RPATH sanity check for easyconfigs using CargoPythonPackage when Rust was built with stable channel (see also #3691), for example (with maturin-1.6.0-GCCcore-13.3.0.eb being installed on top of EESSI):

Sanity check failed: No '(RPATH)' found in 'readelf -d' output for /tmp/EESSI/software/maturin/1.6.0-GCCcore-13.3.0/bin/maturin

The underlying reason is that the path to gcc was being resolved too early, before the build environment that includes setting up the RPATH wrappers was set up (in prepare step), leading to the path to the non-wrapped gcc being picked up:

== 2025-06-13 13:18:55,563 environment.py:93 INFO Environment variable RUSTFLAGS set to -C target-cpu=native -C linker=/cvmfs/software.eessi.io/versions/2023.06/compat/linux/x86_64/usr/bin/gcc

The fix in #3698 is insufficient to deal with the fallout caused by #3691, because the load_module method in which the set_cargo_vars method is called is only used when extensions are being installed, so it only helps with installations done with CargoPythonBundle...

@boegel boegel added the bug fix label Jun 13, 2025
@boegel boegel added this to the next release (5.1.1?) milestone Jun 13, 2025
@boegel boegel added the EESSI Related to EESSI project label Jun 13, 2025
@boegel boegel requested a review from bedroge June 13, 2025 13:57
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Jun 13, 2025

Test report by @boegel

Overview of tested easyconfigs (in order)

  • SUCCESS maturin-1.6.0-GCCcore-13.3.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
node3611.doduo.os - Linux RHEL 9.4, x86_64, AMD EPYC 7552 48-Core Processor (zen2), Python 3.9.18
See https://gist.github.com/boegel/d0d21b0e4c082650823de47a8578f1e2 for a full test report.

Copy link
Copy Markdown
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

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

lgtm

@Micket Micket merged commit 2238d46 into easybuilders:develop Jun 13, 2025
17 checks passed
@boegel boegel deleted the 20250613154536_new_pr_cargo branch June 13, 2025 16:28
@boegel boegel changed the title (re)set environment variables used by Cargo in prepare step of Cargo easyblock (re)set environment variables used by cargo in prepare step of Cargo easyblock Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix EESSI Related to EESSI project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants