Project

General

Profile

Actions

Bug #2528

closed

http_auth needs libcrypto also for 'SHA1()' and not only 'crypt()'

Added by dago over 10 years ago. Updated over 10 years ago.

Status:
Duplicate
Priority:
Normal
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

In lighttpd 1.4.33 the linking of mod_auth requires libcrypto.so. The necessity to link against libcrypto.so is held in CRYPT_LIB which is filled during configure-time:

AC_SEARCH_LIBS(crypt,crypt,[
  AC_CHECK_HEADERS([crypt.h],[
    AC_DEFINE([HAVE_CRYPT_H], [1])
  ])

  AC_DEFINE([HAVE_LIBCRYPT], [1], [libcrypt])
  if test "$ac_cv_search_crypt" != no; then
    test "$ac_cv_search_crypt" = "none required" || CRYPT_LIB="$ac_cv_search_crypt" 
  fi
])

The detection takes only the presence of crypt into account, which is in libc in Solaris and libcrypto is not pulled in, resulting in the following linker error:

/bin/bash ../libtool  --tag=CC   --mode=compile /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -DHAVE_VERSION_H -DLIBRARY_DIR="\"/opt/csw/lib/lighttpd\"" -DSBIN_DIR="\"/opt/csw/sbin\"" -I. -I..   -I/opt/csw/include -D_REENTRANT -D__EXTENSIONS__ -I/opt/csw/include -DOPENSSL_NO_KRB5 -I/opt/csw/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES  -xO3 -m32 -xarch=sparc -c -o http_auth.lo http_auth.c 
libtool: compile:  /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -DHAVE_VERSION_H -DLIBRARY_DIR=\"/opt/csw/lib/lighttpd\" -DSBIN_DIR=\"/opt/csw/sbin\" -I. -I.. -I/opt/csw/include -D_REENTRANT -D__EXTENSIONS__ -I/opt/csw/include -DOPENSSL_NO_KRB5 -I/opt/csw/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -xO3 -m32 -xarch=sparc -c http_auth.c  -KPIC -DPIC -o .libs/http_auth.o 
/bin/bash ../libtool  --tag=CC   --mode=link /opt/SUNWspro/bin/cc  -xO3 -m32 -xarch=sparc -module -export-dynamic -avoid-version -no-undefined -m32 -xarch=sparc -L/opt/csw/lib/lighttpd -L/opt/csw/lib -lsendfile -L/opt/csw/lib -o mod_auth.la -rpath /opt/csw/lib/lighttpd mod_auth.lo http_auth.lo  -lldap -llber liblightcomp.la -lresolv -lnsl -lsocket 
libtool: link: /opt/SUNWspro/bin/cc -G -z defs -h mod_auth.so -o .libs/mod_auth.so  .libs/mod_auth.o .libs/http_auth.o   -R/home/dam/mgar/pkg/lighttpd/trunk/work/solaris10-sparc/build-isa-sparcv8plus/lighttpd-1.4.33/src/.libs -R/opt/csw/lib/lighttpd -L/opt/csw/lib/lighttpd -L/opt/csw/lib -lsendfile -lldap -llber ./.libs/liblightcomp.so -lresolv -lnsl -lsocket -lc  -m32 -xarch=sparc -m32 -xarch=sparc  
Undefined                       first referenced  
 symbol                             in file
SHA1                                .libs/http_auth.o  (symbol belongs to implicit dependency /opt/csw/lib/libcrypto.so.1.0.0)  
ld: fatal: symbol referencing errors. No output written to .libs/mod_auth.so

I am unsure about the respective presences of SHA1 in other operating systems, probably a simple additional AC_SEARCH_LIBS(crypt,SHA1, [… CRYPT_LIB="$ac_cv_search_crypt"]) would be sufficient.


Related issues 1 (0 open1 closed)

Is duplicate of Bug #2517: Undefined symbols _SHA1Fixed2013-09-30Actions
Actions #1

Updated by stbuehler over 10 years ago

  • Status changed from New to Duplicate

crypt != crypto.

Actions

Also available in: Atom