selectmodule build fails with the linux without epoll_create1(before kernel 2.6.27). building 'select' extension gcc -pthread -fPIC -fno-strict-aliasing -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I. -I/usr/local/include -I/home/wmatsumo/download/cpython/Include -I/home/wmatsumo/download/cpython -c /home/wmatsumo/download/cpython/Modules/selectmodule.c -o build/temp.linux-x86_64-3.7-pydebug/home/wmatsumo/download/cpython/Modules/selectmodule.o /home/wmatsumo/download/cpython/Modules/selectmodule.c: In function 'pyepoll_new': /home/wmatsumo/download/cpython/Modules/selectmodule.c:1306: error: 'EPOLL_CLOEXEC' undeclared (first use in this function) /home/wmatsumo/download/cpython/Modules/selectmodule.c:1306: error: (Each undeclared identifier is reported only once /home/wmatsumo/download/cpython/Modules/selectmodule.c:1306: error: for each function it appears in.) It seems due to the below change. http://bugs.python.org/issue20100 It have to check HAVE_EPOLL_CREATE1 is defined before using EPOLL_CLOEXEC.
I'm using Red Hat Enterprise. cat /proc/version Linux version 2.6.18-238.9.1.el5 (mockbuild@x86-002.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Mar 18 12:42:39 EDT 2011
Is this patch mergeable? I'm trialing the 3.7.0a4 build on some systems here and am unable to build due to this issue, on libc 2.12: ± /lib/libc.so.6 GNU C Library stable release version 2.12, by Roland McGrath et al. Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.4.6 20110731 XXXXXXXXXXXX. Compiled on a Linux 3.2.5 system on 2017-10-20. Available extensions: The C stubs add-on version 2.1.2. crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B RT using linux kernel aio
Ach; ignore the libc version below; that's a PEBKAC error on my part. The libc version on the system that's failing is older (and hard to get; just trust me, it's older) and doesn't have the relevant epoll value.
I merged a PR based on selectmodule.patch. Thanks Wataru Matsumoto for your contribution! Python 3.6 doesn't seem to be affected by the issue. I close the issue.