ssrg-vt / hermitux

A binary-compatible unikernel
https://ssrg-vt.github.io/hermitux/
393 stars 28 forks source link

Undefined reference to pthread_attr_setaffinity #27

Closed p-jacquot closed 3 years ago

p-jacquot commented 3 years ago

When I tried to compile Bots benchmarks with GCC's OpenMP runtime, I got this error :

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/./libgomp.a(affinity.o): in function `gomp_init_thread_affinity':
(.text+0x15): undefined reference to `pthread_attr_setaffinity_np'
collect2: error: ld returned 1 exit status

By snooping around on Internet and Hermitux' source code, I found that there is no pthread_attr_setaffinity_np.c file, in hermitux/musl/src/thread folder.

Maybe creating this file, and implementing the pthread_attr_setaffinity() function could resolve the problem. I'll try to look at what this function is supposed to do if I have the time.

olivierpierre commented 3 years ago

Hello, this is a musl-related issue which is independant from HermiTux.