http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58996

            Bug ID: 58996
           Summary: [4.9 regression] build failure in libcilkrts
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: PHHargrove at lbl dot gov

I have an ancient x86 system running Red Hat 8.

This system's version of Linux and/or glibc lacks definitions of cpu_set_t and
CPU_SETSIZE:
$ grep -rl -e CPU_SETSIZE -e cpu_set_t /usr/include
[no output]

So, starting very recently, builds from SVN fail as shown below.

Of course I can (and will) work-around with with --disable-libclikrts.
However, I believe a configure probe for the required support would be
appropriate.

-Paul

libtool: compile:  /usr/local/pkg/upc/nightly/compiler/bld/./gcc/xgcc
-B/usr/local/pkg/upc/nightly/compiler/bld/./gcc/
-B/usr/local/pkg/upc/nightly/compiler/install/i686-pc-linux-gnu/bin/
-B/usr/local/pkg/upc/nightly/compiler/install/i686-pc-linux-gnu/lib/ -isystem
/usr/local/pkg/upc/nightly/compiler/install/i686-pc-linux-gnu/include -isystem
/usr/local/pkg/upc/nightly/compiler/install/i686-pc-linux-gnu/sys-include
"-DPACKAGE_NAME=\"Cilk Runtime Library\""
-DPACKAGE_TARNAME=\"cilk-runtime-library\" -DPACKAGE_VERSION=\"2.0\"
"-DPACKAGE_STRING=\"Cilk Runtime Library 2.0\""
-DPACKAGE_BUGREPORT=\"c...@intel.com\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"cilk-runtime-library\" -DVERSION=\"2.0\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -I.
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/include
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/config/x86
-DIN_CILK_RUNTIME=1 -D_Cilk_spawn= -D_Cilk_sync= -D_Cilk_for=for -fcilkplus
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/include
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime
-I/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/config/x86
-DIN_CILK_RUNTIME=1 -D_Cilk_spawn= -D_Cilk_sync= -D_Cilk_for=for -fcilkplus
-std=c99 -O2 -g -O0 -MT os-unix.lo -MD -MP -MF .deps/os-unix.Tpo -c
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c 
-fPIC -DPIC -o .libs/os-unix.o
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c: In
function 'linux_get_affinity_count':
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:311:5:
error: unknown type name 'cpu_set_t'
     cpu_set_t process_mask;
     ^
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:314:5:
warning: passing argument 3 of 'sched_getaffinity' from incompatible pointer
type [enabled by default]
     int err = sched_getaffinity (tid, sizeof(process_mask),&process_mask);
     ^
In file included from /usr/include/pthread.h:20:0,
                 from
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:75:
/usr/include/sched.h:72:12: note: expected 'long unsigned int *' but argument
is of type 'int *'
 extern int sched_getaffinity (__pid_t __pid, unsigned int __len,
            ^
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:328:21:
error: 'CPU_SETSIZE' undeclared (first use in this function)
     for (i = 0; i < CPU_SETSIZE; i++)
                     ^
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:328:21:
note: each undeclared identifier is reported only once for each function it
appears in
/usr/local/pkg/upc/nightly/compiler/gupc-src/libcilkrts/runtime/os-unix.c:330:9:
warning: implicit declaration of function 'CPU_ISSET'
[-Wimplicit-function-declaration]
         if (CPU_ISSET(i, &process_mask))
         ^
make[2]: *** [os-unix.lo] Error 1

Reply via email to