Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Build error with TCL 8.7 on Centos 6

Closed / Out of Date4832b53e8506df52504dea32777810b84bc20e73Created 9 years agoUpdated 42 days ago
Descriptionplain2018-01-05 15:03:15
Hi TCL group,

When building tcl 8.7 from source on Centos 6, I get this error:

tclEpollNotfy.c: In function 'PlatformEventsInit':
tclEpollNotfy.c:369: warning: implicit declaration of function 'pipe2'
tclEpollNotfy.c:369: error: 'O_CLOEXEC' undeclared (first use in this function)
tclEpollNotfy.c:369: error: (Each undeclared identifier is reported only once
tclEpollNotfy.c:369: error: for each function it appears in.)
tclEpollNotfy.c:374: warning: implicit declaration of function 'epoll_create1'
tclEpollNotfy.c:374: error: 'EPOLL_CLOEXEC' undeclared (first use in this 2
make: *** [tclEpollNotfy.o] Error 1

I asked the question on TCL community and they suggested I should open a ticket here. I need this resolved urgently since it is a blocker to some critical work I am handling. Need a patch asap. TIA
Referenced by1
  • 56aaaf407dTicket [a850726018] epoll availability detection in cross-compile environments status still Open with 4 other changes ticket2020-06-19 05:55:53
dgpplain2018-01-07 15:24:31
Thank you for the bug report.

Tcl 8.7 is in pre-release "alpha" state.  What do you need it urgently for that Tcl 8.6.8 cannot do instead?

Or is this problem in that release as well?
dgpplain2018-01-07 15:26:08
I should have read more carefully. This appears to be a problem in the new epoll notifier, only in 8.7 sources.

Is it the epoll notifier you urgently need to use?
dgpplain2018-01-07 15:38:36
As a guess, I'd say Tcl's configure script is setting
NOTIFIER_EPOLL to choose the use of the epoll
notifier, while CentOS 6 might not be able to supply
epoll as Tcl needs it?

The workaround is to undefine that compiler directive
to fall back on the select() notifier.

And the bug that needs fixing is to get the configure
script to detect working epolls properly, and to offer
hand-configuration to override its choices, I think.
kjnashplain2020-06-18 20:24:54
I cannot reproduce this bug on CentOS 6 64-bit, x86_64, either for the e2d0c521 commit of 2018-01-04, or for 8.7a3, or for aed31dfc6d of 2020-06-16.  The file tclEpollNotfy.c compiles without errors or warnings.
andy (claiming to be Andy Goth)wiki2020-06-19 05:56:16
andy (claiming to be Andy Goth)plain2020-06-19 05:58:21
For kjnash: I'm having trouble when targeting 64-bit CentOS 5.6.  Here are the download links I used:

http://archive.kernel.org/centos-vault/5.6/isos/x86_64/CentOS-5.6-x86_64-bin-1of8.iso

(through 8of8.iso)
serhiy.storchakawiki2026-10-14 14:14:02

Not reproducible on CentOS 6 (see kjnash's comment). epoll_create1(), EPOLL_CLOEXEC and pipe2() need glibc 2.9 or later, so the error only happens on older systems such as CentOS 5, which is long out of support. To build there with the select notifier, run configure with ac_cv_header_sys_epoll_h=no. See also [a850726018] (epoll detection when cross-compiling).

serhiy.storchaka Ticket [4832b53e85]: 3 changes [History diff]2026-10-22 17:19:25
Log in (anonymous is fine) to add a comment.