libusb do you have installed >>> 1.2.6.0-2
./configure --with-drivers=usbhid-ups
Configuration summary:
=====================build serial drivers: yes
build USB drivers: yes
build SNMP drivers: no
build neon based XML driver: yes
enable Avahi support: no
build Powerman PDU client driver: no
build IPMI driver: no
build Mac OS X meta-driver: no
build i2c based drivers: no
enable SSL support: yes (OpenSSL)
enable libwrap (tcp-wrappers) support: no
enable libltdl (Libtool dlopen abstraction) support: yes
build nut-scanner: yes
build CGI programs: no
build and install documentation: no
build and install the development files: no
only build specific drivers: usbhid-ups
Making all in drivers
make[1]: Entering directory '/cygdrive/c/nut/drivers'
gcc -g -O2 -Wall -Wsign-compare usbhid-ups.c -o usbhid-ups
In file included from usbhid-ups.c:32:0:
main.h:4:20: fatal error: common.h: No such file or directory
#include "common.h"
^
compilation terminated.
<builtin>: recipe for target 'usbhid-ups' failed
make[1]: *** [usbhid-ups] Error 1
make[1]: Leaving directory '/cygdrive/c/nut/drivers'
Makefile:513: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
-----Original Message-----
From: Charles Lepple [mailto:clepple at gmail.com]
Sent: Saturday, October 24, 2015 8:58 AM
To: Walter Literowich
Cc: nut-upsdev at lists.alioth.debian.org
Subject: Re: [Nut-upsdev] problem with compiling on Cygwin64
On Oct 23, 2015, at 4:18 PM, Walter Literowich <wliterow at gmail.com>
wrote:>
> Making all in drivers
> make[1]: Entering directory '/cygdrive/c/nut/drivers'
> gcc -g -O2 -Wall -Wsign-compare usbhid-ups.c -o usbhid-ups
> In file included from usbhid-ups.c:32:0:
> main.h:4:20: fatal error: common.h: No such file or directory #include
> "common.h"
That is a much more basic problem, since common.h is part of NUT itself. Can
you gzip and send the config.log from Cygwin?
Also, I am surprised to see that the configure script decided that it could
build the USB drivers. Which version of libusb do you have installed?
--
Charles Lepple
clepple at gmail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/octet-stream
Size: 17103 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20151024/f4fcbed4/attachment-0001.obj>
On Oct 24, 2015, at 12:11 PM, Walter Literowich <wliterow at gmail.com> wrote:> > Making all in drivers > make[1]: Entering directory '/cygdrive/c/nut/drivers' > gcc -g -O2 -Wall -Wsign-compare usbhid-ups.c -o usbhid-ups > In file included from usbhid-ups.c:32:0: > main.h:4:20: fatal error: common.h: No such file or directory > #include "common.h"How are you invoking "make"? It is almost like some of the Makefile variables and rules are being ignored. The usbhid-ups binary gets built from many different source files, so the default make rule for "%: %.c" will not work. As you have probably gathered, we don't regularly build NUT against Cygwin. If there is an easy way to cross-compile, I am open to that idea, but until then, we will need your help debugging this. To figure out what settings might be causing this difference, you might want to compare your config.log and build log against the NUT Buildbot on various Linux systems: http://buildbot.networkupstools.org/public/nut/waterfall http://buildbot.networkupstools.org/public/nut/waterfall?show=Debian-x64-gcc The "stdio" links show a transcript of the commands, with the actual commands in blue at the top. "make distcheck-light" stages the build into a subdirectory, which is why the source paths all have "../" components. If Cygwin64 is not compatible with the versions of auto* that were used to generate the ./configure script and the Makefile.am/.in files, might also be necessary for you to install automake, autoconf, and libtool to regenerate them. After installing, you can run "./autogen.sh" in the top level of the NUT directory. Details: http://www.networkupstools.org/docs/developer-guide.chunked/ar01s03.html#building -- Charles Lepple clepple at gmail
Success !! at least in the compile and build of the Cygwin *.exe's git clone git://github.com/networkupstools/nut.git ./autogen.sh cd nut ./autogen.sh ./configure --with-all=auto --with-doc=auto make install problem was in : /* genericups.c - support for generic contact-closure UPS models Copyright (C) 1999 Russell Kroll <rkroll at exploits.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Added >>> #define TIOCM_LE 0001 /* line enable */ Added >>> #define TIOCM_ST 0010 /* secondary transmit */ Added >>> #define TIOCM_SR 0020 /* secondary receive */ -----Original Message----- From: Charles Lepple [mailto:clepple at gmail.com] Sent: Sunday, November 01, 2015 10:37 AM To: Walter Literowich Cc: nut-upsdev at lists.alioth.debian.org Subject: Re: [Nut-upsdev] problem with compiling on Cygwin64 On Oct 24, 2015, at 12:11 PM, Walter Literowich <wliterow at gmail.com> wrote:> > Making all in drivers > make[1]: Entering directory '/cygdrive/c/nut/drivers' > gcc -g -O2 -Wall -Wsign-compare usbhid-ups.c -o usbhid-ups > In file included from usbhid-ups.c:32:0: > main.h:4:20: fatal error: common.h: No such file or directory #include > "common.h"How are you invoking "make"? It is almost like some of the Makefile variables and rules are being ignored. The usbhid-ups binary gets built from many different source files, so the default make rule for "%: %.c" will not work. As you have probably gathered, we don't regularly build NUT against Cygwin. If there is an easy way to cross-compile, I am open to that idea, but until then, we will need your help debugging this. To figure out what settings might be causing this difference, you might want to compare your config.log and build log against the NUT Buildbot on various Linux systems: http://buildbot.networkupstools.org/public/nut/waterfall http://buildbot.networkupstools.org/public/nut/waterfall?show=Debian-x64-gcc The "stdio" links show a transcript of the commands, with the actual commands in blue at the top. "make distcheck-light" stages the build into a subdirectory, which is why the source paths all have "../" components. If Cygwin64 is not compatible with the versions of auto* that were used to generate the ./configure script and the Makefile.am/.in files, might also be necessary for you to install automake, autoconf, and libtool to regenerate them. After installing, you can run "./autogen.sh" in the top level of the NUT directory. Details: http://www.networkupstools.org/docs/developer-guide.chunked/ar01s03.html#bui lding -- Charles Lepple clepple at gmail