Note: currently squid3 fails due to libecap3-dev dependency, this is easily fixed by going back to libecap2-dev (only squid 3.5+ will build with libecap3-dev [1]).
After libecap2-dev dependency fix, squid then fails due to "logical-not-parentheses".
g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -isystem /usr
/include/mit-krb5 -isystem /usr/include/mit-krb5 -I. -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -
isystem /usr/include/mit-krb5 -isystem /usr/include/mit-krb5 -I/usr/include/libxml2 -Wall -Wpointer
-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -m64 -g -O2 -fPIE -fstack-protector-st
rong -Wformat -Werror=format-security -std=c++0x -c -o lru/store_repl_lru.o lru/store_repl_lru.cc
heap/store_repl_heap.cc: In function 'StoreEntry* heap_purgeNext(RemovalPurgeWalker*)':
heap/store_repl_heap.cc:224:36: error: logical not is only applied to the left hand side of compari
son [-Werror=logical-not-parentheses]
if (!heap_nodes(heap->theHeap) > 0) ^
Fixing that, it then fails due to mismatching headers between linux-libc-dev_4.2.0-10.11 and libc6-dev_2.21-0ubuntu4.
In file included from /usr/include/linux/netfilter.h:7:0, from /usr/include/linux/netfilter_ipv4.h:8, from Intercept.cc:99:
/usr/include/linux/in.h:28:16: error: redeclaration of 'IPPROTO_IP'
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
In file included from /usr/include/arpa/inet.h:22:0, from ../../include/util.h:42, from ../../include/Array.h:39, from ../../src/comm/forward.h:4, from ../../src/comm/Connection.h:40, from Intercept.cc:34:
/usr/include/netinet/in.h:42:5: note: previous declaration '<anonymous enum> IPPROTO_IP'
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
^
In file included from /usr/include/linux/netfilter.h:7:0, from /usr/include/linux/netfilter_ipv4.h:8, from Intercept.cc:99:
/usr/include/linux/in.h:30:18: error: redeclaration of 'IPPROTO_ICMP'
IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
^
In file included from /usr/include/arpa/inet.h:22:0, from ../../include/util.h:42, from ../../include/Array.h:39, from ../../src/comm/forward.h:4, from ../../src/comm/Connection.h:40, from Intercept.cc:34:
/usr/include/netinet/in.h:44:5: note: previous declaration '<anonymous enum> IPPROTO_ICMP'
IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */
^
<snip>
Tried to ignore "#include linux/netfilter.h" in src/ip/Intercept.cc:99 to no avail as build fails later on due to missing "SO_ORIGINAL_DST" in Intercept.cc. Removing arpa and netinet header inclusions also lead to eventual build failures due to missing symbols.
So far I have found no way to have squid linking solely to either the kernel or libc without disabling netfilter altogether.
Note: currently squid3 fails due to libecap3-dev dependency, this is easily fixed by going back to libecap2-dev (only squid 3.5+ will build with libecap3-dev [1]).
After libecap2-dev dependency fix, squid then fails due to "logical- not-parentheses ".
g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -isystem /usr mit-krb5 -I. -I/usr/ include/ libxml2 -D_FORTIFY_SOURCE=2 - mit-krb5 -isystem /usr/include/ mit-krb5 -I/usr/ include/ libxml2 -Wall -Wpointer protector- st format- security -std=c++0x -c -o lru/store_ repl_lru. o lru/store_ repl_lru. cc repl_heap. cc: In function 'StoreEntry* heap_purgeNext( RemovalPurgeWal ker*)': repl_heap. cc:224: 36: error: logical not is only applied to the left hand side of compari logical- not-parentheses ] nodes(heap- >theHeap) > 0)
^
/include/mit-krb5 -isystem /usr/include/
isystem /usr/include/
-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT -m64 -g -O2 -fPIE -fstack-
rong -Wformat -Werror=
heap/store_
heap/store_
son [-Werror=
if (!heap_
Fixing that, it then fails due to mismatching headers between linux-libc- dev_4.2. 0-10.11 and libc6-dev_ 2.21-0ubuntu4.
In file included from /usr/include/ linux/netfilter .h:7:0,
from /usr/include/ linux/netfilter _ipv4.h: 8,
from Intercept.cc:99: linux/in. h:28:16: error: redeclaration of 'IPPROTO_IP' arpa/inet. h:22:0,
from ../../include/ util.h: 42,
from ../../include/ Array.h: 39,
from ../../src/ comm/forward. h:4,
from ../../src/ comm/Connection .h:40,
from Intercept.cc:34: netinet/ in.h:42: 5: note: previous declaration '<anonymous enum> IPPROTO_IP' linux/netfilter .h:7:0,
from /usr/include/ linux/netfilter _ipv4.h: 8,
from Intercept.cc:99: linux/in. h:30:18: error: redeclaration of 'IPPROTO_ICMP' arpa/inet. h:22:0,
from ../../include/ util.h: 42,
from ../../include/ Array.h: 39,
from ../../src/ comm/forward. h:4,
from ../../src/ comm/Connection .h:40,
from Intercept.cc:34: netinet/ in.h:44: 5: note: previous declaration '<anonymous enum> IPPROTO_ICMP'
/usr/include/
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
In file included from /usr/include/
/usr/include/
IPPROTO_IP = 0, /* Dummy protocol for TCP. */
^
In file included from /usr/include/
/usr/include/
IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
^
In file included from /usr/include/
/usr/include/
IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */
^
<snip>
Tried to ignore "#include linux/netfilter.h" in src/ip/ Intercept. cc:99 to no avail as build fails later on due to missing "SO_ORIGINAL_DST" in Intercept.cc. Removing arpa and netinet header inclusions also lead to eventual build failures due to missing symbols.
So far I have found no way to have squid linking solely to either the kernel or libc without disabling netfilter altogether.
[1] http:// wiki.squid- cache.org/ ConfigExamples/ ContentAdaptati on/eCAP# Build_eCAP_ library