[Homebrew] Issues seen building with shared libraries on macOS and Linux.
Related Homebrew PR: https://github.com/Homebrew/homebrew-core/pull/83176
In Homebrew, we prefer to use non-bundled shared libraries. When working on above PR, I ended up hitting some issues related to this and needed to locally patch build.
I opened this issue to provide details on problems seen during Homebrew build and hopefully discuss possibility of fixing some of them.
First, the easy one is that
--make-portable on macOS but provides no way to disable it. We don't want to copy over dylibs and prefer them managed via the dependency logic.
An easy fix for this is to add
--no-make-portable option since the argument is already set up to support this:
--- a/pypy/tool/release/package.py +++ b/pypy/tool/release/package.py @@ -351,7 +351,7 @@ def package(*args, **kwds): default=(ARCH in ('darwin', 'aarch64', 'x86_64')), help='whether to embed dependencies in CFFI modules ' '(default on OS X)') - parser.add_argument('--make-portable', + parser.add_argument('--make-portable', '--no-make-portable', dest='make_portable', action=NegateAction, default=(ARCH in ('darwin',)),
The second issue is that the build script forces
--embed-dependencies and doesn't provide a way to disable it, which then locally builds a specific OpenSSL version.
pypy/tool/release/package.py provides a
--no-embedded-dependencies option and a
PYPY_NO_EMBED_DEPENDENCIES environment variable, it seems odd that we can't do this during the build.
Right now, I've just removed this in a patch, but the proper way would be to use the flag / environment variable during build-time for
The third issue is specific to Linux build when detecting TCL-TK. The Linux build only checks for specific system libraries and then forces a default
-ltk, which causes issues.
Even excluding the default values would be better and just allow user to provide
A better approach may be to use something like
pkg-config or another build tool that is aware of how to detect packages.