[MacPorts] #72017: py313-krb5 @0.7.0: OSError: dlopen(libkrb5.so, 6): image not found
MacPorts
noreply at macports.org
Fri Feb 7 23:12:57 UTC 2025
#72017: py313-krb5 @0.7.0: OSError: dlopen(libkrb5.so, 6): image not found
---------------------------+-------------------------
Reporter: barracuda156 | Owner: petrrr
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Resolution: | Keywords: snowleopard
Port: py313-krb5 |
---------------------------+-------------------------
Comment (by barracuda156):
Replying to [comment:2 ryandesign]:
> libkrb5.dylib is shipped with macOS by Apple. However libkrb5.so doesn't
appear to be, so indeed it seems like this shouldn't work. And if we were
to want to use MacPorts libraries, then `dlopen` would have to specify the
absolute path to the library it's opening.
>
> We did get this same build failure on the Mac OS X 10.6 i386 buildbot
worker but it succeeded on macOS 12 arm64 and macOS 13 x86_64 (and was not
attempted on other builders since the port is marked `platforms {darwin
any}`) so the build may be going through a different code path on older
systems.
>
> In the 10.6 build I see:
> {{{
> Using libkrb5.so as Kerberos module for platform checks
> }}}
> whereas on macOS 12 and 13 I see:
> {{{
> Using /System/Library/PrivateFrameworks/Heimdal.framework/Heimdal as
Kerberos module for platform checks
> }}}
> This difference probably means that the port shouldn't be `{darwin any}`
after all. If that's changed, the revision must be increased too.
I did not notice it is set as `noarch`, that is wrong indeed.
What worked for me was:
{{{
depends_lib-append \
port:kerberos5
build.env-append \
KRB5_KRB5CONFIG=${prefix}/bin/krb5-config \
KRB5_MAIN_LIB=${prefix}/lib/libkrb5.dylib
}}}
Perhaps the same can work for Apple kerberos.
Heimdal linking failed though:
{{{
---> Building py312-krb5
Executing: cd "/opt/local/var/macports/build
/_opt_local_ppcports_python_py-krb5/py312-krb5/work/krb5-0.7.0" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
-m build --no-isolation --wheel --outdir /opt/local/var/macports/build
/_opt_local_ppcports_python_py-krb5/py312-krb5/work
* Getting build dependencies for wheel...
Using krb5-config at '/opt/local/libexec/heimdal/bin/krb5-config'
Using /opt/local/libexec/heimdal/lib/libkrb5.dylib as Kerberos module for
platform checks
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in
<module>
main()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in
main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in
get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/setuptools/build_meta.py", line 334, in
get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 209, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ctypes/__init__.py",
line 379, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/opt/local/libexec/heimdal/lib/libkrb5.dylib, 6): Symbol
not found: _hc_EVP_cc_sha256
Referenced from: /opt/local/libexec/heimdal/lib/libhcrypto.4.dylib
Expected in: dynamic lookup
ERROR Backend subprocess exited when trying to invoke
get_requires_for_build_wheel
Command failed: cd "/opt/local/var/macports/build
/_opt_local_ppcports_python_py-krb5/py312-krb5/work/krb5-0.7.0" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
-m build --no-isolation --wheel --outdir /opt/local/var/macports/build
/_opt_local_ppcports_python_py-krb5/py312-krb5/work
Exit code: 1
}}}
To try Heimdal instead of Kerberos, this could be set:
{{{
depends_lib-append \
port:heimdal
set heimdal_root \
${prefix}/libexec/heimdal
build.env-append \
KRB5_KRB5CONFIG=${heimdal_root}/bin/krb5-config \
KRB5_MAIN_LIB=${heimdal_root}/lib/libkrb5.dylib
}}}
--
Ticket URL: <https://trac.macports.org/ticket/72017#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list