i build Redis on suse 11 sp4 and got error :
networking.o: In function `IOThreadMain':
/data/redis/src/networking.c:3058: undefined reference to `pthread_setname_np'
bio.o: In function `bioProcessBackgroundJobs':
/data/redis/src/bio.c:165: undefined reference to `pthread_setname_np'
/data/redis/src/bio.c:159: undefined reference to `pthread_setname_np'
/data/redis/src/bio.c:162: undefined reference to `pthread_setname_np'
collect2: error: ld returned 1 exit status
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/data/redis/src'
make: *** [all] Error 2
system info:
70461d7ac821:/data/redis # uname -a
Linux 70461d7ac821 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
70461d7ac821:/data/redis # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 SP4 (x86_64) - Kernel \r (\l).
and i found pthread_setname_np does not exist in libpthread-2.11.3.so
70461d7ac821:/lib64 # ll | grep thread
-rwxr-xr-x 1 root root 135764 Apr 24 2015 libpthread-2.11.3.so
lrwxrwxrwx 1 root root 20 Dec 29 2017 libpthread.so.0 -> libpthread-2.11.3.so
-rwxr-xr-x 1 root root 36714 Apr 24 2015 libthread_db-1.0.so
lrwxrwxrwx 1 root root 19 Dec 29 2017 libthread_db.so.1 -> libthread_db-1.0.so
70461d7ac821:/lib64 # strings libpthread-2.11.3.so | grep pthread_setname_np
70461d7ac821:/lib64 #
is libpthread too old ?
Comment From: zeekling
i try to fix on https://github.com/redis/redis/pull/9094 ,and it build success.
Comment From: zeekling
i close this issue.