Re: Radius 1.16 with dbm support

John D Schneider (jdschn@dilbert.monsanto.com)
Wed, 29 Jan 1997 11:40:38 -0600

Hi,
As a follow up to my message yesterday:
> Greetings,
> I am trying to make radius 1.16 with the dbm support, to improve the performance of our
> server. I am building it on a Sparc 2 running Solaris 2.4. I know, it isn't a very fast
> box anyway, that is why I need the dbm support ;-).
> At first the make complained about not being able to fine the dbm.h file, but I
> found it in /usr/ucbinclude, and also the dbm library in /usr/ucblib, but after I added
> /usr/ucblib to my LD_LIBRARY_PATH, it still won't build. Below is a console:
>
> root@srvsn2 (49)# export LD_LIBRARY_PATH=/usr/ucblib:/usr/lib
> root@srvsn2 (50)# env
> _=/bin/env
> HZ=100
> PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/ucb:/usr/ccs/bin:/usr/bin/X11:/usr/local:/usr/local/bin:/etc
> WINDOWID=37748749
> LOGNAME=root
> MAIL=/var/mail/root
> DISPLAY=137.35.195.169:0.0
> SHELL=/bin/ksh
> HOME=/
> LD_LIBRARY_PATH=/usr/ucblib:/usr/lib
> TERM=xterm
> PWD=/usr/local/src/radius/src
> TZ=US/Central
> root@srvsn2 (51)# which make
> /usr/ccs/bin/make
> root@srvsn2 (52)# make dbm
> gcc -traditional -O -Dsys5 -o radiusd.dbm radiusd.o dict.o usersdbm.o util.o md5.o attrprint.o acct.o versiondbm.o -lndbm -lnsl -lsocket
> ld: fatal: library -lndbm: not found
> ld: fatal: File processing errors. No output written to radiusd.dbm
> make: *** [radiusd.dbm] Error 1
> root@srvsn2 (53)# ls /usr/ucblib
> libcurses.a libucb.a llib-ldbm llib-ltermcap.ln
> libdbm.a libucb.so@ llib-ldbm.ln llib-lucb
> librpcsoc.so@ libucb.so.1* llib-lrpcsoc llib-lucb.ln
> librpcsoc.so.1* llib-lcurses llib-lrpcsoc.ln ucblinks.awk
> libtermcap.a llib-lcurses.ln llib-ltermcap ucblinks.sh*
> root@srvsn2 (54)# ls -al /usr/ucblib
> total 734
> drwxr-xr-x 2 bin bin 512 Aug 13 10:18 ./
> drwxr-xr-x 38 root root 1024 Aug 13 10:40 ../
> -rw-r--r-- 1 bin bin 91768 Jul 15 1994 libcurses.a
> -rw-r--r-- 1 bin bin 10132 Jul 15 1994 libdbm.a
> lrwxrwxrwx 1 root other 16 Aug 13 10:18 librpcsoc.so -> ./librpcsoc.so.1*
> -rwxr-xr-x 1 bin bin 24268 Jul 15 1994 librpcsoc.so.1*
> -rw-r--r-- 1 bin bin 10378 Jul 15 1994 libtermcap.a
> -rw-r--r-- 1 bin bin 96346 Feb 11 1996 libucb.a
> lrwxrwxrwx 1 root other 13 Aug 13 10:18 libucb.so -> ./libucb.so.1*
> -rwxr-xr-x 1 bin bin 55632 Feb 11 1996 libucb.so.1*
> -rw-r--r-- 1 bin bin 5895 Jul 15 1994 llib-lcurses
> -rw-r--r-- 1 bin bin 5933 Jul 15 1994 llib-lcurses.ln
> -rw-r--r-- 1 bin bin 544 Jul 15 1994 llib-ldbm
> -rw-r--r-- 1 bin bin 1201 Jul 15 1994 llib-ldbm.ln
> -rw-r--r-- 1 bin bin 1721 Jul 15 1994 llib-lrpcsoc
> -rw-r--r-- 1 bin bin 4148 Jul 15 1994 llib-lrpcsoc.ln
> -rw-r--r-- 1 bin bin 596 Jul 15 1994 llib-ltermcap
> -rw-r--r-- 1 bin bin 747 Jul 15 1994 llib-ltermcap.ln
> -rw-r--r-- 1 bin bin 5475 Jul 15 1994 llib-lucb
> -rw-r--r-- 1 bin bin 36099 Jul 15 1994 llib-lucb.ln
> [2~[2~-rw-r--r-- 1 root sys 5163 Jul 16 1994 ucblinks.awk
> -rwxr--r-- 1 root sys 6022 Jul 16 1994 ucblinks.sh*
> root@srvsn2 (55)
>
> So the library seems to be there, and is in LD_LIBRARY_PATH. Can anyone spot what
> obvious mistake I must be making? Why can't 'ld' find it?
>
> Are there any other special instructions or patches I need to get the dbm support
> to work correctly?
>
> Thanks in advance,
>
>
> John
>

I took my radius directories to another machine and tried the same build, and it had
no problem seeing picking the libraries from the LD_LIBRARY_PATH. So there is something
missing in the OS (a patch maybe?) from that Solaris machine.

But on the second machine, although it found then libraries OK, it had the following
problem:

# make dbm
gcc -traditional -O -Dsys5 -o radiusd.dbm radiusd.o dict.o usersdbm.o util.o md5.o attrprint.o acct.o versiondbm.o -ldbm -lnsl -lsocket
Undefined first referenced
symbol in file
bzero /usr/ucblib/libdbm.a(dbm.o)
ld: fatal: Symbol referencing errors. No output written to radiusd.dbm
*** Error code 1
make: Fatal error: Command failed for target `radiusd.dbm'
#

So there is obviously something wrong with the library. Is there a patch for this,
or some other fix?

Thanks in advance,

John

*******************************************************************************
* John D. Schneider Internet: jdschn@dilbert.monsanto.com *
* Monsanto Company Telephone: (314)694-8725 *
*-----------------------------------------------------------------------------*
* Disclaimer: If you think I am a spokesperson for the Monsanto Company, its *
* subsidiaries, management, or lackeys, you are sadly mistaken. *
*******************************************************************************