#59714 closed defect (fixed)

py38-gssapi: OSError: dlopen(libgssapi_krb5.so, 6): image not found

Reported by: ryandesign (Ryan Schmidt) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: tiger leopard snowleopard Cc:
Port: py-gssapi

Description

py38-gssapi fails to build on 10.6:

Building from Cython files...
Traceback (most recent call last):
  File "setup.py", line 173, in <module>
    GSSAPI_LIB = ctypes.CDLL(os.path.join(main_path, main_lib))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ctypes/__init__.py", line 369, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgssapi_krb5.so, 6): image not found

Ignoring the unusual .so suffix for a moment, what seems to be happening is that (from setup.py) py-gssapi uses the macOS GSS framework on 10.7 and later:

osx_has_gss_framework = False
if sys.platform == 'darwin':
    mac_ver = [int(v) for v in platform.mac_ver()[0].split('.')]
    osx_has_gss_framework = (mac_ver >= [10, 7, 0])
    if osx_has_gss_framework:
        link_args = ['-framework', 'GSS']
    else:
        link_args = shlex.split(get_output('krb5-config --libs gssapi'))

So I think this means a dependency on port:kerberos5 should be added if {${os.platform} eq "darwin" && ${os.major} < 11}.

Change History (7)

comment:1 Changed 14 months ago by tobypeterson

I’d prefer to use the same dependencies on all platforms if possible. I don’t have any way to test on older operating systems, so maybe I’ll just have it use k5 on Catalina and see how it goes.

comment:2 Changed 14 months ago by ryandesign (Ryan Schmidt)

Sure, that would be fine.

We do already have other situations though where deps vary by OS version. For example, mongodb uses the macOS Security framework on El Capitan and later and openssl on older systems where the Security framework isn't new enough.

comment:3 Changed 10 months ago by ryandesign (Ryan Schmidt)

comment:4 Changed 10 months ago by tobypeterson

I’m aware, but I’m also not thrilled about supporting an 11 year old operating system.

comment:5 Changed 10 months ago by ryandesign (Ryan Schmidt)

Seems like it would be a simple matter to commit the fix discussed here.

Alternately, if a port does not work on an OS version, please mark the port as such so that we don't waste our limited buildbot resources trying to build something we already know won't build.

comment:6 Changed 10 months ago by tobypeterson

Dropping support for 10.6 would save a whole lot more, yeah?

comment:7 Changed 10 months ago by tobypeterson

Resolution: fixed
Status: assignedclosed

In 3394c93ae2ca1eb46bc9888c89a48a46b46dee3a/macports-ports (master):

py-gssapi: add kerberos5 dependency on old macOS versions; fixes #59714

Note: See TracTickets for help on using tickets.