libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] [Windows] Build fails on MinGW-w64 (0.9.62)


From: Evgeny Grin
Subject: Re: [libmicrohttpd] [Windows] Build fails on MinGW-w64 (0.9.62)
Date: Fri, 04 Jan 2019 23:56:39 +0300

Hi,
 
It was fixed already in Git master by 1616caa17764c878bc18c6344a0f7f60b2cb596c
 
-- 
Best Wishes,
Evgeny Grin
 
 
 
28.12.2018, 09:08, "silvioprog" <address@hidden>:
Hello,
 
I've tried to compile the latest stable version on MinGW-w64, but it raises the following error at build time (cut relevant parts only):
 
wget --continue --content-disposition https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.62.tar.gz
tar -zxvf libmicrohttpd-0.9.62.tar.gz
cd libmicrohttpd-0.9.62/ && mkdir build && cd build/
../configure --enable-static=yes --enable-shared=no --enable-messages=yes --enable-https=yes --enable-asserts=no --enable-coverage=no --disable-httpupgrade --disable-dauth --disable-doc --disable-examples --disable-curl
 
...
 
configure: GNU libmicrohttpd 0.9.62 Configuration Summary:
  Target directory:  /mingw32
  Cross-compiling:   no
  Operating System:  mingw32
  Shutdown of listening socket trigger select: no
  Inter-thread comm: socketpair
  poll support:      yes
  epoll support:     no
  sendfile used:     no
  HTTPS support:     yes (using libgnutls)
  Threading lib:     w32
  Use thread names:  no
  Use debug asserts: no
  Messages:          yes
  Gettext:           yes
  Basic auth.:       yes
  Digest auth.:      no
  HTTP "Upgrade":    no
  Postproc:          yes
  Build docs:        no
  Build examples:    no
  Test with libcurl: no, many unit tests will not run
 
configure: HTTPS subsystem configuration:
  License         :  LGPL only
 
configure: WARNING: This will be a custom build with missing symbols. Do NOT use this build in a distribution. Building with these kinds of configure options is only for custom builds for embedded systems.
 
Now the make:
 
make
 
...
 
../../../src/microhttpd/daemon.c: In function 'thread_main_handle_connection':
../../../src/microhttpd/daemon.c:1781:17: error: array type has incomplete element type 'struct pollfd'
   struct pollfd p[1 + EXTRA_SLOTS];
                 ^
../../../src/microhttpd/daemon.c:1843:29: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
               p[0].events = POLLIN;
                             ^~~~~~
                             POINT
../../../src/microhttpd/daemon.c:1843:29: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../../../src/microhttpd/internal.h:72:0,
                 from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:340:27: warning: implicit declaration of function 'WSAPoll'; did you mean 'WSANtohl'? [-Wimplicit-function-declaration]
 #    define MHD_sys_poll_ WSAPoll
                           ^
../../../src/microhttpd/daemon.c:1846:23: note: in expansion of macro 'MHD_sys_poll_'
               if (0 > MHD_sys_poll_ (p,
                       ^~~~~~~~~~~~~
../../../src/microhttpd/mhd_sockets.h:362:38: error: 'POLLRDBAND' undeclared (first use in this function); did you mean 'POLLIN'?
 #    define MHD_POLL_EVENTS_ERR_DISC POLLRDBAND
                                      ^
../../../src/microhttpd/daemon.c:2012:32: note: in expansion of macro 'MHD_POLL_EVENTS_ERR_DISC'
        p[0].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
                                ^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:2015:23: error: 'POLLOUT' undeclared (first use in this function); did you mean 'POLLIN'?
        p[0].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
                       ^~~~~~~
                       POLLIN
../../../src/microhttpd/daemon.c:2055:39: error: 'POLLERR' undeclared (first use in this function); did you mean 'POLLOUT'?
                (0 != (p[1].revents & (POLLERR | POLLHUP | POLLIN))) )
                                       ^~~~~~~
                                       POLLOUT
../../../src/microhttpd/daemon.c:2055:49: error: 'POLLHUP' undeclared (first use in this function); did you mean 'POLLOUT'?
                (0 != (p[1].revents & (POLLERR | POLLHUP | POLLIN))) )
                                                 ^~~~~~~
                                                 POLLOUT
In file included from ../../../src/microhttpd/daemon.c:44:0:
../../../src/microhttpd/daemon.c: In function 'MHD_poll_all':
../../../src/microhttpd/daemon.c:3736:30: error: invalid application of 'sizeof' to incomplete type 'struct pollfd'
                      sizeof (struct pollfd));
                              ^
../../../src/microhttpd/mhd_compat.h:79:38: note: in definition of macro 'MHD_calloc_'
 #define MHD_calloc_(n,s) calloc((n),(s))
                                      ^
../../../src/microhttpd/daemon.c:3754:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].fd = ls;
   ^
