[Nut-upsuser] NUT Two Apc UPSes on Windows

Frédéric Bohé fredericbohe at eaton.com
Thu Mar 29 12:12:25 UTC 2012


Rafal,


On Thu, 2012-03-29 at 13:26 +0200, Rafał Pawłaszek wrote:
> Hi,
>  
> I managed to configure the windows_port, but it crashes while make
> command with error:
>  
> In file include from libusb.h:35:0,
>                       from libhid.h:45,
>                       from usbhid-ups.c:33:
> usb-common.h:25:19: fatal error: regex.h: No such file or directory
>  
> Now, what I did:
>  
> 1. I use mingw shell (there's also msys shell, but it doesn't work. I
> don't know why it's there, then).
> 2. mingw-get update shows available packages, and it's easy to single
> out the ones needed in the configuration.
> 3. In windows_port I run 
>          autoconf
> and after it crashed I entered
>          autoreconf -f -i -Wall,no-obsolete
> 4. Next, when the configure file appeared I typed in automake, but
> there was no scripts/augeas/nutupsconf.aug.in present.
> 5. Using IronPython (I guess any implementation is good) I run
> scripts/augeas/gen-nutupsconf-aug.py and automake run properly

You should try to call the "autogen.sh" script rather than directly
calling autoconf and automake. If a "python.exe" binary is available in
your PATH, autogen.sh automatically generate missing "*.in" files
(including nutupsconf.aug.in). You should also need "perl.exe" to
generate all the "*.in" files.


> 6. As I wanted only the usb support I typed in
>          configure --prefix="C:\\Program Files\\NUT-2.6.3"
> --without-serial --enable-static --disable-shared --with-usb
> but libusb is absent in mingw, so following
> http://tomeko.net/other/avrdude/building_avrdude.php
> I downloaded the 1.2.4 version and placed the files in the mingw path.
> Strangely though, going to /include in MinGW shell and listing header
> files I cannot see usb.h, but after this step configure run properly.
> 7. and here is when make crashed. in /include I've got only regexp.h
> and haven't found any useful site yet.
>  
> Do You know how to overcome this? 

You should install libgnurx in your mingw directories:

http://sourceforge.net/projects/mingw/files/Other/UserContributed/regex/mingw-regex-2.5.1/

Get the *-dev and *-bin packages on this site, unpack them in mingw
directory then re-run your "configure" command.

This should be enough if you only want USB support.

Reagrds,
Fred



> Rafał

-- 
Team Open Source Eaton - http://powerquality.eaton.com

--------------------------------------------------------------------------



More information about the Nut-upsuser mailing list