Skip to content

Commit 4e13c0e

Browse files
messensedavidhewitt
authored andcommitted
Link libpython for AIX target (#4073)
1 parent e501377 commit 4e13c0e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

newsfragments/4073.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fixes undefined symbol errors when building extension module on AIX by linking `libpython`

pyo3-build-config/src/impl_.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ pub fn is_linking_libpython() -> bool {
775775
/// Must be called from a PyO3 crate build script.
776776
fn is_linking_libpython_for_target(target: &Triple) -> bool {
777777
target.operating_system == OperatingSystem::Windows
778+
// See https://github.com/PyO3/pyo3/issues/4068#issuecomment-2051159852
779+
|| target.operating_system == OperatingSystem::Aix
778780
|| target.environment == Environment::Android
779781
|| target.environment == Environment::Androideabi
780782
|| !is_extension_module()

0 commit comments

Comments
 (0)