../../../src/microhttpd/daemon.c:3754:3: error: dereferencing pointer to incomplete type 'struct pollfd'
../../../src/microhttpd/daemon.c:3755:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].events = POLLIN;
   ^
../../../src/microhttpd/daemon.c:3755:26: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
  p[poll_server].events = POLLIN;
                          ^~~~~~
                          POINT
../../../src/microhttpd/daemon.c:3756:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].revents = 0;
   ^
../../../src/microhttpd/daemon.c:3763:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].fd = MHD_itc_r_fd_ (daemon->itc);
   ^
../../../src/microhttpd/daemon.c:3764:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].events = POLLIN;
   ^
../../../src/microhttpd/daemon.c:3765:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server].revents = 0;
   ^
../../../src/microhttpd/daemon.c:3781:3: error: invalid use of undefined type 'struct pollfd'
  p[poll_server+i].fd = pos->socket_fd;
   ^
../../../src/microhttpd/daemon.c:3785:7: error: invalid use of undefined type 'struct pollfd'
      p[poll_server+i].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
       ^
In file included from ../../../src/microhttpd/internal.h:72:0,
                 from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:362:38: error: 'POLLRDBAND' undeclared (first use in this function); did you mean 'POLLIN'?
 #    define MHD_POLL_EVENTS_ERR_DISC POLLRDBAND
                                      ^
../../../src/microhttpd/daemon.c:3785:42: note: in expansion of macro 'MHD_POLL_EVENTS_ERR_DISC'
      p[poll_server+i].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:3788:7: error: invalid use of undefined type 'struct pollfd'
      p[poll_server+i].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
       ^
../../../src/microhttpd/daemon.c:3788:33: error: 'POLLOUT' undeclared (first use in this function); did you mean 'POLLIN'?
      p[poll_server+i].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
                                 ^~~~~~~
                                 POLLIN
../../../src/microhttpd/daemon.c:3791:7: error: invalid use of undefined type 'struct pollfd'
      p[poll_server+i].events |=  MHD_POLL_EVENTS_ERR_DISC;
       ^
../../../src/microhttpd/daemon.c:3837:18: error: invalid use of undefined type 'struct pollfd'
          (0 != (p[poll_itc_idx].revents & POLLIN)) )
                  ^
../../../src/microhttpd/daemon.c:3854:14: error: invalid use of undefined type 'struct pollfd'
         if (p[poll_server+i].fd != pos->socket_fd)
              ^
../../../src/microhttpd/daemon.c:3857:31: error: invalid use of undefined type 'struct pollfd'
                        0 != (p[poll_server+i].revents & POLLIN),
                               ^
../../../src/microhttpd/daemon.c:3858:31: error: invalid use of undefined type 'struct pollfd'
                        0 != (p[poll_server+i].revents & POLLOUT),
                               ^
../../../src/microhttpd/daemon.c:3859:31: error: invalid use of undefined type 'struct pollfd'
                        0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
                               ^
In file included from ../../../src/microhttpd/internal.h:72:0,
                 from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:371:77: error: 'POLLERR' undeclared (first use in this function); did you mean 'POLLOUT'?
      (MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO | MHD_POLLNVAL_OR_ZERO | POLLERR | POLLHUP)
                                                                             ^
../../../src/microhttpd/daemon.c:3859:57: note: in expansion of macro 'MHD_POLL_REVENTS_ERR_DISC'
                        0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/mhd_sockets.h:371:87: error: 'POLLHUP' undeclared (first use in this function); did you mean 'POLLOUT'?
      (MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO | MHD_POLLNVAL_OR_ZERO | POLLERR | POLLHUP)
                                                                                       ^
../../../src/microhttpd/daemon.c:3859:57: note: in expansion of macro 'MHD_POLL_REVENTS_ERR_DISC'
                        0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:3899:11: error: invalid use of undefined type 'struct pollfd'
   (0 != (p[poll_listen].revents & POLLIN)) )
           ^
../../../src/microhttpd/daemon.c: In function 'MHD_poll_listen_socket':
../../../src/microhttpd/daemon.c:3919:17: error: array type has incomplete element type 'struct pollfd'
   struct pollfd p[2];
                 ^
../../../src/microhttpd/daemon.c:3937:30: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
       p[poll_count].events = POLLIN;
                              ^~~~~~
                              POINT
make[3]: *** [Makefile:1271: libmicrohttpd_la-daemon.lo] Error 1
make[3]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build/src/microhttpd'
make[2]: *** [Makefile:446: all-recursive] Error 1
make[2]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build/src'
make[1]: *** [Makefile:580: all-recursive] Error 1
make[1]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build'
make: *** [Makefile:487: all] Error 2
 
I've used MinGW-w64 (on Windows 7 64-bits) downloaded from:
 
http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe
 
and installed the required tools + GnuTLS:
 
pacman -Syu
pacman -S --needed tar base-devel mingw-w64-i686-toolchain mingw-w64-i686-gnutls
 
Thanks in advance for any help!
 
--
Silvio Clécio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]