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 warning for Python 3.5.2 during compilation
Type: Stage:
Components: Build Versions: Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: martin.panter, ncoghlan, wizzardx
Priority: normal Keywords: patch

Created on 2016-06-27 07:04 by wizzardx, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
no-preproc-test.patch martin.panter, 2016-06-27 09:25 review
Messages (4)
msg269356 - (view) Author: David (wizzardx) Date: 2016-06-27 07:04
Hi there.

3.5.1 final didn't have this problem, 3.5.2 final does have this problem.

I'm compiling Python 3.5.2 under Debian, and get this warning during the ./configure step:

---------------
configure: WARNING: linux/random.h: present but cannot be compiled
configure: WARNING: linux/random.h:     check for missing prerequisite headers?
configure: WARNING: linux/random.h: see the Autoconf documentation
configure: WARNING: linux/random.h:     section "Present But Cannot Be Compiled"
configure: WARNING: linux/random.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.python.org/ ##
configure: WARNING:     ## -------------------------------------- ##
---------------

Please check this?
msg269357 - (view) Author: David (wizzardx) Date: 2016-06-27 07:06
Forgot to mention - this is for Debian 4. A really old legacy system we're running, but where we like to use new versions of Python.
msg269364 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-06-27 09:25
FWIW adding a blank fourth argument in configure.ac silences this warning (and speeds up the configure run by 7%, or 4 s). But I don’t want to become an Autoconf nerd and I don’t know if this change could have negative consequences on other platforms (e.g. perhaps AC_INCLUDES_DEFAULT matters?).

Practically, I think you can ignore the warning. The include file is needed to use a new getrandom() syscall on Linux (see Issue 26839), but Python should fall back to older code if it cannot use getrandom().
msg274745 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2016-09-07 04:01
Presumably this also affects Python 3.6, as that includes the same headers during configure for the same reasons: to check if the getrandom() syscall is likely to be available.

#27990 is somewhat related, in that Linux makes this a bit difficult to do correctly on older systems - we may need an explicit "--with-getrandom" and corresponding "--without-getrandom" to make it easy for folks to override the system inspection logic in the configure script.
History
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71585
2016-09-07 04:01:08ncoghlansetnosy: + ncoghlan

messages: + msg274745
versions: + Python 3.6
2016-06-27 09:25:19martin.pantersetfiles: + no-preproc-test.patch

nosy: + martin.panter
messages: + msg269364

keywords: + patch
2016-06-27 07:06:36wizzardxsetmessages: + msg269357
2016-06-27 07:04:51wizzardxcreate