[squid-users] Compile error with Squid-3.5.1 under OpenBSD 5.5

Amos Jeffries squid3 at treenet.co.nz
Thu Jan 29 15:30:44 UTC 2015


On 30/01/2015 12:56 a.m., Theron ZORBAS wrote:
> Hi, 
> 
> I'm trying to compile squid-3.5.1 under OpenBSD 5.5 amd64. 
> 
> 
> I use gnutls as a depency package: 
> # pkg_info |grep gnutls 
> gnutls-3.2.15 GNU Transport Layer Security library 
> 
> 
> My configure parameters are: 
> ./configure --enable-arp-acl --disable-auth-basic --disable-auth-digest --enable-delay-pools --enable-external-acl-helpers="SQL_session file_userip session time_quota" --enable-forw-via-db --enable-negotiate-auth-helpers="no" --enable-removal-policies="lru heap" --enable-ssl --enable-ssl-crtd --enable-storeio="aufs ufs diskd" --with-pthreads --with-default-user=_squid --enable-follow-x-forwarded-for --mandir='/usr/local/man' --infodir='/usr/local/info' --enable-ipfw-transparent --disable-devpoll --disable-epoll --disable-ident-lookups --disable-loadable-modules --enable-forw-via-db --enable-http-violations --enable-icap-client --enable-ipv6 --with-filedescriptors=32768 --enable-stacktraces --enable-log-daemon-helpers="DB file" --enable-url-rewrite-helpers="fake" --enable-pf-transparent --with-openssl --disable-strict-error-checking --disable-arch-native 
> 
> And compile faults with these error messages: 
> depbase=`echo squidclient.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../lib -I../../src -I../../include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -pipe -D_REENTRANT -I/usr/include -I/usr/local/include -I/usr/local/include/p11-kit-1 -I/usr/include -O0 -g -fno-strict-overflow -Wno-error -MT squidclient.o -MD -MP -MF $depbase.Tpo -c -o squidclient.o squidclient.cc && mv -f $depbase.Tpo $depbase.Po 
> In file included from squidclient.cc:17: 
> ../../tools/squidclient/Transport.h:81: error: 'gnutls_anon_client_credentials_t' does not name a type 
> ../../tools/squidclient/Transport.h:84: error: 'gnutls_certificate_credentials_t' does not name a type 
> ../../tools/squidclient/Transport.h:87: error: 'gnutls_session_t' does not name a type 
> squidclient.cc: In function 'int main(int, char**)': 
> squidclient.cc:538: error: 'gnutls_error_is_fatal' was not declared in this scope 
> squidclient.cc:539: error: 'gnutls_strerror' was not declared in this scope 
> squidclient.cc:541: error: 'gnutls_strerror' was not declared in this scope 
> *** Error 1 in tools/squidclient (Makefile:892 'squidclient.o') 
> *** Error 1 in tools/squidclient (Makefile:994 'all-recursive') 
> *** Error 1 in tools (Makefile:1067 'all-recursive') 
> *** Error 1 in /opt/squid-3.5.1 (Makefile:592 'all-recursive') 
> 
> 
> How can I fix this? Thanks. 
> 

NP: If you dont specifially want HTTPS support in that command line tool
then the quick way is to use --without-gnutls. That will get past this
without affecting the HTTPS abilities in other parts of Squid.


Can you please provide the output of the command:
   pkg-config gnutls

(that is what Squid is using to find GnuTLS location).

If GnuTLS is installed at an unusual location you may need to add to the
./configure options:
  --with-gnutls=/path


Also, unrelated but the clang compiler is generally better to use than
GCC on recent BSD systems. You should only need to add these to your
./configure parameters:   CC="clang" CXX="clang++"


Amos


More information about the squid-users mailing list