出现的错误是
forward.c:43:44: linux/netfilter_ipv4/ip_tproxy.h: No such file or directory
forward.c: In function `fwdConnectStart':
forward.c:466: error: storage size of 'itp' isn't known
forward.c:599: error: `TPROXY_ASSIGN' undeclared (first use in this function)
forward.c:599: error: (Each undeclared identifier is reported only once
forward.c:599: error: for each function it appears in.)
forward.c:600: error: `IP_TPROXY' undeclared (first use in this function)
forward.c:606: error: `TPROXY_FLAGS' undeclared (first use in this function)
forward.c:607: error: `ITP_CONNECT' undeclared (first use in this function)
forward.c:466: warning: unused variable `itp'
make[3]: *** [forward.o] Error 1
make[3]: Leaving directory `/usr/local/src/squid-2.6.STABLE13/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/squid-2.6.STABLE13/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/squid-2.6.STABLE13/src'
make: *** [all-recursive] Error 1
---------------------------------------------------------------------------------------------------------------------------------------------------------
centos6.2 centos5.8 32位老至强2.8
./configure –prefix=/usr/local/squid --with-filedescriptors=20480
make时报错:
ext_file_userip_acl.cc:254: error: ‘errno’ was not declared in this scope
修改
helpers/external_acl/file_userip/ext_file_userip_acl.cc
#include "util.h" 下面加一行 #include <cerrno> |
make && make install
---------------------------------------------------------------------------------------------------------------------------------------------------------
另centos5.8 gcc 4.1.2 make时报错:
ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT::operator+=(int)’:
/root/squid-3.2.1/src/ipc/../../src/ipc/AtomicWord.h:31: undefined reference to `__sync_add_and_fetch_4′
collect2: ld returned 1 exit status
需要在CFLAGS中设置-march 如下:
./configure CFLAGS=”-march=pentium4″ CXXFLAGS=”-march=pentium4″
根据cpu和gcc版本的不同,更多的CFLAGS选项见这里:
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Core_2_Duo.2FQuad.2C_Xeon_51xx.2F53xx.2F54xx.2F3360.2C_Pentium_Dual-Core_T23xx.2B.2FExxxx.2C_Celeron_Dual-Core
点击链接(http://www.zhaokunyao.com/archives/3974)