[Nut-upsdev] minor building issues (svn HEAD revision 427)
Mike Patterson
mpatters at cs.uwaterloo.ca
Fri May 19 16:17:53 UTC 2006
While attempting to package up the HEAD version of nut for our
department/campus, I've run into a couple of minor issues with the
latest HEAD - I'm going to give it another whack at a PW9170+ UPS and
want to make sure I have the latest revision. :)
First is, whilst building the drivers (SNMP required), I get:
gmake[1]: Entering directory `/fsys2/source/nut-2.1/nut-2.1_cvs/drivers'
gmake[1]: *** No rule to make target `net-snmp/net-snmp-config.h',
needed by `snmp-ups.o'. Stop.
gmake[1]: Leaving directory `/fsys2/source/nut-2.1/nut-2.1_cvs/drivers'
gmake: *** [build] Error 1
Doing a "gmake depend" in the drivers subdirectory fixes things up, but
leads to the next problem (which I've had for a while). Output:
gcc -I../include -O -Wall -Wsign-compare -g -Dsolaris2
-I/software/openssl-0.9.7_runtime/include -I.
-I/software/netsnmp-5.3/include -o snmp-ups snmp-ups.o main.o dstate.o \
../common/state.o ../common/upsconf.o ../common/parseconf.o \
../common/common.o ../common/setenv.o ../common/inet_aton.o
-lnsl -lsocket -L/software/openssl-0.9.7_runtime/lib
-R/software/openssl-0.9.7_runtime/lib:/software/libz-1.1.4_runtime/lib
-L/software/netsnmp-5.3/lib -lnetsnmp -lgen -lcrypto -lkstat -lelf -lm
-lnsl -lsocket -ladm
ld: fatal: symbol `setenv' is multiply-defined:
(file ../common/setenv.o type=FUNC; file
/software/netsnmp-5.3/lib/libnetsnmp.a(system.o) type=FUNC);
ld: fatal: File processing errors. No output written to snmp-ups
I can fix this by changing the setenv() definition in common/setenv.c to
nut_setenv, and changing the calls to setenv() in client/upsmon.c
appropriately. I'm wondering if this is a known issue, or if perhaps
it's a problem related to our environment (which is weird and wonderful
and largely unknown to me)? Should I submit a patch?
thanks,
Mike
--
...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning. - Matt Welsh
More information about the Nut-upsdev
mailing list