Fix missing libm linkage for _core extension on Linux#993
Open
Siyet wants to merge 1 commit intojcrist:mainfrom
Open
Fix missing libm linkage for _core extension on Linux#993Siyet wants to merge 1 commit intojcrist:mainfrom
Siyet wants to merge 1 commit intojcrist:mainfrom
Conversation
Add explicit -lm linkage for the _core C extension on non-Windows platforms. Fixes undefined symbol errors (nextafter, fmod, lround) on aarch64 Linux systems where libm is not implicitly linked. Closes jcrist#971
Author
|
CI failures are unrelated to this change:
All build, test, and wheel jobs pass across all platforms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-lmlinkage for the_coreC extension on non-Windows platformsnextafter,fmod,lround) on aarch64 Linux systems where libm is not implicitly linkedCloses #971
Test plan
Built and verified with
lddon two environments:Ubuntu 22.04 (WSL2, x86_64, gcc 11.4, Python 3.10):
libc.so.6libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6Ubuntu 24.04 (WSL2, x86_64, gcc 13.3, Python 3.12):
libc.so.6libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6Windows 11 (Python 3.12, AMD64):
Confirmed that
-lmis not added onwin32-librarieslist stays empty. libm is part of MSVC runtime, no explicit linkage needed.