[MacPorts] #47583: kerberos5 @1.13.1 build fail: undefined symbol __et_list

MacPorts noreply at macports.org
Tue Apr 28 10:59:09 PDT 2015


#47583: kerberos5 @1.13.1 build fail: undefined symbol __et_list
-----------------------------+--------------------------------
  Reporter:  dan+macports@…  |      Owner:  macports-tickets@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.3.3
Resolution:                  |   Keywords:
      Port:  kerberos5       |
-----------------------------+--------------------------------
Changes (by cal@…):

 * cc: cal@… (added)


Comment:

 The `--with-system-et` flag is correct, because without it, kerberos5 will
 build and install its own private copy of `libcomm_err.dylib`, which will
 conflict with other ports. I made the change to move `libcom_err` into a
 separate port a few years ago because a different port (I think it was
 e2fsprogs or something) also installs the library, making the two ports
 conflict.

 However, "system" in this case does not necessarily mean "/usr/lib", it
 just means "don't build your own copy". This would work fine by default,
 because we normally pass `-L/opt/local/lib` (or `-L/opt/lib` in your case)
 in `LDFLAGS`. However, in the case of kerberos5, this will make kerberos
 link against an older installed version of itself, possibly failing along
 the way. For this reason, the kerberos5 Portfile explicitly removes this
 in line 48.

 That alone is still not enough for the build to go wrong, because MacPorts
 also sets the `LIBRARY_PATH` environment variable to `$prefix/lib`, which
 is picked up by modern compilers/linkers before it checks for libraries in
 `/usr/lib`. Your toolchain on 10.7, however, seems to be too old for this.

 You can apply the following patch to your kerberos5 Portfile to fix the
 issue locally:
 {{{
 #!patch
 Index: Portfile
 ===================================================================
 --- Portfile    (revision 135531)
 +++ Portfile    (working copy)
 @@ -4,6 +4,7 @@
  PortSystem                  1.0
  PortGroup                   github 1.0
  PortGroup                   compiler_blacklist_versions 1.0
 +PortGroup                   conflicts_build 1.0

  github.setup                krb5 krb5 1.13.1-final krb5-
  name                        kerberos5
 @@ -43,9 +44,7 @@

  use_autoreconf              yes
  # kerberos5 fails to build in its own presence, see #23769, #37944
 -# remove ${prefix}/lib from configure.ldflags to allow linking against
 its own libs first
 -# adding ${worksrcpath}/lib is not necessary and pollutes krb5-config
 --libs and pkg-config files
 -configure.ldflags-delete    -L${prefix}/lib
 +conflicts_build             $name
  configure.python            ${prefix}/bin/python2.7
  configure.args              --mandir=${prefix}/share/man \
                              --with-system-et \
 }}}

 I'd be willing to take a patch that does what this patch does
 conditionally on systems that don't support `LIBRARY_PATH`.

-- 
Ticket URL: <https://trac.macports.org/ticket/47583#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list