Commit 7ffdbf37 in freebsd-ports was "Move headers and libraries into PREFIX/{include,lib}/heimdal". The commit neglected to update "libdata/pkgconfig/heimdal-gssapi.pc", thus programs built using pkg-config can not pick up the new library location, and end up building against system libraries. In addition, because the new location is not in the system library path, and nothing in the ".pc" file says to update the RPATH, programs will successfully build and link, but the run-time linker will fail to resolve the heimdal libraries. I am one of the Exim maintainers, I use heimdal-gssapi in building Exim locally (not an option exposed by the mail/exim port, and I'm building from source as an upstream maintainer anyway). This change meant that a "pkg upgrade" broke my running MTA because the upgrade did not leave the old libraries in the compat/ area, so non-Ports programs suddenly break. So, minimally, there needs to be an UPDATING notice of this breaking change, but ideally there would also be a migration compatibility aid to not just nuke libraries from appearing anywhere in the system runtime library path. To be able to use the new locations, I modified `heimdal-gssapi.pc` to state: libdir=${exec_prefix}/lib/heimdal includedir=${prefix}/include/heimdal and on the `Libs:` line, after the `-L${libdir}` I added: `-Wl,-rpath=${libdir}` With those three changes to the pkg-config spec for heimdal-gssapi, Exim once more builds and links and the resulting binary can be successfully loaded by the runtime linker.
Auto-assigned to maintainer hrs@FreeBSD.org
A commit references this bug: Author: hrs Date: Mon Nov 24 00:34:38 UTC 2014 New revision: 373188 URL: https://svnweb.freebsd.org/changeset/ports/373188 Log: - Fix heimdal-gssapi.pc. - Add an UPDATING entry. PR: 195319 Changes: head/UPDATING head/security/heimdal/Makefile head/security/heimdal/files/patch-tools-heimdal-gssapi.pc.in
Thank you for your report and I am sorry for the breakage. I fixed heimdal-gssapi.pc and added an entry into UPDATING just now. If there is still something wrong, please let me know.
Changes have made it to git in svn_head branch and look sane to me there, thanks. Sometime after this propagates out to where a poudriere run can pick up the changes, I'll try it out, but with US holidays this week it may be a week or so before I do. Thanks.