Operating System - HP-UX
1854693 Members
8324 Online
104102 Solutions
New Discussion

Cistron Radius1.6.4 compile problem on HP-UX 11.00

 
SOLVED
Go to solution
joydeep raha
Occasional Contributor

Cistron Radius1.6.4 compile problem on HP-UX 11.00

Hi,

I am not being able to compile Cistron Radius 1.6.4 on HP-UX 11.00. while trying to compile it with Makefile.sunos5(since HP-UX makefile isn't available in the /src directory of Cistron-radius 1.6.4), it gives the following error:
After running make utility, the following error came :

#make
gcc -g -c auth.c
gcc -g -c timestr.c
gcc -g -c cache.c
gcc -o radiusd radiusd.o dict.o files.o util.o md5.o
attrprint.o acct.o radius.o pam.o log.o version.o proxy.o exec.o
auth.o timestr.o cache.o -lsocket -lnsl
/usr/bin/ld: Can't find library for -lsocket
collect2: ld returned 1 exit status
*** Error exit code 1

It's not being able to find the -l socket libraries.Can anyone help me out by providing the necessary libraries for HP-UX 11.00 required to compile cistron radius 1.6.4?

Regards
Joydeep


never give up !!!
8 REPLIES 8
Rainer_1
Honored Contributor
Solution

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

-lsocket and -lnsl are not valid for HP-UX
use instead -lsec

gcc -o radiusd radiusd.o dict.o files.o util.o md5.o attrprint.o acct.o radius.o pam.o log.o version.o
proxy.o exec.o auth.o timestr.o cache.o -lsec

or change in Makefile
LIBS = -lsocket -lnsl
to
LIBS = -lsec
joydeep raha
Occasional Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

thanks to Rainer, i could compile rad 1.6.4 with the -lsec entry in the Makefile.But it's
giving some other problem, i.e, install command for installing trhe various files in the respective directories is not happening.
When 'make install' is run at the command prompt of the respective directory, i gives the following error:
make install
# Install the binaries
install -d /usr/local/sbin
install: -d was not found anywhere!
*** Error exit code 2

Stop.
blrdev # cd /usr/local/sbin
blrdev # ll install
install not found
I didn't come across any -d option for install in HP-UX 11.00(ref man page of install)
.Could u pls suggest anything?

Thanks and regards
joydeep raha
never give up !!!
Rainer_1
Honored Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

download gnu fileutils because install HP-UX is not compatible with gnu install
http://hpux.cs.utah.edu/hppd/hpux/Gnu/fileutils-4.0.31/

and install it (swinstall -s ...)

change your PATH variable

PATH=/opt/fileutils/bin:$PATH

Then make install should work
joydeep raha
Occasional Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

Hi

I was able to compile a few of the files like radiusd,radwho etc by running make all. But when i do a 'make dbm' to build the radius.dbm file, i get errors which point at things the error of which is given below:
# make dbm
gcc -g -c builddbm.c
builddbm.c: In function `main':
builddbm.c:171: `datum' undeclared (first use in this function)
builddbm.c:171: (Each undeclared identifier is reported only once
builddbm.c:171: for each function it appears in.)
builddbm.c:171: parse error before `named'
builddbm.c:216: `named' undeclared (first use in this function)
builddbm.c:218: `contentd' undeclared (first use in this function)
*** Error exit code 1

Rainer,thanks once again for everything. Do i need to get all the gnuutils, the link of which u provided,or just some relevant ones?
Is it so that certain variables are not declared somehere in the build.dbm.c file?
Pls sugest some possible remedy for this.

thanks and regards
joydeep
never give up !!!
Rainer_1
Honored Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

Make a change in your Makefile

CFLAGS = -g -DNDBM
joydeep raha
Occasional Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

Hi Rainer,

Before putting the entry in CFLAGS, my makefile looked like this :
# Makefile Radius Makefile for Solaris 2.5.x
#

CC = gcc
CFLAGS = -g # -DNOSHADOW
LDFLAGS = # -s #tatic
LIBS = -lsec
LCRYPT =

DBM = #-DNDBM
DBMLIB = #-ldb

#PAM = -DPAM
#PAMLIB = -lpam

BINDIR = /usr/local/bin
SBINDIR = /usr/local/sbin

include Make.inc
after putting the CFLAGS = -DNDBM ,it compiled almost 90% of it and finally got stuck once again with the following error in the radiusd.h file:
# make dbm
gcc -g -DNDBM -c radiusd.c -o radiusddbm.o
gcc -g -DNDBM -c dict.c
gcc -g -DNDBM -o filesdbm.o -c files.c
gcc -g -DNDBM -c util.c
gcc -g -DNDBM -c md5.c
gcc -g -DNDBM -c attrprint.c
gcc -g -DNDBM -c acct.c
gcc -g -DNDBM -c radius.c
gcc -g -DNDBM -c pam.c
gcc -g -DNDBM -c log.c
gcc -g -DNDBM -o versiondbm.o -c version.c
gcc -g -DNDBM -c proxy.c
gcc -g -DNDBM -c exec.c
gcc -g -DNDBM -c auth.c
In file included from auth.c:36:
radiusd.h:102: conflicting types for `CLIENT'
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.2/include/rpc/clnt.h:225: previous declaration of `CLIENT'
*** Error exit code 1

Rainer, i must say u are really good man in HP-UX.i could compile almost everything excepting the last part.Earlier too,i faced this problem of previous declaration of 'CLIENT' while trying to do 'make'.i tried compiling by making 'CLIENT' to small letter, saved it and compile it.You will know the better reason for this error.Pls help me out.

Thanks and regards
joydeep
never give up !!!
Rainer_1
Honored Contributor

Re: Cistron Radius1.6.4 compile problem on HP-UX 11.00

make another change in Makfile

gcc -g -DNDBM -DNOSHADOW