bug? in configure script

Andrew Higginbotham andrew.p.higginbotham at gmail.com
Tue Jan 8 05:11:23 CET 2008


I was installing freeradius today and the only way I could get it to
recognize my ssl install, which is in a custom location, was to change
line 21268 of the 'configure' script to from


LIBS="-lssl -lcrypto $LIBS"

LIBS="-lssl $LIBS"

For some reason, even when I add '-lcrypto' to LDFLAGS it does not
work, which seems like a bug. Even stranger, config.log shows that
when this is done -lcrypto is being called:

 gcc -o conftest -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-I/usr/local/pkg/openssl/include -ldl -lcrypto
-L/usr/local/pkg/openssl/lib conftest.c -lssl -lnsl -lresolv
-lpthread >&5
/usr/local/pkg/openssl/lib/libssl.a(ssl_lib.o): In function
`SSL_CTX_set_cert_store':
ssl_lib.c:(.text+0x763): undefined reference to `X509_STORE_free'
/usr/local/pkg/openssl/lib/libssl.a(ssl_lib.o): In function
`SSL_CTX_get_ex_new_index':
ssl_lib.c:(.text+0x813): undefined reference to `CRYPTO_get_ex_new_index'
/usr/local/pkg/openssl/lib/libssl.a(ssl_lib.o): In function
`SSL_get_ex_new_index':

Note the '-lcrypto' in the gcc line. Now, without -lcrypto in LDFLAGS
but with the line changed in the configure script this part of
config.log becomes

configure:21297: gcc -o conftest -g -O2 -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -I/usr/local/pkg/openssl/include -ldl
-L/usr/local/pkg/openssl/lib conftest.c -lssl -lcrypto -lnsl -lresolv
-lpthread >&5
configure:21303: $? = 0
configure:21310: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:21313: $? = 0
configure:21320: test -s conftest
configure:21323: $? = 0
configure:21337: result: yes

The only difference that I can see is that '-lcrypto' is in a
different position now. Does order matter in this case?

~Andrew



More information about the Freeradius-Users mailing list