Can't compile OWFS for Windows cygwin/mingw

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't compile OWFS for Windows cygwin/mingw

Radoslav Chovan
Hi, 
I need to use owserver on windows, I have found compiled binaries, but they does not work. They ask for not existent dlls (cygusb-1.0.dll, cygncurses-10.dll). I have tried binary version 2.8p14, 2.9p9, 3.0p2, 3.1p0

I´m trying to compile owfs for windows. I need only owserver, owhttpd and owshell without USB support. 
When I try compilation on cygwin, it ask for libusb, even if I configure with option --disable-usb

./configure --disable-usb --disable-owftpd --disable-avahi --disable-zero --enable-owhttpd --enable-mt --enable-owshell --disable-owfs --disable-swig --disable-owpython --disable-owperl --disable-owtcl --disable-dependency-tracking --prefix=/usr

Configuration stop on this error:
checking if usb support is enabled... no
./configure: line 16685: syntax error near unexpected token `LIBUSB,'
./configure: line 16685: `      PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 0.9.1, ENABLE_USB=true,ENABLE_USB=false)'


so I tried compile it with mingw. Configuration end without error, but when I run make, it crash on missing sys/time.h, because mingw does not have time.h (http://stackoverflow.com/questions/12747515/installing-compiling-in-cygwin-mingw-how-to-set-the-include-path-symbolic)

gcc -DHAVE_CONFIG_H -I. -I../../../../src/include    -I../include -I../../../owl
ib/src/include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qua
l -Wcast-align -Wstrict-prototypes -Wredundant-decls -D_FILE_OFFSET_BITS=64 -D_X
OPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -g
-O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200
112L -c -o ow_opt.o ow_opt.c
In file included from ow_opt.c:14:0:
../include/owshell.h:33:41: fatal error: sys/times.h: No such file or directory
 #include <sys/times.h>   /* for times */
                                         ^
compilation terminated.
make[4]: *** [ow_opt.o] Error 1

I have tried compile versions 3.1.p0 and 3.1p1, with cygwin and mingw, but result is same. Could you plese help me, or provide native (no cygwin) binaries ?

thank you

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Jan Kandziora
Am 02.02.2016 um 16:48 schrieb Radoslav Chovan:
>
> Configuration stop on this error:
> checking if usb support is enabled... no
> ./configure: line 16685: syntax error near unexpected token `LIBUSB,'
> ./configure: line 16685: `      PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >=
> 0.9.1, ENABLE_USB=true,ENABLE_USB=false)'
>
This looks like ./configure wasn't properly built. There should be NO
unexpanded PKG_CHECK_ macros left inside ./configure. That's something
which has to stay in its ./configure.ac sources.

Do you use the ./configure included in the 3.1p1 source package or have
you build configure yourself? If so, did you ./bootstrap it or ran
aclocal,autoconf,autoheader,automake by hand?

Kind regards

        Jan

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Jan Kandziora
Am 02.02.2016 um 20:39 schrieb Coudy:
> Hi,
> I have followed this guide:
> http://www.clemens.it/dev/doku.php?id=building_owfs_on_cygwin
> After unzipped source files, I run ./bootstrap, autoreconf -if, and
> configure with my parameters. Then tried again with original configure from
> tar.gz
>
This will overwrite ./configure with a broken version produced by the
autoconf/automake suite you use.

Please, do a clean unzip of the original sources from

        https://sourceforge.net/projects/owfs/files/owfs/3.1p1/

Then, *don't* ./bootstrap and *don't* autoreconf -if. There's a clean
./configure included inside the source package. Run that clean
./configure and report.

Kind regards

        Jan



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Radoslav Chovan
Hi, 
after your advice, configure run without error, but compilation in cygwin break on this error:

version 3.1p1

gcc -DHAVE_CONFIG_H -I. -I../../../../src/include    -I../include -I../../../owlib/src/include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls    -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -g -O2 -mwin32 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -c ow_tcp_read.c
ow_tcp_read.c: In function ‘tcp_read’:
ow_tcp_read.c:31:3: error: unknown type name ‘fd_set’
   fd_set readset;
   ^
ow_tcp_read.c:35:3: warning: implicit declaration of function ‘FD_ZERO’ [-Wimplicit-function-declaration]
   FD_ZERO(&readset);
   ^
ow_tcp_read.c:36:3: warning: implicit declaration of function ‘FD_SET’ [-Wimplicit-function-declaration]
   FD_SET(file_descriptor, &readset);
   ^
ow_tcp_read.c:39:3: warning: implicit declaration of function ‘select’ [-Wimplicit-function-declaration]
   rc = select(file_descriptor + 1, &readset, NULL, NULL, &tv);
   ^
