[squid-users] Compiling Squid under Cygwin

Amos Jeffries squid3 at treenet.co.nz
Wed Oct 28 17:27:22 UTC 2015


On 29/10/2015 5:11 a.m., Yakovlev, Vadim wrote:
> Hello all,
> 
> I'm trying to compile Squid 3.5.10 for Windows with Cygwin, and ran into number of problems. Some I was able to resolve, but finally stuck at compiling negotiate_sspi_auth helper. In particular, I get "error: 'SSP_blobP' was not declared in this scope" in negotiate_sspi_auth.cc. The only place I've found where SSP_blobP type is defined is sspwin32.h, and it is defined only if _SQUID_WINDOWS_ macro is also defined:
> 
> #if _SQUID_WINDOWS_
> ...
> typedef char * SSP_blobP;
> ...
> #endif /* _SQUID_WINDOWS_ */
> 
> But _SQUID_WINDOWS_, which may be defined in osdetect.h, is not defined if we are on Cygwin:
> 
> #elif defined(__CYGWIN__)
> #define _SQUID_CYGWIN_ 1
> 
> #elif defined(__MINGW32__) || defined(__MINGW__)
> #define _SQUID_MINGW_ 1
> #define _SQUID_WINDOWS_ 1
> 
> #elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
> #define _SQUID_WINDOWS_ 1
> 
> Since on Cygwin macro __CYGWIN__ is defined, then only _SQUID_CYGWIN_ becomes defined, but _SQUID_WINDOWS_ is not. There are places in Squid code which are processed only when both _SQUID_CYGWIN_ and _SQUID_WINDOWS_ are defined, so as an experiment I've tried patching osdetect.h to make _SQUID_WINDOWS_ also defined when compiling on Cygwin, but that immediately produced hell of new errors during make: unresolved references, conflicting function declarations, etc.
> 
> So does anybody has an idea, how that should be corrected?


It is correct. CygWin presents a POSIX API for code and builds the same
as what a Unix/LinuxBSD build does.

The SSPI helpers are only for Native Windows API builds done with Visual
Studio and maybe MinGW. Neither of which are working yet.


PS. Windows packages are available from Diladele if you just want the
latest version.
<http://wiki.squid-cache.org/KnowledgeBase/Windows#Squid-3.5>

Amos


More information about the squid-users mailing list