This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: configure checks fail confusingly under --with-address-sanitizer if libasan is missing
Type: compile error Stage: patch review
Components: Build Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: matrixise, pmatos, twouters
Priority: normal Keywords: patch

Created on 2017-08-14 08:01 by pmatos, last changed 2022-04-11 14:58 by admin.

Pull Requests
URL Status Linked Edit
PR 12433 open matrixise, 2019-03-19 11:19
Messages (3)
msg300238 - (view) Author: Paulo Matos (pmatos) Date: 2017-08-14 08:01
On a Fedora 26 system, I run configure as:
$ ../configure --with-assertions --with-lto --with-pydebug --with-address-sanitizer --disable-ipv6

My pyconfig.h contains:
/* #undef HAVE_CLOCK */

/* Define to 1 if you have the `clock_getres' function. */
/* #undef HAVE_CLOCK_GETRES */

/* Define to 1 if you have the `clock_gettime' function. */
/* #undef HAVE_CLOCK_GETTIME */

/* Define to 1 if you have the `clock_settime' function. */
/* #undef HAVE_CLOCK_SETTIME */

/* Define if the C compiler supports computed gotos. */
/* #undef HAVE_COMPUTED_GOTOS */


When this happens, __PyTime_FromTimespec is undefined in pytime.c:747.
../Python/pytime.c:747:9: error: implicit declaration of function ‘_PyTime_FromTimespec’; did 
you mean ‘_PyTime_FromTimeval’? [-Werror=implicit-function-declaration]
     if (_PyTime_FromTimespec(tp, &ts, raise) < 0)
         ^~~~~~~~~~~~~~~~~~~~
         _PyTime_FromTimeval
cc1: some warnings being treated as errors
make[2]: *** [Makefile:1553: Python/pytime.o] Error 1
msg300239 - (view) Author: Paulo Matos (pmatos) Date: 2017-08-14 09:15
OK, the problem was the missing libasan which made quite a few checks fail. 

We should check for libasan before all other checks, when compiling with --with-address-sanitizer.
msg338347 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2019-03-19 12:31
Hi Paulo,

Could you try with the associated PR (12433)?

Thank you,
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75382
2019-03-19 12:31:17matrixisesetnosy: + twouters, matrixise
messages: + msg338347
2019-03-19 11:19:57matrixisesetkeywords: + patch
stage: patch review
pull_requests: + pull_request12388
2017-08-14 15:13:34r.david.murraysettitle: !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec -> configure checks fail confusingly under --with-address-sanitizer if libasan is missing
2017-08-14 09:15:22pmatossetmessages: + msg300239
2017-08-14 08:01:57pmatoscreate