Skip to content

Manually moving shared libraries to a multiarch libdir, eg, /usr/lib/x86_64-linux-gnu, breaks after 1.67 #109994

Closed
@cheese

Description

@cheese

Description

Debian deploys a multiarch schema. For Rust, librustc_driver-*.so and other shared libraries needed for rustc to run are installed to /usr/lib/x86_64-linux-gnu on x86_64. And rustlib directory is installed as /usr/lib/rustlib.

During Rust build, Debian just lets x.py install the shared libraries to /usr/lib, and then manually moves them to /usr/lib/x86_64-linux-gnu.

This works before 1.67.

But since 1.67, rustc will fail to find std crate, since rustc tries to find rustlib directory through a relative path based on librustc_driver-*.so. rustc guesses rustlib directory is /usr/lib/x86_64-linux-gnu/../lib/rustlib aka /usr/lib/lib/rustlib, which does not exist.

To work around this, Ubuntu deploys a downstream patch. But as discussed with @bjorn3, that patch actually breaks what Rust 1.67 trying to get.

I hope Rust upstream can provide a better solution for this installation schema to work without downstream patch.

Version it worked on

It most recently worked on: Rust 1.66.1

Version with regression

1.67

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions