https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107616
Bug ID: 107616
Summary: c++tools: select not found breaks build
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
On hpux11.[0-2]*, the select declaration reside in <sys/time.h>. configure
only checks <sys/select.h>. As a result, select is not found:
configure:3623: checking for select
configure:3642: /home/dave/gnu/gcc/objdir64/./gcc/xg++
-B/home/dave/gnu/gcc/objdir64/./gcc/ -nostdinc++ -nostdinc++
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11
-I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/include/backward
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/util
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/src
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/libsupc++/.libs
-B/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs
-B/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/libsupc++/.libs
-B/opt/gnu64/gcc/gcc-13/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-13/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc/gcc-13/hppa64-hp-hpux11.11/include -isystem
/opt/gnu64/gcc/gcc-13/hppa64-hp-hpux11.11/sys-include -fchecking=1 -c -g -O2
conftest.cpp >&5
conftest.cpp:24:10: fatal error: sys/select.h: No such file or directory
24 | #include <sys/select.h>
| ^~~~~~~~~~~~~~
compilation terminated.
...
configure:3649: result: no
This exposes a problem in server.cc. The call to FD_ISSET at line 724
is not conditional on "#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)".