From owner-freebsd-questions Tue Sep 24 04:16:09 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA15078 for questions-outgoing; Tue, 24 Sep 1996 04:16:09 -0700 (PDT) Received: from Campino.Informatik.RWTH-Aachen.DE (campino.Informatik.RWTH-Aachen.DE [137.226.225.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id EAA14982 for ; Tue, 24 Sep 1996 04:15:56 -0700 (PDT) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.31.2]) by Campino.Informatik.RWTH-Aachen.DE (RBI-Z-5/8.6.12) with ESMTP id NAA07124; Tue, 24 Sep 1996 13:16:06 +0200 Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.6.11/8.6.9) id NAA05548; Tue, 24 Sep 1996 13:22:44 +0200 Message-Id: <199609241122.NAA05548@gilberto.physik.rwth-aachen.de> Date: Tue, 24 Sep 1996 13:22:43 +0200 From: kuku@gilberto.physik.rwth-aachen.de (Christoph P. Kukulies) To: julian@whistle.com (Julian Elischer) Cc: questions@freebsd.org Subject: Re: Mysterious NON linking of DES In-Reply-To: <3247B15B.398A68D@whistle.com>; from Julian Elischer on Sep 24, 1996 3:00:59 -0700 References: <3247B15B.398A68D@whistle.com> X-Mailer: Mutt 0.44 Mime-Version: 1.0 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Julian Elischer writes: > I'm trying to link the SAMBA daemon with -static > (I just "bmaked" it so i can 'Crunch' samba with some other stuff > for a tiny system) > > the link line is as follows... > cc -DSMBLOGFILE=\"/var/log/log.smb\"\ > -DNMBLOGFILE=\"/var/log/log.nmb\"\ > -DCONFIGFILE=\"/data/net/samba/smb.conf\"\ > -DLMHOSTSFILE=\"/data/net/samba/lmhosts\"\ > -DLOCKDIR=\"/var/spool/lock\"\ > -DSMBRUN=\"/whistle/bin/smbrun\" -DWORKGROUP=\"WORKGROUP\"\ > -DGUEST_ACCOUNT=\"nobody\" -DFreeBSD \ > -DSMB_PASSWD=\"/whistle/bin/smbpasswd\"\ > -DSMB_PASSWD_FILE=\"/whistle/private/smbpasswd\"\ > -I/usr/image/whistle/include \ > -I/usr/prod/ia/whistle/bin/samba/source/smbd/../include\ > -I/usr/image/usr/include -o smbd server.o trans2.o message.o dir.o\ > printing.o locking.o ipc.o reply.o mangle.o chgpasswd.o password.o\ > -L/usr/image/usr/lib -static -lcrypt -ldes -L../smblib -lsmb > ^^^^^^^^^^^^^ > > smbencrypt.o: Undefined symbol `_des_set_odd_parity' referenced from > text segment > smbencrypt.o: Undefined symbol `_des_set_key' referenced from text > segment > smbencrypt.o: Undefined symbol `_des_ecb_encrypt' referenced from text > segment > smbencrypt.o: Undefined symbol `_des_set_key' referenced from text > segment > smbencrypt.o: Undefined symbol `_des_ecb_encrypt' referenced from text > segment > *** Error code 1 > > Now as plain as day, libdes.a and libcrypt.a are mentionned there.. > and if I do an nm on lindes.a i see: > # nm /usr/lib/libdes.a|grep _des_ecb_encrypt > U _des_ecb_encrypt > U _des_ecb_encrypt > 00000870 T _des_ecb_encrypt > # > > so the dammed thing is there.... > why can't it link? > If I lik without -static, it seems to work.. > but that's no good for me. I think you have to ommit -ldes and do the correct links in /usr/lib. Anyway it worked for me here: blues# ls -l /usr/lib/libcrypt* lrwxr-xr-x 1 bin bin 13 Sep 24 10:56 /usr/lib/libcrypt.a -> libdescrypt.a lrwxr-xr-x 1 bin bin 18 Sep 24 10:56 /usr/lib/libcrypt.so.2.0 -> libdescrypt.so.2.0 lrwxr-xr-x 1 bin bin 15 Sep 24 10:56 /usr/lib/libcrypt_p.a -> libdescrypt_p.a blues# # pwd # /u/kuku/samba-1.9.16p2/source # rm smbd # make Using CFLAGS = -O -DSMBLOGFILE="/usr/local/samba/var/log.smb" -DNMBLOGFILE="/usr/local/samba/var/log.nmb" -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DLMHOSTSFILE="/usr/local/samba/lib/lmhosts" -DLOCKDIR="/usr/local/samba/var/locks" -DSMBRUN="/usr/local/samba/bin/smbrun" -DWORKGROUP="WORKGROUP" -DGUEST_ACCOUNT="nobody" -DFreeBSD Using LIBS = -lcrypt Linking smbd > > > any pointers greatly appreciated.. > I'm going home and giving up for the night :) > > julian -- --Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de