<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Problem compiling radiusclient-ng on Solaris</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">hi all,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">it happens that i have to use an sun solaris 8 server for installing ser, radiusclient and freeradius.</FONT>

<BR><FONT SIZE=2 FACE="Arial">unfortunately i have got a problem while making radiusclient:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">make[2]: Entering directory `/var/home/tju/SER-Server/radiusclient-0.4.3/src'</FONT>

<BR><FONT SIZE=2 FACE="Arial">/bin/bash ../libtool --mode=link gcc&nbsp; -g -O2&nbsp;&nbsp; -o radlogin&nbsp; radlogin.o radius.o local.o ../lib/libradiusclient.la -lcrypt -lsocket -lnsl</FONT></P>

<P><FONT SIZE=2 FACE="Arial">gcc -g -O2 -o .libs/radlogin radlogin.o radius.o local.o&nbsp; ../lib/.libs/libradiusclient.so -lcrypt -lsocket -lnsl -R/usr/local/lib</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Undefined&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first referenced</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;symbol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in file</FONT>

<BR><FONT SIZE=2 FACE="Arial">strsep&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ../lib/.libs/libradiusclient.so</FONT>

<BR><FONT SIZE=2 FACE="Arial">ld: fatal: Symbol referencing errors. No output written to .libs/radlogin</FONT>

<BR><FONT SIZE=2 FACE="Arial">collect2: ld returned 1 exit status</FONT>

<BR><FONT SIZE=2 FACE="Arial">make[2]: *** [radlogin] Error 1</FONT>

<BR><FONT SIZE=2 FACE="Arial">make[2]: Leaving directory `/var/home/tju/SER-Server/radiusclient-0.4.3/src'</FONT>

<BR><FONT SIZE=2 FACE="Arial">make[1]: *** [all-recursive] Error 1</FONT>

<BR><FONT SIZE=2 FACE="Arial">make[1]: Leaving directory `/var/home/tju/SER-Server/radiusclient-0.4.3'</FONT>

<BR><FONT SIZE=2 FACE="Arial">make: *** [all] Error 2</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">normally the function strsep() should be declared at string.h....but solaris is different. there is no declaration of this function or i have not found it.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">does anyone had the same problem while compiling on a solaris? </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">regards</FONT>

<BR><FONT SIZE=2 FACE="Arial">thomas</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">PS: meanwhile i tried a quckfix and added the following code into %radiusclient%/lib/dict.c (which uses strsep):</FONT>
</P>

<P><SPAN LANG="de-at"><FONT FACE="Times New Roman">#ifndef HAVE_STRSEP </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">static char * </FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT FACE="Times New Roman">strsep(char **stringp, char *delim) { </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">char *start = *stringp; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">char *cp; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">char ch; </FONT></SPAN>
</P>

<P><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">if (start == NULL) </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">return NULL; </FONT></SPAN>
</P>

<P><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">for (cp = start; ch = *cp; cp++) { </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">if (strchr(delim, ch)) { </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">*cp++ = 0; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">*stringp = cp; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">return start; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">} </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#800080" FACE="Times New Roman">}</FONT><FONT FACE="Times New Roman"> </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">*stringp = NULL; </FONT></SPAN>

<BR><SPAN LANG="de-at">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Times New Roman">return start; </FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT COLOR="#800080" FACE="Times New Roman">}</FONT><FONT FACE="Times New Roman"> </FONT></SPAN>

<BR><SPAN LANG="de-at"><FONT FACE="Times New Roman">#endif </FONT></SPAN>
</P>

</BODY>
</HTML>