Skip to content

Hard-coded strip path breaks Linux -> Darwin builds #131206

@rvolosatovs

Description

@rvolosatovs

I cross-compile code for Darwin from Linux, which now fails due to the strip path being hard-coded in latest nightly, which I believe is caused by this PR #130781

I expected to see this happen: successful compilation

Instead, this happened:

error: unable to run `/usr/bin/strip`: No such file or directory (os error 2)

https://github.com/rvolosatovs/nixify/actions/runs/11163623704/job/31031050404?pr=265

I'm not sure why /usr/bin/strip was chosen as the strip to use, as an end user - that is surprising, in fact I would have expected the strip from the environment to be used by default. If the intention is to set a default to a hardcoded path, then it looks like a configuration option must be provided.

Alternatively, perhaps cargo could use /usr/bin/strip if found and otherwise use strip from environment?

Version it worked on

It most recently worked on: 1.80.1

Version with regression

rustc --version --verbose:

cargo 1.83.0-nightly (80d82ca22 2024-09-27)

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.O-linuxOperating system: LinuxO-macosOperating system: macOSP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions