Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build without examples fails on Gentoo with "error: ‘syscall’ was not declared in this scope" (multiple times) #2

Open
slaufmann opened this issue Apr 5, 2018 · 0 comments

Comments

@slaufmann
Copy link

After the default build failed I tried building fastflow without the examples as described in the Build.me file.
But the make command failed with the following errors:

[ 12%] Building CXX object tests/CMakeFiles/perf_test_noalloc.dir/perf_test_noalloc.cpp.o
In file included from /home/students/slaufmann/Software/mc-fastflow/tests/perf_test_noalloc.cpp:34:0:
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp: In function ‘long int ff_getThreadID()’:
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:37:37: error: ‘syscall’ was not declared in this scope
 #define gettid() syscall(__NR_gettid)
                                     ^
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:57:13: note: in expansion of macro ‘gettid’
     return  gettid();
             ^~~~~~
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp: In function ‘int ff_setPriority(int)’:
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:37:37: error: ‘syscall’ was not declared in this scope
 #define gettid() syscall(__NR_gettid)
                                     ^
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:123:39: note: in expansion of macro ‘gettid’
         if (setpriority(PRIO_PROCESS, gettid(),priority_level) != 0) {
                                       ^~~~~~
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp: In function ‘int ff_mapThreadToCpu(int, int)’:
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:37:37: error: ‘syscall’ was not declared in this scope
 #define gettid() syscall(__NR_gettid)
                                     ^
/home/students/slaufmann/Software/mc-fastflow/ff/mapping_utils.hpp:174:27: note: in expansion of macro ‘gettid’
     if (sched_setaffinity(gettid(), sizeof(mask), &mask) != 0)
                           ^~~~~~
make[2]: *** [tests/CMakeFiles/perf_test_noalloc.dir/build.make:63: tests/CMakeFiles/perf_test_noalloc.dir/perf_test_noalloc.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:281: tests/CMakeFiles/perf_test_noalloc.dir/all] Error 2
make: *** [Makefile:139: all] Error 2

My kernel version and system information as of uname -a is:
4.9.16-gentoo #1 SMP PREEMPT Fri Apr 21 13:14:04 CEST 2017 x86_64 Intel(R) Core(TM) i5-6260U CPU @ 1.80GHz GenuineIntel GNU/Linux

A full log of the terminal output can be found on this gist: https://gist.github.com/slaufmann/d8ddc91d9897fb8c629adecca6b4bd00#file-buildloggentoo_2

If I could help with providing any additional information please let me know.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant