[squid-users] Errors Compiling Squid on Windows Server using Cygwin

2021-04-23 Thread Brian Hall
Hello,

I have searched the previous posts and I can only find a mention of this issue 
from back in 2018 where the solution was to use 3.5. I would like to use 4.12 
instead of older versions because of the security concerns.

The following is the errors the compiler gave me:

In file included from /usr/include/w32api/lm.h:18,

from ext_lm_group_acl.cc:96:
/usr/include/w32api/lmserver.h:29:33: error: 'SERVICE_STATUS_HANDLE' was not 
declared in this scope; did you mean 'SERVICE_PAUSABLE'?
   29 |   WINBOOL WINAPI SetServiceBits(SERVICE_STATUS_HANDLE 
hServiceStatus,DWORD dwServiceBits,WINBOOL bSetBitsOn,WINBOOL 
bUpdateImmediately);
  | ^
  | SERVICE_PAUSABLE
/usr/include/w32api/lmserver.h:29:76: error: expected primary-expression before 
'dwServiceBits'
   29 |   WINBOOL WINAPI SetServiceBits(SERVICE_STATUS_HANDLE 
hServiceStatus,DWORD dwServiceBits,WINBOOL bSetBitsOn,WINBOOL 
bUpdateImmediately);
  | 
   ^
/usr/include/w32api/lmserver.h:29:98: error: expected primary-expression before 
'bSetBitsOn'
   29 |   WINBOOL WINAPI SetServiceBits(SERVICE_STATUS_HANDLE 
hServiceStatus,DWORD dwServiceBits,WINBOOL bSetBitsOn,WINBOOL 
bUpdateImmediately);
  | 
 ^~
/usr/include/w32api/lmserver.h:29:117: error: expected primary-expression 
before 'bUpdateImmediately'
   29 |   WINBOOL WINAPI SetServiceBits(SERVICE_STATUS_HANDLE 
hServiceStatus,DWORD dwServiceBits,WINBOOL bSetBitsOn,WINBOOL 
bUpdateImmediately);
  | 
^~
/usr/include/w32api/lmserver.h:29:135: error: expression list treated as 
compound expression in initializer [-fpermissive]
   29 |   WINBOOL WINAPI SetServiceBits(SERVICE_STATUS_HANDLE 
hServiceStatus,DWORD dwServiceBits,WINBOOL bSetBitsOn,WINBOOL 
bUpdateImmediately);
  | 
  ^
In file included from ../../../../compat/compat.h:105,
 from ../../../../include/squid.h:43,
 from ext_lm_group_acl.cc:78:
ext_lm_group_acl.cc: In function 'char* GetDomainName()':
ext_lm_group_acl.cc:173:19: error: format '%ld' expects argument of type 'long 
int', but argument 3 has type 'NTSTATUS' {aka 'int'} [-Werror=format=]
  173 | debug("OpenPolicy Error: %ld\n", status);
  |   ^  ~~
  |  |
  |  NTSTATUS {aka int}
../../../../compat/debug.h:31:41: note: in definition of macro 'debug'
   31 |  fprintf(stderr,X); \
  | ^
ext_lm_group_acl.cc:173:40: note: format string is defined here
  173 | debug("OpenPolicy Error: %ld\n", status);
  |  ~~^
  ||
  |long int
  |  %d
In file included from ../../../../compat/compat.h:105,
 from ../../../../include/squid.h:43,
 from ext_lm_group_acl.cc:78:
ext_lm_group_acl.cc:184:23: error: format '%ld' expects argument of type 'long 
int', but argument 3 has type 'NTSTATUS' {aka 'int'} [-Werror=format=]
  184 | debug("LsaQueryInformationPolicy Error: %ld\n", status);
  |   ^~~~  ~~
  | |
  | 
NTSTATUS {aka int}
../../../../compat/debug.h:31:41: note: in definition of macro 'debug'
   31 |  fprintf(stderr,X); \
  | ^
ext_lm_group_acl.cc:184:59: note: format string is defined here
  184 | debug("LsaQueryInformationPolicy Error: %ld\n", status);
  | ~~^
  |   |
  |   long int
  | %d
In file included from ../../../../compat/compat.h:105,
 from ../../../../include/squid.h:43,
 from ext_lm_group_acl.cc:78:
ext_lm_group_acl.cc:214:15: error: format '%ld' expects argument of type 'long 
int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Werror=format=]
  214 | debug("NetWkstaGetInfo Error: %ld\n", netret);
  

Re: [squid-users] Errors Compiling Squid Proxy on Windows using Cygwin

2018-12-16 Thread Amos Jeffries
On 15/12/18 8:52 am, Russel McDonald wrote:
> Hi,
> 
>  I’ve followed the small set of steps for building squid proxy using
> Cygwin on Windows 7 but am getting compile time errors. Specifically the
> below. Sorry for emailing this question if this has been answered. I
> searched past emails and the most recent hit on errors building on
> Windows was from 2010.
> 
>  
> 
> Cygwin version 2.11.2 from Nov 8/2018 and installed ALL features
> including devel.
> 
> Downloaded squid source, tar –xvf  squid-3.5.11.tar.gz (I tried version
> 3.5.28 as well)
> 
> ./configure --bindir=/bin/squid --sbindir=/usr/sbin/squid
> --sysconfdir=/etc/squid    --datadir=/usr/share/squid
> --libexecdir=/usr/lib/squid --disable-strict-error-checking   
> --with-logdir=/var/log/squid --with-swapdir=/var/cache/squid
> 
> And tried with --enable-win32-service as well.
> 
>  
> 
> Then make produces the error below. What am I doing incorrectly?
> 

Your Squid is detecting the existence of Windows OS headers and trying
to build a helper which has bugs in your environment.

This type of problem is why the Diladele Cygwin instructions (and other
OS cross-building) list the helpers to build explicitly whereas native
builds can just use the auto-detect by ./configure. Doing the same for
your build will both avoid this issue and reduce the size of your Squid
build.


Please open a bug report in our bugzilla about this so it does not get
forgotten. I am not aware of anyone working on Windows bugs right now so
no ETA on when it might get fixed.

Amos
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


[squid-users] Errors compiling squid

2003-12-18 Thread Daniele Ricci
Hello,

compiling squid (version 2.5.STABLE3) configured with
--enable-basic-auth-helpers=helpers I receive compiling errors of type
   FATAL: file.h not found
with helper LDAP the files are: ldap.h and lber.h
with helper PAM the file is: pam_appl.h
with helper SASL the file is: sasl.h
I suppose I need some libabry in order to compile squid with this
options, is it correct? In this case, which libraries I need?
Thnak you for your time,
Daniele Ricci.



Re: [squid-users] Errors compiling squid

2003-12-18 Thread Henrik Nordstrom
On Thu, 18 Dec 2003, Daniele Ricci wrote:

 with helper LDAP the files are: ldap.h and lber.h

Then you are missing the OpenLDAP development headers and libraries.

 with helper PAM the file is: pam_appl.h

Then you are missing the PAM development headers and libraries.

 with helper SASL the file is: sasl.h

Then you are missing the SALS development headers and libraries.

Regards
Henrik