Xymon Mailing List Archive search

compilation error of xymon on solaris 10 sparc

3 messages in this thread

list Sailesh · Fri, 4 Nov 2011 15:52:33 +0400 ·
Hi,

 
I am compiling xymon 4.3.5 on solaris 10 sparc. Please see error below.

 
bash-3.00# gmake

CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
-I`pwd`/include -I/usr/local/include" LDFLAGS="" OSDEF="-DSunOS" RPATHOPT=""
PCREINCDIR="-I/usr/local/include" SSLFLAGS="-DHAVE_OPENSSL=1"
SSLINCDIR="-I/usr/local/ssl/include " SSLLIBS="-L/usr/local/ssl/lib -lssl
-lcrypto" NETLIBS="-lresolv -lsocket -lnsl" LIBRTDEF="-lrt"
XYMONTOPDIR="/xymon/hobbit" XYMONLOGDIR="/var/log/xymon"
XYMONHOSTNAME="T1000" XYMONHOSTIP="192.168.10.128" XYMONHOSTOS="sunos" gmake
-C lib all

gmake[1]: Entering directory `/xymon/xymon-4.3.5/lib'

gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
-I/xymon/xymon-4.3.5/include -I/usr/local/include -I. -I../include  -c -o
loadhosts.o loadhosts.c

loadhosts_file.c: In function `load_hostnames':

loadhosts_file.c:126: warning: 'insavchar' might be used uninitialized in
this function

ar cr libxymon.a osdefs.o acklog.o availability.o calc.o cgi.o cgiurls.o
clientlocal.o color.o crondate.o digest.o encoding.o environ.o errormsg.o
eventlog.o files.o headfoot.o xymonrrd.o holidays.o htmllog.o ipaccess.o
loadalerts.o loadhosts.o loadcriticalconf.o locator.o links.o matching.o
md5.o memory.o misc.o msort.o netservices.o notifylog.o readmib.o
reportlog.o rmd160c.o sendmsg.o sha1.o sha2.o sig.o stackio.o strfunc.o
suid.o timefunc.o timing.o tree.o url.o

ranlib libxymon.a || echo ""

ar cr xymonclient.a osdefs.o cgiurls.o color-client.o crondate.o digest.o
encoding.o environ-client.o errormsg.o holidays.o ipaccess.o loadhosts.o
md5.o memory.o misc.o msort.o rmd160c.o sendmsg.o sha1.o sha2.o sig.o
stackio.o strfunc.o suid.o timefunc-client.o tree.o locator.o

ranlib xymonclient.a || echo ""

gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
-I/xymon/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt

loadhosts_file.c: In function `load_hostnames':

loadhosts_file.c:126: warning: 'insavchar' might be used uninitialized in
this function

Undefined                       first referenced

symbol                             in file

recv                                ./libxymon.a(sendmsg.o)

getservbyname                       ./libxymon.a(sendmsg.o)

gethostbyname                       ./libxymon.a(sendmsg.o)

socket                              ./libxymon.a(sendmsg.o)

getsockopt                          ./libxymon.a(sendmsg.o)

connect                             ./libxymon.a(sendmsg.o)

inet_aton                           ./libxymon.a(sendmsg.o)

inet_ntoa                           ./libxymon.a(sendmsg.o)

shutdown                            ./libxymon.a(sendmsg.o)

ld: fatal: Symbol referencing errors. No output written to loadhosts

collect2: ld returned 1 exit status

gmake[1]: *** [loadhosts] Error 1

gmake[1]: Leaving directory `/xymon/xymon-4.3.5/lib'

gmake: *** [lib-build] Error 2

 
Regards,

Sailesh
list Martin Ward · Mon, 14 Nov 2011 15:12:09 +0000 ·
The modules it is complaining about exist in the libsocket and libnsl libraries. They are listed in the NETLIBS variable below so I would check the line that compiles the sendmsg.o module or the one that includes sendmsg.o as one of its compiled-in objects. You need to ensure that the NETLIBS variable is specified and that it is listed before the sendmsg.o module is listed.

The order that you list object files and libraries is important. If an object file a.o calls a module in object file b.o then a.o must be listed first in the compilation line, as in:
$ gcc c.c a.o b.o

This also applies for lilbraries.

|\/|


From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Sailesh
Sent: 04 November 2011 11:53
To: xymon at xymon.com
Subject: [Xymon] compilation error of xymon on solaris 10 sparc
Importance: High
quoted from Sailesh

