[squid-users] Linker error while compiling version 3.5.12 after applying a patch

Oğuz İsmail Uysal oguzismailuysal at gmail.com
Thu Jan 12 11:54:33 UTC 2017


I have downloaded source tarball from
http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.12.tar.gz .
I have downloaded the patch I have mentioned from
http://www.squid-cache.org/Versions/v3/3.5/changesets/SQUID-2016_5.patch
then applied to source.
I have installed building tools by typing
>apt build-dep squid
to terminal.
While compiling source on Ubuntu 16.04 x64 I got these errors;
/bin/bash ../libtool  --tag=CXX   --mode=link g++
-DDEFAULT_CACHEMGR_CONFIG=\"/etc/squid/cachemgr.conf\"
-I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments
-Wshadow -Werror -pipe -D_REENTRANT -m64 -I/usr/include/p11-kit-1 -g -O2
-fPIE -fstack-protector-strong -Wformat -Werror=format-security -std=c++11
 -m64 -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -o
cachemgr.cgi cachemgr__CGIEXT_-cachemgr.o cachemgr__CGIEXT_-stub_debug.o
cachemgr__CGIEXT_-test_tools.o cachemgr__CGIEXT_-time.o ../src/ip/libip.la
../lib/libmiscencoding.la ../lib/libmiscutil.la ../compat/libcompat-squid.la
 -lnettle -L/usr/lib/x86_64-linux-gnu/mit-krb5 -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err  -lm -lnsl -lresolv -lcap -lnetfilter_conntrack -lrt
-ldl -ldl
libtool: link: g++ -DDEFAULT_CACHEMGR_CONFIG=\"/etc/squid/cachemgr.conf\"
-I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments
-Wshadow -Werror -pipe -D_REENTRANT -m64 -I/usr/include/p11-kit-1 -g -O2
-fPIE -fstack-protector-strong -Wformat -Werror=format-security -std=c++11
-m64 -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o
cachemgr.cgi cachemgr__CGIEXT_-cachemgr.o cachemgr__CGIEXT_-stub_debug.o
cachemgr__CGIEXT_-test_tools.o cachemgr__CGIEXT_-time.o
 ../src/ip/.libs/libip.a ../lib/.libs/libmiscencoding.a
../lib/.libs/libmiscutil.a ../compat/.libs/libcompat-squid.a -lnettle
-L/usr/lib/x86_64-linux-gnu/mit-krb5 -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lm -lnsl -lresolv -lcap -lnetfilter_conntrack -lrt -ldl
cachemgr__CGIEXT_-cachemgr.o: In function `munge_menu_line':
/root/squid-3.5.12/tools/cachemgr.cc:439: undefined reference to
`MemBuf::append(char const*, long)'
cachemgr__CGIEXT_-cachemgr.o: In function `MemBuf::~MemBuf()':
/root/squid-3.5.12/tools/../src/MemBuf.cci:17: undefined reference to
`MemBuf::clean()'
cachemgr__CGIEXT_-cachemgr.o: In function `read_reply(int,
cachemgr_request*)':
/root/squid-3.5.12/tools/cachemgr.cc:701: undefined reference to
`MemBuf::init()'
cachemgr__CGIEXT_-cachemgr.o: In function `munge_other_line':
/root/squid-3.5.12/tools/cachemgr.cc:514: undefined reference to
`MemBuf::append(char const*, long)'
/root/squid-3.5.12/tools/cachemgr.cc:534: undefined reference to
`MemBuf::Printf(char const*, ...)'
/root/squid-3.5.12/tools/cachemgr.cc:539: undefined reference to
`MemBuf::append(char const*, long)'
/root/squid-3.5.12/tools/cachemgr.cc:497: undefined reference to
`MemBuf::Printf(char const*, ...)'
cachemgr__CGIEXT_-cachemgr.o: In function `munge_menu_line':
/root/squid-3.5.12/tools/cachemgr.cc:469: undefined reference to
`MemBuf::Printf(char const*, ...)'
cachemgr__CGIEXT_-cachemgr.o: In function `munge_other_line':
/root/squid-3.5.12/tools/cachemgr.cc:504: undefined reference to
`MemBuf::append(char const*, long)'
/root/squid-3.5.12/tools/cachemgr.cc:496: undefined reference to
`MemBuf::append(char const*, long)'
cachemgr__CGIEXT_-cachemgr.o: In function `munge_menu_line':
/root/squid-3.5.12/tools/cachemgr.cc:455: undefined reference to
`MemBuf::Printf(char const*, ...)'
/root/squid-3.5.12/tools/cachemgr.cc:473: undefined reference to
`MemBuf::Printf(char const*, ...)'
/root/squid-3.5.12/tools/cachemgr.cc:459: undefined reference to
`MemBuf::Printf(char const*, ...)'
cachemgr__CGIEXT_-cachemgr.o: In function `MemBuf::~MemBuf()':
/root/squid-3.5.12/tools/../src/MemBuf.cci:17: undefined reference to
`MemBuf::clean()'
cachemgr__CGIEXT_-cachemgr.o: In function `munge_menu_line':
/root/squid-3.5.12/tools/cachemgr.cc:464: undefined reference to
`MemBuf::Printf(char const*, ...)'
collect2: error: ld returned 1 exit status
Makefile:868: recipe for target 'cachemgr.cgi' failed
make[2]: *** [cachemgr.cgi] Error 1
make[2]: Leaving directory '/root/squid-3.5.12/tools'
Makefile:1053: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/squid-3.5.12/tools'
Makefile:579: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
What am I doing wrong ?
Without that patch it will not show any error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20170112/d32dcde9/attachment-0001.html>


More information about the squid-users mailing list