pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dukeastar@gmail.com
Subject: BUG #18086: compilation failed due to epoll_create1 not present
Date: Tue, 05 Sep 2023 10:59:54 +0000
Message-ID: <18086-345129dec3223b38@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18086
Logged by:          Duke Astar
Email address:      dukeastar@gmail.com
PostgreSQL version: 14.9
Operating system:   Linux x86
Description:        

Operating system: CentOS release 5.8 (Final) - Linux dev-linuxx86
2.6.18-308.el5 #1 SMP Tue Feb 21 20:05:41 EST 2012 i686 i686
Build options: from source code using default options for 'configure'

during make, compilation failed due to missing epoll_create1,  compilation
works in postgres 13.12

Below the error.
latch.c
latch.c: In function ‘CreateWaitEventSet’:
latch.c:763: warning: implicit declaration of function ‘epoll_create1’
latch.c:763: error: ‘EPOLL_CLOEXEC’ undeclared (first use in this
function)
latch.c:763: error: (Each undeclared identifier is reported only once
latch.c:763: error: for each function it appears in.)
make[4]: *** [latch.o] Error 1
make[4]: Leaving directory
`/home2/ctaillef/pgdbg/libs/postgresql-14.9/src/backend/storage/ipc'
make[3]: *** [ipc-recursive] Error 2
make[3]: Leaving directory
`/home2/ctaillef/pgdbg/libs/postgresql-14.9/src/backend/storage'
make[2]: *** [storage-recursive] Error 2
make[2]: Leaving directory
`/home2/ctaillef/pgdbg/libs/postgresql-14.9/src/backend'
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory
`/home2/ctaillef/pgdbg/libs/postgresql-14.9/src'
make: *** [all-src-recurse] Error 2

configure set macro HAVE_SYS_EPOLL_H when sys/epoll.h is present
and in src/backend/storageipc/latch.c 
HAVE_SYS_EPOLL_H define WAIT_USE_EPOLL 
and WAIT_USE_EPOLL use have 'epoll_create1' which is not present on the
operating system, only first version is present 'epoll_create'

I compared source code between 13.2 and 14.9 and I saw the ifdef
EPOLL_CLOEXEC section was removed, which was a previous constraint which use
epoll_create if not defined instead of epoll_create1 .

Workaround 
As a workaround I found that i can set -DWAIT_USE_POLL during configure to
use poll instead epoll but I think that's lead to performance issue.

Thanks by advance,
Regards



view thread (3+ messages)  latest in thread

Message-ID: <18086-345129dec3223b38@postgresql.org>
Permalink:  ../18086-345129dec3223b38@postgresql.org/
Also on:    postgresql.org/message-id/18086-345129dec3223b38@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dukeastar@gmail.com
  Subject: Re: BUG #18086: compilation failed due to epoll_create1 not present
  In-Reply-To: <18086-345129dec3223b38@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox