/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
第二个报错点:
pthread_func.c: In function 'init_pthread_rwlock':
pthread_func.c:93:14: warning: implicit declaration of function 'pthread_rwlockattr_setkind_np'; did you mean 'pthread_rwlockattr_setpshared'? [-Wimplicit-function-declaration]
93 | if ((result=pthread_rwlockattr_setkind_np(attr.ptr,
//... 省略一些....
error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' undeclared (first use in this function)
以下是更具体的报错过程
+ cd /tmp/libfastcommon-1.0.55
+ ./make.sh
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o hash.o hash.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o chain.o chain.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o shared_func.o shared_func.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o ini_file_reader.o ini_file_reader.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o logger.o logger.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sockopt.o sockopt.c
In file included from sockopt.c:40:
/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
| ^~~~~~~
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o base64.o base64.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o sched_thread.o sched_thread.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o http_func.o http_func.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o md5.o md5.c
gcc -Wall -Wformat-truncation=0 -Wformat-overflow=0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O3 -c -o pthread_func.o pthread_func.c
pthread_func.c: In function 'init_pthread_rwlock':
pthread_func.c:93:14: warning: implicit declaration of function 'pthread_rwlockattr_setkind_np'; did you mean 'pthread_rwlockattr_setpshared'? [-Wimplicit-function-declaration]
93 | if ((result=pthread_rwlockattr_setkind_np(attr.ptr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pthread_rwlockattr_setpshared
pthread_func.c:94:4: error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' undeclared (first use in this function)
94 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP)) != 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pthread_func.c:94:4: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:69: pthread_func.o] Error 1
+ ./make.sh install
使用alpine:3.13编译ngixn带了这个模块
第一个报错点:
第二个报错点:
以下是更具体的报错过程