<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>&gt; Date: Wed, 6 Feb 2008 10:38:24 +0100<br>&gt; From: aquette.dev@gmail.com<br>&gt; To: k_dal2@hotmail.com<br>&gt; Subject: Re: [Nut-upsuser] USB UPS on Solaris<br>&gt; CC: nut-upsuser@lists.alioth.debian.org<br>&gt; <br>&gt; Hi Karl,<br>&gt; <br>&gt; 2008/2/6, Karl Dalen &lt;k_dal2@hotmail.com&gt;:<br>&gt; &gt;<br>&gt; &gt;  Hi Arnaud,<br>&gt; &gt;<br>&gt; &gt; Thanks for posting the README for nut on Solaris.<br>&gt; &gt; I'm using mostly Solaris machines and I found out about NUT<br>&gt; &gt; after I had already written a small application that reads<br>&gt; &gt; input reports from a hid compliant UPS. I did not use<br>&gt; &gt; libusb but used the usb_ugen interface directly.<br>&gt; <br>&gt; something like that ;-)<br>&gt; <br>&gt; ??????????????????????????????????????????????????????????<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&nbsp; usbhid-ups driver from this build on a real<br>Solaris 10 system.&nbsp; 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&nbsp;&nbsp;&nbsp; -I../include&nbsp; -I/usr/sfw/include -g -Dsolaris2 -I. -I/usr/sfw/i<br>nclude&nbsp; -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&nbsp; -I/usr/sfw/include -g -Dsolaris2 -I. -I/usr/sfw/in<br>clude&nbsp; -O -Wall -Wsign-compare&nbsp;&nbsp; -o snmp-ups&nbsp; 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>&gt; <br>&gt; &gt; Now, I would still be interested in getting the full nut,<br>&gt; &gt; in particular the usbhid-ups driver, to work under Solaris.<br>&gt; &gt; I recently successfully installed NUT on a Linux machine and<br>&gt; &gt; I'm using usbhid-ups there.<br>&gt; &gt;<br>&gt; &gt; I have a minor problem in building NUT for Solaris. I'm using<br>&gt; &gt; Solaris 10, update 3 From the make script I get the error:<br>&gt; &gt;<br>&gt; &gt; libtool: link: only absolute run-paths are allowed<br>&gt; &gt; gmake[1]: *** [snmp-ups] Error 1<br>&gt; &gt;<br>&gt; &gt; I'm installing as:<br>&gt; &gt; ./configure --with-usb=auto --prefix=/opt/inst/local/nut<br>&gt; &gt; --with-statepath=/var/ups --with-user=pdl --<br>&gt; &gt; with-group=pdl<br>&gt; <br>&gt; if you don't use snmp-ups, add '--without-snmp' to your configure options.<br>&gt; <br>&gt; Note that I'm interested in looking at your config.log and build<br>&gt; output since NUT 2.4 might face the same problem but on core features<br>&gt; (libupsclient, used by upsc/upsmon/...)<br>&gt; <br>&gt; &gt; /usr/sfw/bin/gmake<br>&gt; &gt;<br>&gt; &gt; Any idea on how to fix that? I saw in your README that you<br>&gt; &gt; referred to the distribution file as 'nut-2.1.0-Solaris_USB.tar.gz'<br>&gt; &gt; Is there a special version for Solaris I should use ?<br>&gt; <br>&gt; now, that's simply a README I've made for an MGE customer when I've<br>&gt; adapted usbhid-ups to Solaris. These kind of reference have to be<br>&gt; removed.<br>&gt; <br>&gt; &gt; I am using the regular nut-2.2.1.tar.gz source.<br>&gt; &gt;<br>&gt; &gt; Any help would be appreciated.<br>&gt; <br>&gt; Arnaud<br>&gt; -- <br>&gt; Linux / Unix Expert R&amp;D - MGE Office Protection Systems - http://www.mgeops.com<br>&gt; Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/<br>&gt; Debian Developer - http://people.debian.org/~aquette/<br>&gt; 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>