Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Nov 2014 00:08:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 195319] New: security/heimdal moved libs, did not fix pkg-config; broke existing binaries
Message-ID:  <bug-195319-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195319

            Bug ID: 195319
           Summary: security/heimdal moved libs, did not fix pkg-config;
                    broke existing binaries
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: hrs@FreeBSD.org
          Reporter: freebsd@phil.spodhuis.org
          Assignee: hrs@FreeBSD.org
             Flags: maintainer-feedback?(hrs@FreeBSD.org)

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.

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Auto-assigned to maintainer hrs@FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195319-13>