after some thinking and looking to that link: https://www.sourceware.org/ml/libc-alpha/2016-08/msg00236.html
I see that we do not know how many cpus will be there. And the more clean fix will be dynamic allocation instead of static arrays. Maxim. On 02/27/17 18:42, Marco Varlese wrote: > Cool. I posted here because it appeared strange to me to get that error... > > On my system I checked that: > CPU_SETSIZE is 4096 as first defined as __CPU_SETSIZE in bits/sched.h and then > as CPU_SETSIZE in sched.h > bits/sched.h:# define __CPU_SETSIZE 4096 > sched.h:# define CPU_SETSIZE __CPU_SETSIZE > > While ODP_CPUMASK_SIZE is 1024 as defined in platform/linux- > generic/include/odp/api/plat/cpumask_types.h > > Would you think it makes sense to increase the size of ODP_CPUMASK_SIZE to > 4096? > > > Cheers, > Marco > > On Mon, 2017-02-27 at 09:01 -0600, Bill Fischofer wrote: >>>> Thanks. I'm not sure if ODP has been tested in that environment. My guess >>>> is > it's something simple. That assert is testing sizeof(cpu_set_t) and it sounds > like that's different in Suse then, say, Ubuntu. >> >>> On Mon, Feb 27, 2017 at 8:47 AM, Marco Varlese <marco.varl...@suse.com> >>> wrote: >>> OS: openSUSE Leap 42.2 >>> Compiler: gcc-6 >>> Kernel: 4.10.0-rc4-1.g4f824f1-default >>> >>> >>> Cheers, >>> Marco >>> >>> On Mon, 2017-02-27 at 08:44 -0600, Bill Fischofer wrote: >>>> What environment are you running in (OS, compiler, service levels, etc.)? >>>>>>>>>> On Mon, Feb 27, 2017 at 8:35 AM, Marco Varlese >>>>>>>>>> <marco.varl...@suse.com> > wrote: >>>>> Hi, >>>>> >>>>> >>>>>>>>> I've pulled latest code from the git repo and got into a compile-time > error. >>>>> >>>>> >>>>> >>>>>>>>> I followed the steps provided in the README file under platform/linux- > generic >>>>> >>>>> which are: >>>>> >>>>> ./bootstrap >>>>> >>>>> ./configure >>>>> >>>>> ./make >>>>> >>>>> >>>>> >>>>> Please, see below the output of the compilation. >>>>> >>>>> >>>>> >>>>> CC _fdserver.lo >>>>> >>>>> CC _ishm.lo >>>>> >>>>> CC _ishmphy.lo >>>>> >>>>> CC odp_atomic.lo >>>>> >>>>> CC odp_barrier.lo >>>>> >>>>> CC odp_buffer.lo >>>>> >>>>> CC odp_byteorder.lo >>>>> >>>>> CC odp_classification.lo >>>>> >>>>> CC odp_cpu.lo >>>>> >>>>> CC odp_cpumask.lo >>>>> >>>>> In file included from /usr/include/features.h:365:0, >>>>> >>>>> from /usr/include/sched.h:22, >>>>> >>>>> from odp_cpumask.c:9: >>>>> >>>>> ./include/odp/api/debug.h:42:39: error: negative width in bit-field >>>>> >>>>> '__error_if_negative' >>>>> >>>>> #define ODP_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg) >>>>> >>>>> ^ >>>>> >>>>> odp_cpumask.c:24:1: note: in expansion of macro 'ODP_STATIC_ASSERT' >>>>> >>>>> ODP_STATIC_ASSERT(ODP_CPUMASK_SIZE >= CPU_SETSIZE, >>>>> >>>>> ^~~~~~~~~~~~~~~~~ >>>>> >>>>> ./include/odp/api/debug.h:42:39: error: negative width in bit-field >>>>> >>>>> '__error_if_negative' >>>>> >>>>> #define ODP_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg) >>>>> >>>>> ^ >>>>> >>>>> odp_cpumask.c:28:1: note: in expansion of macro 'ODP_STATIC_ASSERT' >>>>> >>>>> ODP_STATIC_ASSERT(sizeof(odp_cpumask_t) >= sizeof(cpu_set_t), >>>>> >>>>> ^~~~~~~~~~~~~~~~~ >>>>> >>>>> Makefile:906: recipe for target 'odp_cpumask.lo' failed >>>>> >>>>> make[1]: *** [odp_cpumask.lo] Error 1 >>>>> >>>>> >>>>> >>>>>>>>> I've also tried to pull the MONARCH LTS branch but I get exactly the > same >>>>> >>>>> result. >>>>> >>>>> >>>>> >>>>> Any thoughts or help on this would be much appreciated. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> Marco >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >>> >> >>