Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle lddtree error #794

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ignore = "0.4.18"
dialoguer = "0.9.0"
console = "0.15.0"
minijinja = "0.13.0"
lddtree = "0.2.5"
lddtree = "0.2.6"
cc = "1.0.72"
clap = { version = "3.0.13", features = ["derive", "env", "wrap_help"] }
clap_complete = "3.0.4"
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix missing Python submodule in wheel in [#772](https://github.com/PyO3/maturin/pull/772)
* Add support for specifying cargo manifest path in pyproject.toml in [#781](https://github.com/PyO3/maturin/pull/781)
* Add support for passing arguments to pep517 command via `MATURIN_PEP517_ARGS` env var in [#786](https://github.com/PyO3/maturin/pull/786)
* Fix auditwheel `No such file or directory` error when `LD_LIBRARY_PATH` contains non-existent paths in [#794](https://github.com/PyO3/maturin/pull/794)

## [0.12.6] - 2021-12-31

Expand Down
3 changes: 3 additions & 0 deletions src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub enum AuditWheelError {
/// This platform tag isn't defined by auditwheel yet
#[error("{0} compatibility policy is not defined by auditwheel yet, pass `--skip-auditwheel` to proceed anyway")]
UndefinedPolicy(String),
/// Failed to analyze external shared library dependencies of the wheel
#[error("Failed to analyze external shared library dependencies of the wheel")]
DependencyAnalysisError(#[source] lddtree::Error),
}

#[derive(Clone, Debug)]
Expand Down
4 changes: 3 additions & 1 deletion src/auditwheel/repair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ pub fn find_external_libs(
sysroot: PathBuf,
) -> Result<Vec<lddtree::Library>, AuditWheelError> {
let dep_analyzer = DependencyAnalyzer::new(sysroot);
let deps = dep_analyzer.analyze(artifact).unwrap();
let deps = dep_analyzer
.analyze(artifact)
.map_err(AuditWheelError::DependencyAnalysisError)?;
let mut ext_libs = Vec::new();
for (name, lib) in deps.libraries {
// Skip dynamic linker/loader and white-listed libs
Expand Down