Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TCL 8.7 build errors on linux

77 views
Skip to first unread message

Mamta

unread,
Jan 5, 2018, 12:39:28 AM1/5/18
to
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

Any suggestions on how to resolve this? TIA

stefan

unread,
Jan 5, 2018, 6:37:56 AM1/5/18
to
on some ("old") linuxes, O_CLOEXEC seems to be defined only when #define _GNU_SOURCE is set before including fcntl.h. You should definitely open a ticket at https://core.tcl.tk/tcl/ticket

Stefan

upadhya...@gmail.com

unread,
Jan 5, 2018, 11:33:39 AM1/5/18
to
Interesting. Not sure if I am seeing something wrong, but the code does have _GNU_SOURCE defined:

#ifdef NOTIFIER_EPOLL

#define _GNU_SOURCE /* For pipe2(2) */
#include "tclInt.h"
#ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is
* in tclMacOSXNotify.c */

#include <fcntl.h>
#include <signal.h>
#include <sys/epoll.h>

NOTIFIER_EPOLL is set to 1 by the configure script

Ricardo kozmate.net

unread,
Jan 6, 2018, 6:11:06 AM1/6/18
to
Em 05/01/18 16:33, upadhya...@gmail.com escreveu:
> On Friday, January 5, 2018 at 5:37:56 AM UTC-6, stefan wrote:
[...]
>> on some ("old") linuxes, O_CLOEXEC seems to be defined only when #define _GNU_SOURCE is set before including fcntl.h. You should definitely open a ticket at https://core.tcl.tk/tcl/ticket
>>
>> Stefan
>
> Interesting. Not sure if I am seeing something wrong, but the code does have _GNU_SOURCE defined:
>
> #ifdef NOTIFIER_EPOLL
>
> #define _GNU_SOURCE /* For pipe2(2) */
> #include "tclInt.h"
> #ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is
> * in tclMacOSXNotify.c */
>
> #include <fcntl.h>
> #include <signal.h>
> #include <sys/epoll.h>
>
> NOTIFIER_EPOLL is set to 1 by the configure script
>

I do not know the source code. But from this excerpt alone I think we
can not be 100% sure that fcntl.h was not included before the #define.
It still may, provided that it gets included previously from some other
heading file.

--
{ricardo from kozmate.net}
0 new messages