Bug 205461

Summary: www/squid: Building v3.5.12 with heimdal fails
Product: Ports & Packages Reporter: dewayne
Component: Individual Port(s)Assignee: Jason Unovitch <junovitch>
Status: Closed FIXED    
Severity: Affects Some People CC: junovitch, timp87
Priority: --- Keywords: easy, patch-ready
Version: LatestFlags: koobs: maintainer-feedback+
junovitch: merge-quarterly+
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
squid 3.5.12 config.log.xz with failure outcome
none
fix koobs: maintainer-approval+

Description dewayne 2015-12-20 14:19:30 UTC
Having failed to build 3.5.12 on FreeBSD 10.2Stable, I reverted the Makefile to 3.5.11  
svnlite update -r '{2015-12-02}' /usr/ports/www/squid/Makefile
to ensure that everything was working. I then built the port on both amd64 and i386. :)

Ok lets try 3.5.12 again:
#svnlite update /usr/ports/www/squid/Makefile
Updated to revision 404052.
# cd /usr/ports/www/squid 
# make showconfig |grep =on
     AUTH_LDAP=on: Install LDAP authentication helpers
     AUTH_SASL=on: Install SASL authentication helpers
     AUTH_SMB=on: Install SMB auth. helpers (req. Samba)
     DOCS=on: Build and/or install documentation
     EXAMPLES=on: Build and/or install examples
     FS_AUFS=on: AUFS (threaded-io) support
     FS_DISKD=on: DISKD storage engine controlled by separate service
     IPV6=on: IPv6 protocol support
     KQUEUE=on: Kqueue(2) support
     SSL=on: SSL gatewaying support
     SSL_CRTD=on: Use ssl_crtd to handle SSL cert requests
     GSSAPI_HEIMDAL=on: Build with Kerberos support from security/heimdal

# make makesum; make clean; make -DBATCH package
fails with 
===>  Script "configure" failed unexpectedly.
Please report the problem to timp87@gmail.com [maintainer] and attach the
"/var/ports/usr/ports/www/squid/work/squid-3.5.12/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

