bpo-31199: configure fails if libasan is not installed when --with-address-sanitizer is enabled#12433
bpo-31199: configure fails if libasan is not installed when --with-address-sanitizer is enabled#12433matrixise wants to merge 2 commits intopython:mainfrom
Conversation
…dress-sanitizer is enabled
|
Just to be sure, I have modified the |
|
@matrixise thanks for the pr. I am the bug reporter. Will give this a try. |
|
OK - LGTM |
|
@Yhg1s In the devguide, I saw you are the expert for the |
|
@vstinner or @ned-deily what do you think about this PR? |
ned-deily
left a comment
There was a problem hiding this comment.
The test is too platform-specific. For one, it fails on current macOS systems with the default clang even though the address sanitizer is available. (Apple no long ships any gcc as part of their developer tools.) Relevant output from config.log:
configure:10043: checking for --with-address-sanitizer
configure:10049: result: yes
configure:10065: checking for malloc in -lasan
configure:10090: clang -o conftest -fsanitize=address conftest.c -lasan -ldl >&5
conftest.c:102:6: warning: incompatible redeclaration of library function 'malloc' [-Wincompatible-library-redeclaration]
char malloc ();
^
conftest.c:102:6: note: 'malloc' is a builtin with type 'void *(unsigned long)'
1 warning generated.
ld: library not found for -lasan
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:10090: $? = 1
If a test is really needed here, perhaps a better approach would be to try to compile, link, and run a skeletal program using AC_RUN_IFELSE. There are examples of its use elsewhere in configure.ac.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
@ned-deily thank you, I will check on my MBP and I will come back with a feedback in maximum 3 days. |
|
@matrixise, friendly reminder of your last comment. 🙂 |
|
@matrixise ping |
|
This PR is stale because it has been open for 30 days with no activity. |
https://bugs.python.org/issue31199