<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<style>.hmmessage P{margin:0px;padding:0px}body.hmmessage{FONT-SIZE: 10pt;FONT-FAMILY:Tahoma}</style>(resent)<br><br>Hi Arnaud,<br><br>> Date: Wed, 6 Feb 2008 10:38:24 +0100<br>> From: aquette.dev@gmail.com<br>> To: k_dal2@hotmail.com<br>> Subject: Re: [Nut-upsuser] USB UPS on Solaris<br>> CC: nut-upsuser@lists.alioth.debian.org<br>> <br>> Hi Karl,<br>> <br>> 2008/2/6, Karl Dalen <k_dal2@hotmail.com>:<br>> ><br>> > Hi Arnaud,<br>> ><br>> > Thanks for posting the README for nut on Solaris.<br>> > I'm using mostly Solaris machines and I found out about NUT<br>> > after I had already written a small application that reads<br>> > input reports from a hid compliant UPS. I did not use<br>> > libusb but used the usb_ugen interface directly.<br>> <br>> something like that ;-)<br>> <br>> ??????????????????????????????????????????????????????????<br>http://developers.sun.com/solaris/developer/support/driver/docs/usbups_whitepaper.html<br><br>Yes I started with the usbups_whitepaper template. It needed a lot of modifications.<br>The endian assumed was big (for Sparc) but x86 has little endian among<br>other things and the report descriptor parsing I had to understand.<br><br>Now, I noticed two different problems in NUT: 1) when using '--without-snmp'<br>and 2) when not using '--without-snmp' option.<br><br>1) Looks good so far. After I fixed a compilation error in libusb.c the package<br>did build cleanly without errors or warnings for this configuration. Will have to wait<br>till tomorrow till I can try the usbhid-ups driver from this build on a real<br>Solaris 10 system. Will let you know if the USB interface works with my tripplite UPS.<br>I was using gcc 3.4.3 which comes with Solaris 10 (I also have gcc 4.2.1 installed<br>so I can try it on that version if needed).<br>The fix I did in libusb.c was simply to add in the beginning of libusb.c:<br>#ifdef SUN_LIBUSB<br>static void libusb_close();<br>#endif<br>since this function otherwise will be referenced further down before being defined.<br><br>2) With snmp, this is still not resolved. Although I'm personally not using snmp we still<br>want to have the whole package being built cleanly. I have attached the config.log for<br>this case:<br><br>setenv PATH '/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin:/opt/sfw/bin:/opt/inst/bin:/bin:/usr/bin:/opt/SUNWspro/b<br>in:/usr/ucb:/home/pdl/bin:/usr/dt/bin:/usr/sbin:/sbin:/usr/openwin/bin'<br>./configure --with-usb=auto --prefix=/opt/inst/local/nut --with-statepath=/var/ups --with-user=pdl --with-grou<br>p=pdl<br><br>/usr/sfw/bin/gmake<br><br>The error seems to occur at the generation of snmp-ups:<br>:<br>if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/usr/sfw/include -g -Dsolaris2 -I. -I/usr/sfw/i<br>nclude -O -Wall -Wsign-compare -MT snmp-ups.o -MD -MP -MF '.deps/snmp-ups.Tpo' -c -o snmp-ups.o snmp-ups.c; \<br>then mv -f '.deps/snmp-ups.Tpo' '.deps/snmp-ups.Po'; else rm -f '.deps/snmp-ups.Tpo'; exit 1; fi<br>/bin/bash ../libtool --tag=CC --mode=link gcc -I../include -I/usr/sfw/include -g -Dsolaris2 -I. -I/usr/sfw/in<br>clude -O -Wall -Wsign-compare -o snmp-ups snmp-ups.o ../common/libcommon.a ../common/upsconf.o ../common/p<br>arseconf.o ../common/state.o main.o dstate.o -R../lib -L/usr/sfw/lib -lnetsnmp -lgen -lpkcs11 -lkstat -lelf -l<br>m -ldl -lnsl -lsocket -ladm -lrt -lsocket -lnsl<br>libtool: link: only absolute run-paths are allowed<br>gmake[1]: *** [snmp-ups] Error 1<br>gmake[1]: Leaving directory `/opt/inst/packages/nut/nut-2.2.1/drivers'<br>gmake: *** [all-recursive] Error 1<br><br><br>Another thing: one path you might want to add in PATH in the Solaris readme is /opt/sfw/bin<br>since some gnu utilities get installed in /usr/sfw/bin and others in /opt/sfw/bin.<br><br>Thanks,<br>/Karl D.<br><br>> <br>> > Now, I would still be interested in getting the full nut,<br>> > in particular the usbhid-ups driver, to work under Solaris.<br>> > I recently successfully installed NUT on a Linux machine and<br>> > I'm using usbhid-ups there.<br>> ><br>> > I have a minor problem in building NUT for Solaris. I'm using<br>> > Solaris 10, update 3 From the make script I get the error:<br>> ><br>> > libtool: link: only absolute run-paths are allowed<br>> > gmake[1]: *** [snmp-ups] Error 1<br>> ><br>> > I'm installing as:<br>> > ./configure --with-usb=auto --prefix=/opt/inst/local/nut<br>> > --with-statepath=/var/ups --with-user=pdl --<br>> > with-group=pdl<br>> <br>> if you don't use snmp-ups, add '--without-snmp' to your configure options.<br>> <br>> Note that I'm interested in looking at your config.log and build<br>> output since NUT 2.4 might face the same problem but on core features<br>> (libupsclient, used by upsc/upsmon/...)<br>> <br>> > /usr/sfw/bin/gmake<br>> ><br>> > Any idea on how to fix that? I saw in your README that you<br>> > referred to the distribution file as 'nut-2.1.0-Solaris_USB.tar.gz'<br>> > Is there a special version for Solaris I should use ?<br>> <br>> now, that's simply a README I've made for an MGE customer when I've<br>> adapted usbhid-ups to Solaris. These kind of reference have to be<br>> removed.<br>> <br>> > I am using the regular nut-2.2.1.tar.gz source.<br>> ><br>> > Any help would be appreciated.<br>> <br>> Arnaud<br>> -- <br>> Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com<br>> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/<br>> Debian Developer - http://people.debian.org/~aquette/<br>> Free Software Developer - http://arnaud.quette.free.fr/<br><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>