Subject: misc/28727: building src/libexec/telnetd fails if MKKERBEROS4=no
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2004.salmi.ch>
List: netbsd-bugs
Date: 12/20/2004 22:18:00
>Number: 28727
>Category: misc
>Synopsis: building src/libexec/telnetd fails if MKKERBEROS4=no
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 20 22:18:00 +0000 2004
>Originator: Jukka Salmi
>Release: NetBSD 2.99.11
>Environment:
System: NetBSD himo.salmi.ch 2.99.11 NetBSD 2.99.11 (GENERIC) #0: Sat Dec 18 12:09:08 CET 2004 build@himo.salmi.ch:/build/nbsd/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
building src/libexec/telnetd fails if MKKERBEROS4 is set to 'no'
(for both HEAD and netbsd-2-0 sources): I'm getting undefined
references to des_new_random_key, des_ecb_encrypt, des_key_sched and
des_init_random_number_generator. These symbols seem to be in libdes;
however, -ldes is added to LDADD only if Kerberos IV is built.
>How-To-Repeat:
$ cd src/libexec/telnetd && make MKKERBEROS4=no dependall
[...]
# link telnetd/telnetd
/opt/tools/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o telnetd -Wl,-rpath-link,/opt/dst/lib:/opt/dst/usr/lib -L/opt/dst/lib -B/opt/dst/usr/lib/ -B/opt/dst/usr/lib/ authenc.o global.o slc.o state.o sys_term.o telnetd.o termstat.o utility.o -lutil -ltermcap /build/nbsd/lib/libtelnet/libtelnet.a -lkrb5 -lasn1 -lcrypto -lcom_err -L/build/nbsd/lib/libvers -lvers -lroken -L/opt/dst/usr/lib -L/opt/dst/usr/lib
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x167): In function `ofb64_start':
: undefined reference to `des_new_random_key'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x174): In function `ofb64_start':
: undefined reference to `des_ecb_encrypt'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x5d0): In function `ofb64_session':
: undefined reference to `des_key_sched'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x608): In function `ofb64_session':
: undefined reference to `des_init_random_number_generator'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x803): In function `fb64_stream_iv':
: undefined reference to `des_key_sched'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x838): In function `fb64_stream_key':
: undefined reference to `des_key_sched'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x8be): In function `cfb64_encrypt':
: undefined reference to `des_ecb_encrypt'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x929): In function `cfb64_decrypt':
: undefined reference to `des_ecb_encrypt'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0x9be): In function `ofb64_encrypt':
: undefined reference to `des_ecb_encrypt'
/build/nbsd/lib/libtelnet/libtelnet.a(enc_des.o)(.text+0xa21): In function `ofb64_decrypt':
: undefined reference to `des_ecb_encrypt'
collect2: ld returned 1 exit status
*** Failed target: telnetd
*** Failed command: /opt/tools/bin/i386--netbsdelf-gcc -Wl,-nostdlib -o telnetd -Wl,-rpath-link,/opt/dst/lib:/opt/dst/usr/lib -L/opt/dst/lib -B/opt/dst/usr/lib/ -B/opt/dst/usr/lib/ authenc.o global.o slc.o state.o sys_term.o telnetd.o termstat.o utility.o -lutil -ltermcap /build/nbsd/lib/libtelnet/libtelnet.a -lkrb5 -lasn1 -lcrypto -lcom_err -L/build/nbsd/lib/libvers -lvers -lroken -L/opt/dst/usr/lib -L/opt/dst/usr/lib
*** Error code 1
Stop.
nbmake: stopped in /usr/src/libexec/telnetd
*** Failed target: dependall
*** Failed command: cd /usr/src/libexec/telnetd; /opt/tools/bin/nbmake realall
*** Error code 1
Stop.
nbmake: stopped in /usr/src/libexec/telnetd
>Fix:
Not sure; maybe like this:
--- libexec/telnetd/Makefile.orig 2003-12-13 23:07:35.000000000 +0100
+++ libexec/telnetd/Makefile 2004-12-20 23:06:55.000000000 +0100
@@ -21,12 +21,12 @@
.if (${USE_KERBEROS} != "no")
CPPFLAGS+=-I${DESTDIR}/usr/include/krb5
CPPFLAGS+=-DKRB5 -DAUTHENTICATION -DENCRYPTION
-LDADD+= -lkrb5 -lasn1 -lcrypto
+LDADD+= -lkrb5 -lasn1 -lcrypto -ldes
DPADD+= ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO}
.if (${USE_KERBEROS4} != "no")
CPPFLAGS+=-DKRB4
-LDADD+= -lkrb -ldes
+LDADD+= -lkrb
DPADD+= ${LIBKRB} ${LIBDES}
.endif