Fwd: [Nut-upsdev] newhidups / Solaris 10 / APC RM1500
Arnaud Quette
aquette.dev at gmail.com
Thu Mar 9 08:23:39 UTC 2006
I just realised that Marty sent it privately...
---------- Forwarded message ----------
From: Marty Lee <marty at upstart-solutions.co.uk>
Date: 7 mars 2006 10:49
Subject: Re: [Nut-upsdev] newhidups / Solaris 10 / APC RM1500
To: Arnaud Quette <aquette.dev at gmail.com>
Arnaud,
>> I had to make some simple updates to get newhidups to compile on
>> Solaris; is
>> anyone interested in getting these rolled into NUT and for a text
>> document on
>> how to configure nut/newhidups/Solaris 10 ?
>
> I didn't had much time to continue on this point, so yes, any
> (verbose) feedback is welcome...
>
> Arnaud
To get NUT 2.0.3 to compile on Solaris 10, I needed to do the following:
1. u_int16_t is not defined in the build environment and libusb.h
uses uint_16_t too. I've added the following to libhid.h
#ifndef u_int16_t
typedef uint16_t u_int16_t;
#endif
#ifndef u_int8_t
typedef uint8_t u_int8_t;
#endif
2. 'nanosleep' is in the 'rt' library, so I had to set up
LDFLAGS in drivers/Makefile to include '-lrt'
- this is obviously itching for a 'configure' test to make sure
that nanosleep is found somewhere appropriate
3. On Solaris 10, the libusb stuff is in /usr/sfw by default, and
configure finds it ok. It doesn't add a -R/usr/sfw/lib, so at run
time, the libraries are no longer found.
By setting 'LIBUSB_LIBS = -R/usr/sfw/lib -L/usr/sfw/lib' in
drivers/Makedile things worked fine. Again, something that could
be added to configure as a Solaris specific.
4. I had to add extra Makefile targes to drivers/Makefile, to ensure
things got compiled with the correct library flags:
mge-hid.o:
$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c mge-hid.c
apc-hid.o:
$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c apc-hid.c
belkin-hid.o:
$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c belkin-hid.c
Hope this helps; if there are any 'test' builds available, let me
know how to find them and I'll check things work ok. I've downloaded
the CVS version, and from what I can tell, things seem the same as
2.0.3
Many regards
marty
--
Marty Lee e: marty at upstart-solutions.co.uk
Technical Director v: +44 131 476 3775
Upstart Solutions Ltd f: +44 871 433 8922
Scotland, UK w: http://www.upstart-solutions.co.uk
--
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/
More information about the Nut-upsdev
mailing list