[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem building 0.4e with openssl crypto + krb4



On Fri, Mar 15, 2002 at 02:45:36PM +0100, Torbjörn Moa wrote:
> Hi,
> 
> I am having problems building 0.4e with kaserver (krb4) support on a
> Linux (RH 7.2) box. What I see is that configure refuses to acknowledge
> the existence of the krb4 installation. A snip from config.log:
> 
> configure:16986: gcc  -o conftest -I/usr/athena/include -g -O2  
> conftest.c -L/usr/athena/lib -lkrb -ldes -lresolv  >&5
> /usr/bin/ld: cannot find -ldes
> collect2: ld returned 1 exit status
> configure:16989: $? = 1
> configure: failed program was:
> #line 16974 "configure"
> #include "confdefs.h"
> #include <krb.h>
> int
> main ()
> {
> 
>   ;
>   return 0;
> }
> 
> 
> The reason for the des library being missing is that I have openssl
> installed, so krb4 is using -lcrypto instead. (And so is the heimdal
> config, btw, but not in the krb4 check...). So hardcoding the des
> library (two places in configure.in) in the check for krb4 seems buggy
> to me. Or am I missing something...?
> 
> Not being an expert in autoconf et al., I would appreciate some help
> with a hack that would fix this without screwing up too much of the
> rest.

Try using the enclosed patch. It changes the configure script not
configure.in as I don't have the demanded version of autoconf. But it should
work. If your Openssl is installed in a non-standard place you will perhaps 
need to hint with something similar:
CPPFLAGS=-I/software/openssl-0.9.6/include \
LDFLAGS=-L/software/openssl-0.9.6/lib ../configure --enable-kaserver
--disable-shared --with-openssl=/software/openssl-0.9.6 \
--with-krb4=/software/krb4-1.1

--
Dan
--- heimdal-0.4e/configure.orig	Wed Feb 20 15:46:11 2002
+++ heimdal-0.4e/configure	Wed Feb 20 16:06:05 2002
@@ -16969,7 +16969,7 @@
 rm -f conftest.$ac_objext conftest.$ac_ext
 done
 for i in $lib_dirs; do
-	LIBS="-L$i -lkrb -ldes $save_LIBS"
+	LIBS="-L$i -lkrb -lcrypto $save_LIBS"
 	cat >conftest.$ac_ext <<_ACEOF
 #line 16974 "configure"
 #include "confdefs.h"
@@ -17030,7 +17030,7 @@
 	save_CFLAGS="$CFLAGS"
 	CFLAGS="$CFLAGS $INCLUDE_krb4"
 	save_LIBS="$LIBS"
-	LIBS="$LIB_krb4 -ldes $LIBS"
+	LIBS="$LIB_krb4 -lcrypto $LIBS"
 	EXTRA_LIB45=lib45.a
 
 	echo "$as_me:17036: checking for four valued krb_put_int" >&5
--- heimdal-0.4e/lib/vers/Makefile.am.orig	Wed Feb 20 16:18:37 2002
+++ heimdal-0.4e/lib/vers/Makefile.am	Wed Feb 20 16:18:55 2002
@@ -14,7 +14,7 @@
 if KRB5
 ## need to link with des here; otherwise, if krb4 is shared the link
 ## will fail with unresolved references
-make_print_version_LDADD = $(LIB_krb4) -ldes
+make_print_version_LDADD = $(LIB_krb4)
 endif
 endif
 
--- heimdal-0.4e/lib/vers/Makefile.in.orig	Wed Feb 20 16:18:42 2002
+++ heimdal-0.4e/lib/vers/Makefile.in	Wed Feb 20 16:19:07 2002
@@ -207,7 +207,7 @@
 
 noinst_PROGRAMS = make-print-version
 
-@KRB4_TRUE@@KRB5_TRUE@make_print_version_LDADD = @KRB4_TRUE@@KRB5_TRUE@$(LIB_krb4) -ldes
+@KRB4_TRUE@@KRB5_TRUE@make_print_version_LDADD = @KRB4_TRUE@@KRB5_TRUE@$(LIB_krb4)
 
 libvers_la_SOURCES = print_version.c
 subdir = lib/vers