<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Thanks Ralph, Henrik.<br>
<br>
Got over the first hurdle...<br>
Adding $(NETLIBS) worked just fine.<br>
<br>
Now I failed on the next... stackio.c<br>
<br>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I.
-I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a
-lresolv -lsocket -lnsl -lrt<br>
loadhosts_file.c: In function `load_hostnames':<br>
loadhosts_file.c:131: warning: 'insavchar' might be used
uninitialized in this function<br>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I.
-I../include -DSTANDALONE -o stackio stackio.c ./libxymon.a -lrt<br>
stackio.c: In function `stackfgets':<br>
stackio.c:424: warning: 'eolchar' might be used uninitialized in
this function<br>
stackio.c:440: warning: 'eolchar' might be used uninitialized in
this function<br>
Undefined first referenced<br>
symbol in file<br>
recv ./libxymon.a(sendmsg.o)<br>
getservbyname ./libxymon.a(sendmsg.o)<br>
gethostbyname ./libxymon.a(sendmsg.o)<br>
socket ./libxymon.a(sendmsg.o)<br>
getsockopt ./libxymon.a(sendmsg.o)<br>
connect ./libxymon.a(sendmsg.o)<br>
inet_aton ./libxymon.a(sendmsg.o)<br>
inet_ntoa ./libxymon.a(sendmsg.o)<br>
shutdown ./libxymon.a(sendmsg.o)<br>
ld: fatal: Symbol referencing errors. No output written to stackio<br>
collect2: ld returned 1 exit status<br>
make[1]: *** [stackio] Error 1<br>
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'<br>
make: *** [lib-build] Error 2<br>
<br>
<br>
- Roland<br>
<div class="moz-signature">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title>test</title>
<br>
<br>
</div>
On 20/09/11 03:46 PM, Henrik Størner wrote:
<blockquote cite="mid:4E7828BF.1040406@hswn.dk" type="cite">On
20-09-2011 02:03, Roland Soderstrom wrote:
<br>
<blockquote type="cite">
<br>
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
<br>
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I.
-I../include
<br>
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
<br>
Undefined first referenced
<br>
symbol in file
<br>
recv ./libxymon.a(sendmsg.o)
<br>
getservbyname ./libxymon.a(sendmsg.o)
<br>
</blockquote>
<br>
Oh dear - those Solaris network libraries ...
<br>
<br>
In lib/Makefile, you need to add "$(NETLIBS)" to the list of
libraries used for the "loadhosts" tool. It is line 66:
<br>
<br>
loadhosts: loadhosts.c libxymon.a
<br>
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c
./libxymon.a $(LIBRTDEF)
<br>
<br>
Change it to
<br>
<br>
loadhosts: loadhosts.c libxymon.a
<br>
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c
./libxymon.a $(NETLIBS) $(LIBRTDEF)
<br>
<br>
I'll have to dig up a Solaris box to see if the same has to be
done elsewhere.
<br>
<br>
<br>
Regards,
<br>
Henrik
<br>
_______________________________________________
<br>
Xymon mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
<br>
</blockquote>
</body>
</html>