gh-96488: Fix build failure with older versions of GCC#98220
Closed
chrismile wants to merge 3 commits intopython:mainfrom
Closed
gh-96488: Fix build failure with older versions of GCC#98220chrismile wants to merge 3 commits intopython:mainfrom
chrismile wants to merge 3 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Author
|
It seems to me that the build failures for Tests / Windows (x64) and macOS are unrelated to this PR. Please correct me if I'm wrong. |
Contributor
|
Closing as per #96487 (comment) |
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.
This PR fixes #96488, microsoft/vcpkg#26573, rbgirshick/py-faster-rcnn#706, LSSTDESC/CCL#270. These issues happended when
runtime_library_dirswas used with distutils on systems with older versions of GCC not supporting the-Rflag.In rbgirshick/py-faster-rcnn#706, it was proposed to fix the problem by replacing the string "-R" in https://github.com/python/cpython/blob/main/Lib/distutils/unixccompiler.py#L261 by "-Wl,-R". However, the problem comes not from the fact that this line is wrong, but from
_is_gcc(compiler)not accepting the compiler nameccas a possibly valid alias for GCC. On Linux,ccis a symlink to the default C++ compiler. In this PR,ccis now resolved to the actually used compiler. Thus,_is_gccworks correctly now for the compiler aliascc, and usingruntime_library_dirsno longer results in compiler errors on older versions of GCC.