Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers.

default_max_processors_count = CPU_SETSIZE issue.

+1 vote
Hi, while building jevoisbase, it throws error of =

jevoisbase/Contrib/cpuinfo/src/linux/processors.c:81:55: error: ‘CPU_SETSIZE’ undeclared here (not in a function)
  static const uint32_t default_max_processors_count = CPU_SETSIZE;

Please help.

asked Aug 8, 2018 in Programmer Questions by sharmarahul98 (320 points)

1 Answer

0 votes
hum, sometimes we would get that kind of error when a package like darknet or tensorflow downloads a dependency and that dependency changes upstream. To avoid that, we download all our dependencies from a fixed git commit as opposed to using the latest, but installing tensorflow does download some additional deps.

So I just tried to run jevoisbase/Contrib/reinstall.sh and then rebuild-host.sh and rebuild-platform.sh and everything passed with no error.

Note that you would likely get this error if trying to compile for host but your host CPU is not x86_64 (e.g., you run rebuild-host.sh on an ARM-based host). Only x86_64 hosts are supported at this time.

Are you still getting the error? maybe something is out of sync with your install. Can you try the steps outlined here:


going through the steps we follow in the video. If you still have a problem, can you let us know when?
answered Aug 20, 2018 by JeVois (39,960 points)
I am getting the same issue. I managed to build `jevois` and was trying to build `jevoisbase`, and I see this error:

18%] Building C object CMakeFiles/jevoisbase.dir/Contrib/cpuinfo/src/linux/processors.c.o
/home/rahulrav/Workspace/Jevois/jevoisbase/Contrib/cpuinfo/src/linux/processors.c:81:55: error: ‘CPU_SETSIZE’ undeclared here (not in a function); did you mean ‘__CPU_SETSIZE’?
  static const uint32_t default_max_processors_count = CPU_SETSIZE;
CMakeFiles/jevoisbase.dir/build.make:1238: recipe for target 'CMakeFiles/jevoisbase.dir/Contrib/cpuinfo/src/linux/processors.c.o' failed
make[2]: *** [CMakeFiles/jevoisbase.dir/Contrib/cpuinfo/src/linux/processors.c.o] Error 1
hum, what kind of machine are you using, ubuntu version, and jevois version? We can't reproduce the issue here...
I am using Ubuntu 18.04.

This happens to be even when I clean build from scratch again.
I tried re-running Contrib/reinstall.sh as well, but that does not seem to help either.

I followed the YouTube video that iterates through all the steps to make sure that I did not miss something. I am stuck, and would appreciate some help.

Still need help on this one.
yes, we have been trying different linux versions but we just can't get that bug to ever show up here. Can you add a #define CPU_SETSIZE 4 in that file processors.c that is giving you the error, just above the error line, and see what happens? If that works, we will add a contrib patch to processors.c that will add that #define if CPU_SETSIZE is not already defined.
I was getting the same error after following the video tut. I added #define CPU_SETSIZE 4 in processors.c. It compiled just fine after that. Thanks.