Hi,

I am compiling xymon 4.3.5 on solaris 10 sparc. Please see error below.

bash-3.00# gmake
CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. -I`pwd`/include -I/usr/local/include" LDFLAGS="" OSDEF="-DSunOS" RPATHOPT="" PCREINCDIR="-I/usr/local/include" SSLFLAGS="-DHAVE_OPENSSL=1" SSLINCDIR="-I/usr/local/ssl/include " SSLLIBS="-L/usr/local/ssl/lib -lssl -lcrypto" NETLIBS="-lresolv -lsocket -lnsl" LIBRTDEF="-lrt" XYMONTOPDIR="/xymon/hobbit" XYMONLOGDIR="/var/log/xymon" XYMONHOSTNAME="T1000" XYMONHOSTIP="192.168.10.128" XYMONHOSTOS="sunos" gmake -C lib all
gmake[1]: Entering directory `/xymon/xymon-4.3.5/lib'
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. -I/xymon/xymon-4.3.5/include -I/usr/local/include -I. -I../include  -c -o loadhosts.o loadhosts.c
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:126: warning: 'insavchar' might be used uninitialized in this function
ar cr libxymon.a osdefs.o acklog.o availability.o calc.o cgi.o cgiurls.o clientlocal.o color.o crondate.o digest.o encoding.o environ.o errormsg.o eventlog.o files.o headfoot.o xymonrrd.o holidays.o htmllog.o ipaccess.o loadalerts.o loadhosts.o loadcriticalconf.o locator.o links.o matching.o md5.o memory.o misc.o msort.o netservices.o notifylog.o readmib.o reportlog.o rmd160c.o sendmsg.o sha1.o sha2.o sig.o stackio.o strfunc.o suid.o timefunc.o timing.o tree.o url.o
ranlib libxymon.a || echo ""
ar cr xymonclient.a osdefs.o cgiurls.o color-client.o crondate.o digest.o encoding.o environ-client.o errormsg.o holidays.o ipaccess.o loadhosts.o md5.o memory.o misc.o msort.o rmd160c.o sendmsg.o sha1.o sha2.o sig.o stackio.o strfunc.o suid.o timefunc-client.o tree.o locator.o
ranlib xymonclient.a || echo ""
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. -I/xymon/xymon-4.3.5/include -I/usr/local/include -I. -I../include  -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:126: warning: 'insavchar' might be used uninitialized in this function
Undefined                       first referenced
symbol                             in file
recv                                ./libxymon.a(sendmsg.o)
getservbyname                       ./libxymon.a(sendmsg.o)
gethostbyname                       ./libxymon.a(sendmsg.o)
socket                              ./libxymon.a(sendmsg.o)
getsockopt                          ./libxymon.a(sendmsg.o)
connect                             ./libxymon.a(sendmsg.o)
inet_aton                           ./libxymon.a(sendmsg.o)
inet_ntoa                           ./libxymon.a(sendmsg.o)
shutdown                            ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to loadhosts
collect2: ld returned 1 exit status
gmake[1]: *** [loadhosts] Error 1
gmake[1]: Leaving directory `/xymon/xymon-4.3.5/lib'
gmake: *** [lib-build] Error 2


Regards,
Sailesh

[Colt Disclaimer]
The message is intended for the named addressee only and may not be disclosed
to or used by anyone else, nor may it be copied in any way. The contents of
this message and its attachments are confidential and may also be subject to
legal privilege. If you are not the named addressee and/or have received this
message in error, please advise us by e-mailing user-51905b889b93@xymon.invalid and delete the
message and any attachments without retaining any copies. Internet
communications are not secure and Colt does not accept responsibility for this
message, its contents nor responsibility for any viruses. No contracts can be
created or varied on behalf of Colt Technology Services, its subsidiaries,
group companies or affiliates ("Colt") and any other party by email
communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate
potential viruses and unsolicited promotional emails. For more information
refer to www.colt.net or contact us on +44(0)20 7390 3900
list Henrik Størner · Mon, 14 Nov 2011 17:51:42 +0100 ·
I am compiling xymon 4.3.5 on solaris 10 sparc. Please see error below.
Apply this patch:

   cd xymon-4.3.5
   patch -p0 </tmp/solaris-435.diff


Regards,
Henrik
Attachments (1)