Opened 12 days ago

Closed 12 days ago

Last modified 11 days ago

#60729 closed defect (fixed)

py-gssapi: fatal error: 'GSS/GSS.h' file not found

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

Description

py-gssapi fails to build at least on 10.8:

gssapi/raw/python_gssapi.h:2:10: fatal error: 'GSS/GSS.h' file not found
#include <GSS/GSS.h>
         ^

The documentation says GSS is available in macOS 10.14 and later, but that can't be right since it built fine on 10.9 and later.

Inspecting our buildbot systems, looks like GSS.h was added in 10.9.

On 10.9:

$ ls /System/Library/Frameworks/GSS.framework/Headers
GSS.h			gssapi.h		gssapi_apple.h		gssapi_krb5.h		gssapi_netlogon.h	gssapi_ntlm.h		gssapi_oid.h		gssapi_protos.h		gssapi_spnego.h

On 10.8:

$ ls /System/Library/Frameworks/GSS.framework/Headers
gssapi.h		gssapi_apple.h		gssapi_krb5.h		gssapi_netlogon.h	gssapi_ntlm.h		gssapi_oid.h		gssapi_protos.h		gssapi_spnego.h

On 10.7:

$ ls /System/Library/Frameworks/GSS.framework/Headers
gssapi.h		gssapi_krb5.h		gssapi_netlogon.h	gssapi_ntlm.h		gssapi_spnego.h

On 10.6:

$ ls /System/Library/Frameworks/GSS.framework/Headers
ls: /System/Library/Frameworks/GSS.framework/Headers: No such file or directory

The port already contains a workaround to use kerberos5 on 10.6 and earlier, but that seems to have broken:

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 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgssapi_krb5.so, 6): image not found

It should be looking for libgssapi_krb5.dylib not libgssapi_krb5.so.

If the kerberos5 workaround can be fixed maybe it can be extended to 10.7 and 10.8.

If this port can't be made to build on older systems at all anymore, it can be marked as such:

if {${os.platform} eq "darwin" && ${os.major} < 13} {
    known_fail yes
    pre-fetch {
        ui_error "${name} @${version} requires OS X 10.9 or later"
        return -code error "incompatible OS X version"
    }
}

Change History (4)

comment:1 Changed 12 days ago by tobypeterson

Resolution: fixed
Status: assignedclosed

In 90a5ad1ed001099d9f65179c18c420f0497d8cc9/macports-ports (master):

py-gssapi: use kerberos5 on 10.8 and earlier, fixes #60729

comment:2 Changed 12 days ago by tobypeterson

the fix is, of course, speculative

comment:3 in reply to:  description Changed 12 days ago by ryandesign (Ryan Schmidt)

Thanks. There's still this issue though:

Replying to ryandesign:

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 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgssapi_krb5.so, 6): image not found

It should be looking for libgssapi_krb5.dylib not libgssapi_krb5.so.

Note: See TracTickets for help on using tickets.