Opened 6 years ago

Closed 6 years ago

#1556 closed defect (duplicate)

nginx doesn't build due to missing 'current_salt' in 'crypt_data' struct

Reported by: tao12345666333@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.13.x
Keywords: glic; build; fedora28 Cc:
uname -a: Linux bogon 4.16.8-300.fc28.x86_64 #1 SMP Wed May 9 20:23:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: openresty/1.13.6.2
built by gcc 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC)
built with OpenSSL 1.0.2o-fips 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.13 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.5 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-stream --with-stream_ssl_module --with-http_ssl_module

Description

When I build nginx on Fedora 28, I got some errors.

cc -c -I/home/tao/tools/openresty-1.13.6.2/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 -I/h[4947/13529]
s/openresty-1.13.6.2/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -W
no-unused-parameter -g -O2 -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR -DNDK_SET_VAR -DNDK_SET_VAR -DLUA_DEFAULT_PATH=$
"/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/$
sr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/$
sr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua"' -DLUA_DEFAULT_CPATH='"/usr/local/openresty/site/l$
alib/?.so;/usr/local/openresty/lualib/?.so"' -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I 
../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../ngx_lua-0.10.13/src/api -I /home/tao/tools/openresty-1.13.6.2/build/lu$
jit-root/usr/local/openresty/luajit/include/luajit-2.1 -I ../ngx_stream_lua-0.0.5/src/api -I objs \                        
        -o objs/src/os/unix/ngx_user.o \
        src/os/unix/ngx_user.c
src/os/unix/ngx_user.c: 在函数‘ngx_libc_crypt’中:
src/os/unix/ngx_user.c:26:7: 错误:‘struct crypt_data’没有名为‘current_salt’的成员
     cd.current_salt[0] = ~salt[0];
       ^
gmake[2]: *** [objs/Makefile:1197:objs/src/os/unix/ngx_user.o] 错误 1
gmake[2]: 离开目录“/home/tao/tools/openresty-1.13.6.2/build/nginx-1.13.6”
gmake[1]: *** [Makefile:8:build] 错误 2
gmake[1]: 离开目录“/home/tao/tools/openresty-1.13.6.2/build/nginx-1.13.6”
gmake: *** [Makefile:8:all] 错误 2

And I found the source code about this, at nginx-1.13.6/src/os/unix/ngx_user.c +26

#ifdef __GLIBC__
    /* work around the glibc bug */
    cd.current_salt[0] = ~salt[0];
#endif

The code add for the old ticket https://trac.nginx.org/nginx/ticket/685. Bug when I comment the code, the build is ok.

I have been installed glibc packges:

(Tao) ➜  ~ rpm -qa | grep glibc
glibc-common-2.27-8.fc28.x86_64
glibc-headers-2.27-8.fc28.x86_64
glibc-devel-2.27-8.fc28.x86_64
glibc-all-langpacks-2.27-8.fc28.x86_64
glibc-langpack-en-2.27-8.fc28.x86_64
glibc-2.27-8.fc28.x86_64

Change History (1)

comment:1 by Ruslan Ermilov, 6 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #1469.

Note: See TracTickets for help on using tickets.