# egrep "mit-krb5-gssapi" "/var/ports/usr/ports/www/squid/work/squid-3.5.12/config.log"
configure:23572: $PKG_CONFIG --exists --print-errors "mit-krb5-gssapi mit-krb5"
Package mit-krb5-gssapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `mit-krb5-gssapi.pc'
Package 'mit-krb5-gssapi', required by 'world', not found

# make -VHEIMDAL_HOME -VGSSAPIBASEDIR
/usr/local
/usr/local

This is my third and fourth attempt to build.  I use ccache, but cleaned and reset it; I also rm all work files and did a complete pkg delete -fa before this current cycle.

Has anyone built squid 3.5.12 on FreeBSD 10.2Stable using heimdal?  Unfortunately searching the squid lists, this might be relevant:

From http://lists.squid-cache.org/pipermail/squid-announce/2015-November/000033.html
"* Bug #4228: links with krb5 libs despite --without options

The Kerberos library --without-mit-kb5 and --without-heimdal-krb5
options were not working in previous 3.5 releases and could result in
build errors. This has been corrected."

Unfortunately I migrated from 3.4 to 3.5 on this build iteration, however 3.5.11 appears to have the required libraries
/usr/local/sbin/squid:
        librt.so.1 => /usr/lib/librt.so.1 (0x28521000)
        libmd5.so.0 => /usr/local/lib/libmd5.so.0 (0x28527000)
        libssl.so.8 => /usr/local/lib/libssl.so.8 (0x28529000)
        libheimntlm.so.0 => /usr/local/lib/heimdal/libheimntlm.so.0 (0x28584000)
        libhx509.so.5 => /usr/local/lib/heimdal/libhx509.so.5 (0x2858a000)
        libcom_err.so.1 => /usr/local/lib/heimdal/libcom_err.so.1 (0x285c9000)
        libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x285cc000)
        libasn1.so.8 => /usr/local/lib/heimdal/libasn1.so.8 (0x2875d000)
        libwind.so.0 => /usr/local/lib/heimdal/libwind.so.0 (0x287f1000)
        libroken.so.18 => /usr/local/lib/heimdal/libroken.so.18 (0x28819000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x28828000)
        libm.so.5 => /lib/libm.so.5 (0x2884c000)
        libkrb5.so.26 => /usr/local/lib/heimdal/libkrb5.so.26 (0x28876000)
        libgssapi.so.3 => /usr/local/lib/heimdal/libgssapi.so.3 (0x288e0000)
        libltdl.so.7 => /usr/local/lib/libltdl.so.7 (0x28912000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x2891b000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x289ca000)
        libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x289e4000)
        libthr.so.3 => /lib/libthr.so.3 (0x289ff000)
        libc.so.7 => /lib/libc.so.7 (0x28a20000)
        libz.so.6 => /lib/libz.so.6 (0x28b92000)
        libheimbase.so.1 => /usr/local/lib/heimdal/libheimbase.so.1 (0x28ba7000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28bab000)

And finally
# uname -aKU
FreeBSD b2.hs 10.2-STABLE FreeBSD 10.2-STABLE #0 r292253M: Wed Dec 16 01:06:47 AEDT 2015     root@hathor:/usr/obj/prod/100202/D/K8/pd3/src/sys/hqdev-amd64-smp-vga       amd64 1002503 1002503

Happy to assist further.
Regards, Dewayne.
Comment 1 dewayne 2015-12-20 14:23:57 UTC
Created attachment 164421 [details]
squid 3.5.12 config.log.xz with failure outcome
Comment 2 Pavel Timofeev 2015-12-20 17:06:52 UTC
Hi! I think I know what led to this fault.
I upgraded www/squid to 3.5.12 release and deleted self-written ugly patch because upstream 'fixed' it.
It's a part of patch-configure patch.
https://svnweb.freebsd.org/ports?view=revision&revision=403151
Sorry, I should have checked it better.

I suggest you to checkout from svn not only Makefile, but all www/squid dir of 3.5.11 release.
I'll try look at it closely tomorrow.
Comment 3 Pavel Timofeev 2015-12-23 08:26:00 UTC
Sorry, I need more time to find a solution than I expected.
Comment 4 Pavel Timofeev 2015-12-31 08:51:47 UTC
Created attachment 164894 [details]
fix

Fix squid build with Heimdal from ports.
Additionally fix squid build with base Heimdal when Heimdal from ports is installed.

I khow, it's pretty stupid and direct.  
IMO this should be fixed by upstream. I'm going to create bug report in squid bugzilla for that.

P. S. sorry for the delay. I've been reeeally busy.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-31 14:12:41 UTC
@Tim, does this need to be MFH'd ?

Also, don't forget to set maintainer-approval to + on your own attachments, or those that you approve created by others on ports you maintain :)
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-31 14:13:37 UTC
@Dewayne, could you confirm whether this patch resolves the issue for you please?
Comment 7 Pavel Timofeev 2015-12-31 14:39:42 UTC
(In reply to Kubilay Kocak from comment #5)
It defininitely has to be MFH'd if squid 3.5.12 is there.
Sorry, I forget it every time.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-31 15:29:08 UTC
(In reply to timp87 from comment #7)

That's OK, it will be automated soon (at least for your patches you create)

:]
Comment 9 dewayne 2016-01-04 06:50:16 UTC
(In reply to Kubilay Kocak from comment #6)
Thank-you for pursuing.  Yes, appling the patch enables a successful build on both amd64 and i386 servers, which are now running squid 3.5.12 quite happily.
Comment 10 commit-hook freebsd_committer freebsd_triage 2016-01-05 01:52:27 UTC
A commit references this bug:

Author: junovitch
Date: Tue Jan  5 01:52:09 UTC 2016
New revision: 405267
URL: https://svnweb.freebsd.org/changeset/ports/405267

Log:
  www/squid: Heimdal option build fixes

  - Fix squid build with Heimdal from ports.
  - Additionally fix squid build with base Heimdal when Heimdal from ports
    is installed.

  PR:		205461
  Reported by:	dewayne@heuristicsystems.com.au
  Submitted by:	Pavel Timofeev <timp87@gmail.com> (maintainer)
  MFH:		2016Q1 (build fix blanket)

Changes:
  head/www/squid/files/patch-configure
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-01-05 01:53:29 UTC
A commit references this bug:

Author: junovitch
Date: Tue Jan  5 01:52:53 UTC 2016
New revision: 405268
URL: https://svnweb.freebsd.org/changeset/ports/405268

Log:
  MFH: r405267

  www/squid: Heimdal option build fixes

  - Fix squid build with Heimdal from ports.
  - Additionally fix squid build with base Heimdal when Heimdal from ports
    is installed.

  PR:		205461
  Reported by:	dewayne@heuristicsystems.com.au
  Submitted by:	Pavel Timofeev <timp87@gmail.com> (maintainer)
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2016Q1/
  branches/2016Q1/www/squid/files/patch-configure
Comment 12 Jason Unovitch freebsd_committer freebsd_triage 2016-01-05 01:56:28 UTC
Dewayne,
Thank you for reporting and testing this patch.

Pavel,
Thanks for your continued efforts taking care of Squid and working with upstream to get this fixed in the future.