ow_tcp_read.c:42:4: warning: implicit declaration of function ‘FD_ISSET’ [-Wimplicit-function-declaration]
    if (FD_ISSET(file_descriptor, &readset) == 0) {
    ^
Makefile:644: recipe for target 'ow_tcp_read.o' failed
make[4]: *** [ow_tcp_read.o] Error 1
make[4]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell/src/c'
Makefile:486: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell/src'
Makefile:486: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell'
Makefile:500: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/wsdadm/owfs-3.1p1/module'
Makefile:555: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


2016-02-02 23:14 GMT+01:00 Jan Kandziora <[hidden email]>:
Am 02.02.2016 um 20:39 schrieb Coudy:
> Hi,
> I have followed this guide:
> http://www.clemens.it/dev/doku.php?id=building_owfs_on_cygwin
> After unzipped source files, I run ./bootstrap, autoreconf -if, and
> configure with my parameters. Then tried again with original configure from
> tar.gz
>
This will overwrite ./configure with a broken version produced by the
autoconf/automake suite you use.

Please, do a clean unzip of the original sources from

        https://sourceforge.net/projects/owfs/files/owfs/3.1p1/

Then, *don't* ./bootstrap and *don't* autoreconf -if. There's a clean
./configure included inside the source package. Run that clean
./configure and report.

Kind regards

        Jan



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Radoslav Chovan
Hi, 
this is my current owshell.h

#define OWSHELL_H
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include "config.h"
#include "owfs_config.h"

I have run again configure and compile. 

I see same error:

make[4]: Entering directory '/home/wsdadm/owfs-3.1p1/module/owshell/src/c'
gcc -DHAVE_CONFIG_H -I. -I../../../../src/include    -I../include -I../../../owlib/src/include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls    -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -g -O2 -mwin32 -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -c ow_tcp_read.c
ow_tcp_read.c: In function ‘tcp_read’:
ow_tcp_read.c:31:3: error: unknown type name ‘fd_set’
   fd_set readset;
   ^
ow_tcp_read.c:35:3: warning: implicit declaration of function ‘FD_ZERO’ [-Wimplicit-function-declaration]
   FD_ZERO(&readset);
   ^
ow_tcp_read.c:36:3: warning: implicit declaration of function ‘FD_SET’ [-Wimplicit-function-declaration]
   FD_SET(file_descriptor, &readset);
   ^
ow_tcp_read.c:39:3: warning: implicit declaration of function ‘select’ [-Wimplicit-function-declaration]
   rc = select(file_descriptor + 1, &readset, NULL, NULL, &tv);
   ^
ow_tcp_read.c:42:4: warning: implicit declaration of function ‘FD_ISSET’ [-Wimplicit-function-declaration]
    if (FD_ISSET(file_descriptor, &readset) == 0) {
    ^
Makefile:644: recipe for target 'ow_tcp_read.o' failed



2016-02-03 14:58 GMT+01:00 Jan Kandziora <[hidden email]>:
Am 03.02.2016 um 07:33 schrieb Radoslav Chovan:
> Hi,
> after your advice, configure run without error, but compilation in cygwin
> break on this error:
>
> version 3.1p1
>
> gcc -DHAVE_CONFIG_H -I. -I../../../../src/include    -I../include
> -I../../../owlib/src/include -fexceptions -Wall -W -Wundef -Wshadow
> -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes
> -Wredundant-decls    -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600
> -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -g -O2 -mwin32
> -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1
> -D_POSIX_C_SOURCE=200112L -c ow_tcp_read.c
> ow_tcp_read.c: In function ‘tcp_read’:
> ow_tcp_read.c:31:3: error: unknown type name ‘fd_set’
>    fd_set readset;
>    ^
> ow_tcp_read.c:35:3: warning: implicit declaration of function ‘FD_ZERO’
> [-Wimplicit-function-declaration]
>    FD_ZERO(&readset);
>    ^
> ow_tcp_read.c:36:3: warning: implicit declaration of function ‘FD_SET’
> [-Wimplicit-function-declaration]
>    FD_SET(file_descriptor, &readset);
>    ^
> ow_tcp_read.c:39:3: warning: implicit declaration of function ‘select’
> [-Wimplicit-function-declaration]
>    rc = select(file_descriptor + 1, &readset, NULL, NULL, &tv);
>    ^
> ow_tcp_read.c:42:4: warning: implicit declaration of function ‘FD_ISSET’
> [-Wimplicit-function-declaration]
>     if (FD_ISSET(file_descriptor, &readset) == 0) {
>     ^
> Makefile:644: recipe for target 'ow_tcp_read.o' failed
> make[4]: *** [ow_tcp_read.o] Error 1
> make[4]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell/src/c'
> Makefile:486: recipe for target 'all-recursive' failed
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell/src'
> Makefile:486: recipe for target 'all-recursive' failed
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory '/home/wsdadm/owfs-3.1p1/module/owshell'
> Makefile:500: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/home/wsdadm/owfs-3.1p1/module'
> Makefile:555: recipe for target 'all-recursive' failed
> make: *** [all-recursive] Error 1
>
Question: Do you have all the needed header files installed? Usually
this is covered by the configure run but cygwin is special and we don't
have too many persons who test it.


You can try adding

#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

inside module/owshell/src/include/owshell.h right after

#define OWSHELL_H

Let me know if you get another error at the same file or run into
another error with the next.


Kind regards

        Jan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Jan Kandziora
Am 03.02.2016 um 19:20 schrieb Radoslav Chovan:

> Hi,
> this is my current owshell.h
>
> #define OWSHELL_H
> #include <sys/time.h>
> #include <sys/types.h>
> #include <unistd.h>
> #include "config.h"
> #include "owfs_config.h"
>
> I have run again configure and compile.
>
> I see same error:
>
> [...]
>
In that case, our configure.ac could be outdated. Does modern cygwin
have <sys/select.h>? Please try replacing

#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

by

#include <sys/select.h>

Kind regards

        Jan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile OWFS for Windows cygwin/mingw

Radoslav Chovan
Hi, thank you. 
With you help I was able successfully compiled owfs on Cygwin 64bit. 
Could you please update source of SF.NET with this patch and modifications ? 

Thank You.


2016-02-04 21:17 GMT+01:00 Jan Kandziora <[hidden email]>:
Am 03.02.2016 um 21:17 schrieb Coudy:
> Ok,
> I didi make clean and then make, but it stop on same error
>
No. Now it's compat.o again and I'm missing -D__BSD_VISIBLE=1 in the
above run.

Please apply the appended patch against the ./configure I sent you

[owfs-3.1p1]$ patch <owfs_cygwin_configure.patch

then re-run ./configure, then make. Sorry this is a bit tedious.



Kind regards

        Jan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers