0
最近尝试使用alpine镜像组建tengine容器,但是在编译时报错,如下:
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \
-o objs/src/os/unix/ngx_user.o \
src/os/unix/ngx_user.c
src/os/unix/ngx_user.c: In function 'ngx_libc_crypt':
src/os/unix/ngx_user.c:35:7: error: 'struct crypt_data' has no member named 'current_salt'
cd.current_salt[0] = ~salt[0];
^
objs/Makefile:834: recipe for target 'objs/src/os/unix/ngx_user.o' failed
make[1]: *** [objs/src/os/unix/ngx_user.o] Error 1
make[1]: Leaving directory '/usr/src/tengine-2.1.2'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
经过查证,是glibc的一个bug,上游Nginx官方已经修复了这个问题,代码如下
cd.initialized = 0;
#ifdef __GLIBC__
/* work around the glibc bug */
cd.current_salt[0] = ~salt[0];
#endif
望早日修复