[Nut-upsdev] problem with compiling on Cygwin64

Walter Literowich wliterow at gmail.com
Fri Oct 23 20:18:07 UTC 2015


Thank you for responding to my problem

I have no problem building  in Debian 8 , the problem is with  Cygwin64

I see that the two lines from  

Cygwin64 >>
gcc -g -O2 -Wall -Wsign-compare    usbhid-ups.c   -o usbhid-ups
In file included from usbhid-ups.c:32:0:

And 

Debian>>>

make[1]: Entering directory '/home/walter/nut/drivers'
depbase=`echo usbhid-ups.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../include    -I../include      -g -O2 -Wall -Wsign-compare -MT usbhid-ups.o -MD -MP -MF $depbase.Tpo -c -o usbhid-ups.o usbhid-ups.c &&\

are completely different -  missing the significant include  in Cygwin64

any thoughts or ideas  on how to resolve this configuration problem in Cygwin64 ?



==================================================================================

  ./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:514: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


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

In Debian

Making all in drivers
make[1]: Entering directory '/home/walter/nut/drivers'
depbase=`echo usbhid-ups.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I../include    -I../include      -g -O2 -Wall -Wsign-compare -MT usbhid-ups.o -MD -MP -MF $depbase.Tpo -c -o usbhid-ups.o usbhid-ups.c &&\
mv -f $depbase.Tpo $depbase.Po
-----------------------------------------------------------------------------




-----Original Message-----
From: Charles Lepple [mailto:clepple at gmail.com] 
Sent: Thursday, October 22, 2015 10:13 PM
To: Walter Literowich
Cc: nut-upsdev at lists.alioth.debian.org
Subject: Re: [Nut-upsdev] problem with compiling on Cygwin64

[please use reply-all to include the list - the NUT lists do not add a reply-to header.]

On Oct 22, 2015, at 8:06 PM, Walter Literowich <wliterow at gmail.com> wrote:
> 
> In file included from genericups.c:24:0:
> genericups.h:147:4: error: ‘TIOCM_ST’ undeclared here (not in a function)
>     TIOCM_ST   /* shutdown: ST   */
> 

The "TIOCM_ST" flag should be defined in sys/termios.h - what did the ./configure script print when looking for that header?

If you don't need the serial drivers, you can build just a subset of them as follows:

  ./configure --with-drivers=dummy-ups,usbhid-ups

-- 
Charles Lepple
clepple at gmail







More information about the Nut-upsdev mailing list