Hi,

Note that Cygwin is a unix emulation layer on top of windows. As such,
installing the libapr-dev package from cygwin will likely not work since
this was built differently and could be causing the issue.

BTW, 2.5.1089 is about a year old. Is there any reason why you are not
using the most recent release?

Regards,
Botond

On Thu, 17 Jul 2014 13:09:23 +0000
Malý Lukáš <m...@datasys.cz> wrote:

> Hi
> 
> I have problem with mingw and compile apr, i use apr-1.4.6
> 
> ./msys.bat
> cd apr-1.4.6
> 
> malyl@WIN7 ~/apr-1.4.6
> $ ./configure
> ...
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating include/apr.h
> config.status: creating build/apr_rules.mk
> config.status: creating build/pkg/pkginfo
> config.status: creating apr-1-config
> config.status: creating apr.pc
> config.status: creating test/Makefile
> config.status: creating test/internal/Makefile
> config.status: creating include/arch/unix/apr_private.h
> config.status: executing libtool commands
> config.status: executing default commands
> config.status: include/apr.h is unchanged
> config.status: include/arch/unix/apr_private.h is unchanged
> 
> Default build config ready
> 
> malyl@WIN7 ~/apr-1.4.6
> $ make
> make[1]: Entering directory `/home/malyl/apr-1.4.6'
> /bin/sh /home/malyl/apr-1.4.6/libtool --silent --mode=compile gcc -g -O2   
> -DHAV
> E_CONFIG_H -DWIN32 -D__MSVCRT__ -D_LARGEFILE64_SOURCE   -I./include 
> -I/home/maly
> l/apr-1.4.6/include/arch/win32 -I./include/arch/unix 
> -I/home/malyl/apr-1.4.6/inc
> lude/arch/unix -I/home/malyl/apr-1.4.6/include  -o passwd/apr_getpass.lo -c 
> pass
> wd/apr_getpass.c && touch passwd/apr_getpass.lo
> In file included from /usr/include/sys/socket.h:15,
>                  from ./include/apr.h:168,
>                  from 
> /home/malyl/apr-1.4.6/include/arch/win32/apr_private.h:31,
> 
>                  from passwd/apr_getpass.c:22:
> /usr/include/cygwin/socket.h:18: error: redefinition of `struct sockaddr'
> In file included from /usr/include/sys/socket.h:15,
>                  from ./include/apr.h:168,
>                  from 
> /home/malyl/apr-1.4.6/include/arch/win32/apr_private.h:31,
> 
>                  from passwd/apr_getpass.c:22:
> /usr/include/cygwin/socket.h:28: error: redefinition of `struct linger'
> In file included from ./include/apr.h:168,
>                  from 
> /home/malyl/apr-1.4.6/include/arch/win32/apr_private.h:31,
> 
>                  from passwd/apr_getpass.c:22:
> /usr/include/sys/socket.h:29: error: conflicting types for 'accept'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:536: 
> error
> : previous declaration of 'accept' was here
> /usr/include/sys/socket.h:29: error: conflicting types for 'accept'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:536: 
> error
> : previous declaration of 'accept' was here
> /usr/include/sys/socket.h:30: error: conflicting types for 'bind'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:537: 
> error
> : previous declaration of 'bind' was here
> /usr/include/sys/socket.h:30: error: conflicting types for 'bind'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:537: 
> error
> : previous declaration of 'bind' was here
> /usr/include/sys/socket.h:31: error: conflicting types for 'connect'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:539: 
> error
> : previous declaration of 'connect' was here
> /usr/include/sys/socket.h:31: error: conflicting types for 'connect'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:539: 
> error
> : previous declaration of 'connect' was here
> /usr/include/sys/socket.h:32: error: conflicting types for 'getpeername'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:541: 
> error
> : previous declaration of 'getpeername' was here
> /usr/include/sys/socket.h:32: error: conflicting types for 'getpeername'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:541: 
> error
> : previous declaration of 'getpeername' was here
> /usr/include/sys/socket.h:33: error: conflicting types for 'getsockname'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:542: 
> error
> : previous declaration of 'getsockname' was here
> /usr/include/sys/socket.h:33: error: conflicting types for 'getsockname'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:542: 
> error
> : previous declaration of 'getsockname' was here
> /usr/include/sys/socket.h:34: error: conflicting types for 'listen'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:546: 
> error
> : previous declaration of 'listen' was here
> /usr/include/sys/socket.h:34: error: conflicting types for 'listen'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:546: 
> error
> : previous declaration of 'listen' was here
> /usr/include/sys/socket.h:35: error: conflicting types for 'recv'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:547: 
> error
> : previous declaration of 'recv' was here
> /usr/include/sys/socket.h:35: error: conflicting types for 'recv'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:547: 
> error
> : previous declaration of 'recv' was here
> /usr/include/sys/socket.h:37: error: conflicting types for 'recvfrom'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:548: 
> error
> : previous declaration of 'recvfrom' was here
> /usr/include/sys/socket.h:37: error: conflicting types for 'recvfrom'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:548: 
> error
> : previous declaration of 'recvfrom' was here
> /usr/include/sys/socket.h:38: error: conflicting types for 'send'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:549: 
> error
> : previous declaration of 'send' was here
> /usr/include/sys/socket.h:39: error: conflicting types for 'sendto'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:550: 
> error
> : previous declaration of 'sendto' was here
> /usr/include/sys/socket.h:39: error: conflicting types for 'sendto'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:550: 
> error
> : previous declaration of 'sendto' was here
> /usr/include/sys/socket.h:40: error: conflicting types for 'setsockopt'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:551: 
> error
> : previous declaration of 'setsockopt' was here
> /usr/include/sys/socket.h:40: error: conflicting types for 'setsockopt'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:551: 
> error
> : previous declaration of 'setsockopt' was here
> /usr/include/sys/socket.h:41: error: conflicting types for 'getsockopt'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:543: 
> error
> : previous declaration of 'getsockopt' was here
> /usr/include/sys/socket.h:41: error: conflicting types for 'getsockopt'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:543: 
> error
> : previous declaration of 'getsockopt' was here
> /usr/include/sys/socket.h:42: error: conflicting types for 'shutdown'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:552: 
> error
> : previous declaration of 'shutdown' was here
> /usr/include/sys/socket.h:42: error: conflicting types for 'shutdown'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:552: 
> error
> : previous declaration of 'shutdown' was here
> /usr/include/sys/socket.h:43: error: conflicting types for 'socket'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:553: 
> error
> : previous declaration of 'socket' was here
> /usr/include/sys/socket.h:43: error: conflicting types for 'socket'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:553: 
> error
> : previous declaration of 'socket' was here
> /usr/include/sys/socket.h:46: error: conflicting types for 'getservbyname'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:557: 
> error
> : previous declaration of 'getservbyname' was here
> /usr/include/sys/socket.h:46: error: conflicting types for 'getservbyname'
> /usr/lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api/winsock2.h:557: 
> error
> : previous declaration of 'getservbyname' was here
> In file included from 
> /home/malyl/apr-1.4.6/include/arch/win32/apr_private.h:31,
> 
>                  from passwd/apr_getpass.c:22:
> ./include/apr.h:358: error: parse error before "apr_off_t"
> ./include/apr.h:358: warning: data definition has no type or storage class
> In file included from passwd/apr_getpass.c:23:
> ./include/apr_strings.h:303: error: parse error before "apr_off_t"
> ./include/apr_strings.h:321: error: parse error before '*' token
> ./include/apr_strings.h:358: error: parse error before "size"
> In file included from /usr/include/unistd.h:6,
>                  from passwd/apr_getpass.c:34:
> /usr/include/sys/unistd.h:95: error: parse error before '(' token
> make[1]: *** [passwd/apr_getpass.lo] Error 1
> make[1]: Leaving directory `/home/malyl/apr-1.4.6'
> make: *** [all-recursive] Error 1
> 
> Lukas
> 
> P.S. Cygwin i only sested, but have package management and exists package 
> libapr-dev. MinGW is true way :-)
> 
> -----Original Message-----
> From: Botond Botyanszki [mailto:b...@nxlog.org] 
> Sent: Thursday, July 17, 2014 1:36 PM
> To: nxlog-ce-users@lists.sourceforge.net
> Subject: Re: [nxlog-ce-users] nxlog-ce ver. 2.5 compilation on Windows7 SP1 
> 64bit
> 
> Hi,
> 
> It needs mingw and msys to compile, not cygwin.
> 
> Regards,
> Botond
> 
> On Thu, 17 Jul 2014 07:08:39 +0000
> Malý Lukáš <m...@datasys.cz> wrote:
> 
> > Hi all
> > 
> > I have question about compilation nxlog-ce-2.5.1089 under Windows7 64bit 
> > with MinGW or Cygwin enviroment.
> > 
> > # Compilation under MinGW
> > 
> > $ set | grep CPATH
> > CPATH='C:\mingw\msys\1.0\include'
> > 
> > $ set | grep LIBRAR
> > LIBRARY_PATH='C:\mingw\msys\1.0\lib'
> > 
> > malyl@WIN7 ~/nxlog-ce-2.5.1089
> > $ ./configure
> > ...
> > checking for gcc option to accept ISO C89... none needed checking for 
> > style of include used by make... GNU checking dependency style of 
> > gcc... gcc3 checking for apr-1-config... no
> > configure: error: apr library not found
> > 
> > MinGW - No package management, own compilation APR with version 
> > apr-1.4.6
> > 
> > malyl@WIN7 ~/apr-1.4.6
> > $ ./configure
> > ...
> > config.status: creating apr.pc
> > config.status: creating test/Makefile
> > config.status: creating test/internal/Makefile
> > config.status: creating include/arch/unix/apr_private.h
> > config.status: executing libtool commands
> > rm: cannot lstat `libtoolT': No such file or directory
> > config.status: executing default commands
> > 
> > This error :-( I dont find solution
> > 
> > # Compilation under Cygwin
> > 
> > Cygwin have package management, instaled libapr-1 version 1.4.8-1 and 
> > libpcre 8.34-1.
> > 
> > # Build configuration with MinGW
> > 
> > malyl@WIN7 ~/nxlog-ce-2.5.1089
> > ./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 
> > --target=x86_64-w64-mingw32 ...
> > checking for openssl... openssl
> > checking for pcre-config... /usr/bin/pcre-config checking for 
> > apr_socket_create in -lapr-1... yes checking for apr_pollset_wakeup... 
> > yes checking for apr_sockaddr_ip_getbuf... yes checking for 
> > apr_file_sync... yes checking for apr_file_link... yes checking for 
> > apr_pool_create_unmanaged_ex... yes checking for dbi_initialize in 
> > -ldbi... no
> > configure: WARNING: libdbi not found - not building dbi modules 
> > checking for ANSI C header files... (cached) no checking syslog.h 
> > usability... yes checking syslog.h presence... yes checking for 
> > syslog.h... yes checking pcre.h usability... no checking pcre.h 
> > presence... no checking for pcre.h... no
> > configure: error: please install pcre-dev
> > 
> > Package pcre-dev was installed :-(
> > 
> > # Build configuration default
> > 
> > $ ./configure
> > ...
> > config.status: creating src/utils/Makefile
> > config.status: creating packaging/redhat/nxlog.spec
> > config.status: creating packaging/redhat/nxlog.spec.RHEL5
> > config.status: creating packaging/windows/nxlog.wxs
> > config.status: creating packaging/windows/pkgmsi.sh
> > config.status: creating src/common/config.h
> > config.status: src/common/config.h is unchanged
> > config.status: executing depfiles commands
> > config.status: executing libtool commands
> > 
> > nxlog-ce-2.5.1089 configured successfully type `make' and `make 
> > install'
> > 
> > # Build configuration default configured successfully
> > 
> > malyl@WIN7 ~/nxlog-ce-2.5.1089
> > $ make
> > Making all in src
> > make[1]: Entering directory '/home/malyl/nxlog-ce-2.5.1089/src'
> > Making all in common
> > make[2]: Entering directory '/home/malyl/nxlog-ce-2.5.1089/src/common'
> > make  all-am
> > make[3]: Entering directory '/home/malyl/nxlog-ce-2.5.1089/src/common'
> > /bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
> > -I/usr/include/apr-1     -DCYGWIN -pipe -W -Wall -Wshadow -Wno-address 
> > -Wcast-qual -Wbad-function-cast -Wsign-compare -Wconversion -funsigned-char 
> > -Werror-implicit-function-declaration -Wswitch-default -fstrict-aliasing 
> > -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-noreturn 
> > -Wmissing-format-attribute -Wformat -Wextra -Werror=format-security 
> > -rdynamic -ggdb3 -MT libnx_la-config_cache.lo -MD -MP -MF 
> > .deps/libnx_la-config_cache.Tpo -c -o libnx_la-config_cache.lo `test -f 
> > 'config_cache.c' || echo './'`config_cache.c
> > libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/apr-1 
> > -DCYGWIN -pipe -W -Wall -Wshadow -Wno-address -Wcast-qual 
> > -Wbad-function-cast -Wsign-compare -Wconversion -funsigned-char 
> > -Werror-implicit-function-declaration -Wswitch-default -fstrict-aliasing 
> > -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-noreturn 
> > -Wmissing-format-attribute -Wformat -Wextra -Werror=format-security 
> > -rdynamic -ggdb3 -MT libnx_la-config_cache.lo -MD -MP -MF 
> > .deps/libnx_la-config_cache.Tpo -c config_cache.c  -DDLL_EXPORT -DPIC -o 
> > .libs/libnx_la-config_cache.o In file included from ../core/nxlog.h:16:0,
> >                  from config_cache.c:8:
> > ../core/../common/error_debug.h:58:26: error: unknown type name 
> > 'apr_thread_mutex_t'
> > void nx_logger_mutex_set(apr_thread_mutex_t *mutex);
> >                           ^
> > In file included from ../core/../common/route.h:14:0,
> >                  from ../core/../common/module.h:21,
> >                  from ../core/ctx.h:12,
> >                  from ../core/nxlog.h:18,
> >                  from config_cache.c:8:
> > ../core/../common/logqueue.h:24:5: error: unknown type name 
> > 'apr_thread_mutex_t'
> >      apr_thread_mutex_t *mutex;
> >      ^
> > In file included from ../core/../common/module.h:21:0,
> >                  from ../core/ctx.h:12,
> >                 from ../core/nxlog.h:18,
> >                  from config_cache.c:8:
> > ../core/../common/route.h:25:5: error: unknown type name 
> > 'apr_thread_mutex_t'
> >      apr_thread_mutex_t *mutex;
> >      ^
> > In file included from ../core/ctx.h:12:0,
> >                  from ../core/nxlog.h:18,
> >                  from config_cache.c:8:
> > ../core/../common/module.h:214:5: error: unknown type name 
> > 'apr_thread_mutex_t'
> >      apr_thread_mutex_t *mutex;
> >      ^
> > In file included from ../core/nxlog.h:18:0,
> >                  from config_cache.c:8:
> > ../core/ctx.h:71:5: error: unknown type name 'apr_thread_mutex_t'
> >      apr_thread_mutex_t *config_cache_mutex;
> >      ^
> > In file included from config_cache.c:8:0:
> > ../core/nxlog.h:54:5: error: unknown type name 'apr_thread_cond_t'
> >      apr_thread_cond_t *worker_cond;
> >      ^
> > ../core/nxlog.h:56:5: error: unknown type name 'apr_thread_cond_t'
> >      apr_thread_cond_t *event_cond;
> >      ^
> > ../core/nxlog.h:60:5: error: unknown type name 'apr_thread_mutex_t'
> >      apr_thread_mutex_t *mutex;
> >      ^
> > ../core/nxlog.h:62:5: error: unknown type name 'apr_thread_mutex_t'
> >      apr_thread_mutex_t **openssl_locks;
> >      ^
> > config_cache.c: In function '_update_item':
> > config_cache.c:47:5: error: implicit declaration of function 
> > 'apr_thread_mutex_lock' [-Werror=implicit-function-declaration]
> >      CHECKERR(apr_thread_mutex_lock(ctx->config_cache_mutex));
> >      ^
> > config_cache.c:74:2: error: implicit declaration of function 
> > 'apr_thread_mutex_unlock' [-Werror=implicit-function-declaration]
> >   CHECKERR(apr_thread_mutex_unlock(ctx->config_cache_mutex));
> >   ^
> > config_cache.c: At top level:
> > config_cache.c:37:13: warning: '_update_item' defined but not used 
> > [-Wunused-function] static void _update_item(nx_cc_item_t *item)
> > 
> > cc1: some warnings being treated as errors
> > Makefile:454: recipe for target 'libnx_la-config_cache.lo' failed
> > make[3]: *** [libnx_la-config_cache.lo] Error 1
> > make[3]: Leaving directory '/home/malyl/nxlog-ce-2.5.1089/src/common'
> > Makefile:300: recipe for target 'all' failed
> > make[2]: *** [all] Error 2
> > make[2]: Leaving directory '/home/malyl/nxlog-ce-2.5.1089/src/common'
> > Makefile:286: recipe for target 'all-recursive' failed
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory '/home/malyl/nxlog-ce-2.5.1089/src'
> > Makefile:407: recipe for target 'all-recursive' failed
> > make: *** [all-recursive] Error 1
> > 
> > Compilation failed
> > 
> > Pleace help me with compilation. It is possible compiled nxlog-se under 
> > Windows7 with MingGW or Cygwin ?
> > 
> > Lukas Maly
> 
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and 
> search up to 200,000 lines of code with a free copy of Black Duck Code Sight 
> - the same software that powers the world's largest code search on Ohloh, the 
> Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> nxlog-ce-users mailing list
> nxlog-ce-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to