-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/11/2014 10:36 p.m., Rafael Akchurin wrote: > Hello all, > > I am struggling to compile Squid 3.5 on windows 7 x64 using latest > Cygwin. > > During configuration (./configure --disable-wccp --disable-wccpv2) NP: the current 3.5 should need NO special options to build on Windows. > The following error occurs: > > checking for ldap.h... (cached) yes checking winldap.h usability... > no checking winldap.h presence... yes configure: WARNING: > winldap.h: present but cannot be compiled configure: WARNING: > winldap.h: check for missing prerequisite headers? configure: > WARNING: winldap.h: see the Autoconf documentation configure: > WARNING: winldap.h: section "Present But Cannot Be Compiled" > configure: WARNING: winldap.h: proceeding with the compiler's > result configure: WARNING: ## > ------------------------------------------- ## configure: WARNING: > ## Report this to http://bugs.squid-cache.org/ ## configure: > WARNING: ## ------------------------------------------- ## checking > for winldap.h... no checking w32api/windows.h usability... yes > > Similar with mswsock: > > checking mswsock.h usability... no checking mswsock.h presence... > yes configure: WARNING: mswsock.h: present but cannot be compiled > configure: WARNING: mswsock.h: check for missing prerequisite > headers? configure: WARNING: mswsock.h: see the Autoconf > documentation configure: WARNING: mswsock.h: section "Present But > Cannot Be Compiled" configure: WARNING: mswsock.h: proceeding with > the compiler's result configure: WARNING: ## > ------------------------------------------- ## configure: WARNING: > ## Report this to http://bugs.squid-cache.org/ ## configure: > WARNING: ## ------------------------------------------- ## checking > for mswsock.h... no > Sigh. OS headers not including their own basic dependencies. Evil practice even in C. The winldap.h not being found usable should only prevent the LDAP helpers being built, not a big issue perhapse. The absence of mswsock.h is probably involved with those later build errors. It usually contains a lot of definitions needed for the FD and socket API. If you can find out what it requires to be icluded before it in the .cc file, please let me know. > If I run "make" after that it fails at start: > > Making all in compat make[1]: Entering directory > '/usr/src/squid-3.5.0.1/compat' /bin/sh ../libtool --tag=CXX > --mode=compile g++ -DHAVE_CONFIG_H -I.. -I../include -I../lib > -I../src -I../include -Wall -Wpointer-arith -Wwrite-strings > -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -g -O2 -march=native > -std=c++11 -MT assert.lo -MD -MP -MF .deps/assert.Tpo -c -o > assert.lo assert.cc libtool: compile: g++ -DHAVE_CONFIG_H -I.. > -I../include -I../lib -I../src -I../include -Wall -Wpointer-arith > -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -g > -O2 -march=native -std=c++11 -MT assert.lo -MD -MP -MF > .deps/assert.Tpo -c assert.cc -DDLL_EXPORT -DPIC -o > .libs/assert.o In file included from > /usr/include/w32api/winsock2.h:56:0, from > /usr/include/w32api/ws2spi.h:13, from > ../compat/os/mswindows.h:306, from ../compat/compat.h:73, from > ../include/squid.h:43, from assert.cc:9: > /usr/include/w32api/psdk_inc/_fd_types.h:100:2: error: #warning > "fd_set and associated macros have been defined in sys/types. > This can cause runtime problems with W32 sockets" [-Werror=cpp] > #warning "fd_set and associated macros have been defined in > sys/types. \ ^ No idea at this point what the correct fix is here. There is a bit of a catch-22 situation going on with fd_set. With any luck is and the below might disappear once mswsock.h is found. > In file included from ../compat/compat.h:73:0, from > ../include/squid.h:43, from assert.cc:9: > ../compat/os/mswindows.h:417:0: error: "FOPEN" redefined [-Werror] > #define FOPEN 0x01 /* file handle open */ Fixed this one. > ^ In file included from /usr/include/w32api/ws2spi.h:13:0, from > ../compat/os/mswindows.h:306, from ../compat/compat.h:73, from > ../include/squid.h:43, from assert.cc:9: > /usr/include/w32api/winsock2.h:995:123: error: declaration of C > function 'int select(int, _types_fd_set*, _types_fd_set*, > _types_fd_set*, PTIMEVAL)' conflicts with WINSOCK_API_LINKAGE int > WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set > *exceptfds,const PTIMEVAL timeout); ^ In file included from > ../compat/types.h:41:0, from ../compat/compat.h:59, from > ../include/squid.h:43, from assert.cc:9: > /usr/include/sys/select.h:31:5: error: previous declaration 'int > select(int, _types_fd_set*, _types_fd_set*, _types_fd_set*, > timeval*)' here int select __P ((int __n, fd_set *__readfds, fd_set > *__writefds, ^ In file included from ../compat/compat.h:73:0, from > ../include/squid.h:43, from assert.cc:9: > > Is this a known issue or am I doing something wrong? Please note > the same commands compile Squid 3.3.8 (from Cygwin) without any > problems. > No to both questions. A lot has changed in the Windows support since 3.3. The Windows-specific code has had a lot of shuffling around and testing under MinGW. You are the first Cygwin person to report anything about issues in the post-3.3 versions. The Cygwin situation is kind of being tracked in http://bugs.squid-cache.org/show_bug.cgi?id=4073. If you can update the bug report it would be a help. Amos -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQEcBAEBAgAGBQJUY0/fAAoJELJo5wb/XPRjyf8H/jTYfUq1b9LDgJmDtAGsuyVA 4l7i3Tn6sZEfIny6iS7rPIT55cdB6ku/7A81f85tcY2nzfYbRcH00ccLtPhtvEb0 WcwYrxMYOWXOGy9lT5SO0h+aT4a5eoaxcgGR34+Ekiphji2Hs8INYtcXVo0tnlap GZ8wV3WNNyqXhTkzdqZO8S98LcBDGYxBp1qeRtcsk9+syW9mapC5vJcqzEf2rwCr FbU0sE+yNvA67pVGxTqxokcRX0bU3VZtwgNCdtmNGXZ+6UFtDrUe5ewNJeW0I34B rAcoAoZ1grI4iA0TN9evGBM4XtAIlKZTV82Qtz5WGm5bfopzCtXIAKNd9Q9IkJo= =S5SL -----END PGP SIGNATURE----- _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users