Monday, 30 April 2012

SunOS/Solaris - Xymon make error (locator symbol referencing errors in xymond_worker.o)

Xymon is a piece of software for multiple platforms which allows system administrators to monitor resources and usage. Computer monitoring systems are used to repeatedly gather data from various monitored systems for the purpose of real-time incident notification, system health verification, performance analysis, and longitudinal capacity planning.

gcc -o ../client/xymond_client -Wl,-R/opt/csw/lib xymond_client.o xymond_worker.o xymond_buffer.o client_config.o ../lib/xymonclient.a -L/opt/csw/lib -lpcre -lresolv -lsocket -lnsl
Undefined first referenced
symbol in file
locator_serverdown xymond_worker.o
locator_serverup xymond_worker.o
locator_init xymond_worker.o
locator_register_server xymond_worker.o
ld: fatal: Symbol referencing errors. No output written to ../client/xymond_client
collect2: ld returned 1 exit status
gmake[1]: *** [../client/xymond_client] Error 1
gmake[1]: Leaving directory `/tmp/xymon/xymond'
gmake: *** [xymond-client] Error 2

I was receiving this error for Xymon versions: 4.2.3 to 4.3.7 when trying to make a client version of Xymon.

To repeat the process, this is exactly what I did...
1. SSH onto a Solaris box (SunOS servername 5.9 Generic_112233-05 sun4u sparc SUNW,Sun-Fire-V210) as root.

2. Unzip Xymon source and run configure for a client install "./configure --client"

3. 'gmake' to make the libraries.

The error relates to a missing symbol that requires referencing in the Makefile so gcc knows where to find the locator symbols.

Add "locator.o" to CLIENTLIBOBJS in lib/Makefile

Now you should be able to do a make.

No comments: