Opened 3 weeks ago

Last modified 3 weeks ago

#59714 assigned defect

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 (2)

comment:1 Changed 3 weeks 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 3 weeks 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.

Note: See TracTickets for help on using tickets.