Package: squid
Version: 2.7.STABLE7-1

I was trying to build a fresh copy of squid on a new testing box, but the build 
failed with the following:

  In file included from /usr/include/sys/capability.h:32, from tools.c:50:
  /usr/include/linux/capability.h:73: error: expected specifier-qualifier-list 
before ‘__le32’

I'm running Sid/Unstable on a Sparc64 box (Sunfire T2000).  Custom-built 2.6.31 
kernel (SMP/niagara).

This appears to stem from Squid having a workaround for problems in the linux 
system includes and libcap.  Debian unstable now has a new version of libcap2 
and the kernel where the workaround isn't needed.  This breaks the build, as 
the workaround is now conflicts with libcap2:

  http://www.squid-cache.org/mail-archive/squid-dev/200910/0117.html

Sounds like upstream is working on removing the kludge "officially".  In the 
meantime, Gentoo has already hit this issue:

  http://bugs.gentoo.org/show_bug.cgi?id=264770

And portage has a patch that appears to fix the build under Debian 
(squid-2-capability.patch), which I've shamelessly included here from 
http://gentoo.mirrors.tds.net/pub/gentoo-portage/net-proxy/squid/files/squid-2-capability.patch:

--- configure.in        2009-02-04 01:44:06.000000000 +0100
+++ configure.in        2009-06-23 20:59:28.000000000 +0200
@@ -1694,7 +1694,6 @@
        db.h \
        db_185.h \
        aio.h \
-       sys/capability.h \
 ,,,[
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -1728,6 +1727,13 @@
 #endif
 ])
 
+dnl Check for libcap header
+AC_ARG_ENABLE(caps,
+[  --disable-caps  disable usage of Linux capabilities library to control 
privileges])
+if test "x$enable_caps" != xno; then
+       AC_CHECK_HEADERS( sys/capability.h )
+fi
+
 dnl Check for IP-Filter headers. These are a bit nasty..
 AC_CHECK_HEADERS( \
        ip_compat.h \
--- src/tools.c 2008-10-06 23:27:17.000000000 +0200
+++ src/tools.c 2009-06-23 20:57:42.000000000 +0200
@@ -42,11 +42,6 @@
 
 #ifdef _SQUID_LINUX_
 #if HAVE_SYS_CAPABILITY_H
-#undef _POSIX_SOURCE
-/* Ugly glue to get around linux header madness colliding with glibc */
-#define _LINUX_TYPES_H
-#define _LINUX_FS_H
-typedef uint32_t __u32;
 #include <sys/capability.h>
 #endif
 #endif


  


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to