Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 674
    • Issues 674
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3538
Closed
Open
Created Aug 19, 2021 by Michael Cho@cho-mDeveloper

[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 pypy/tool/release/package.py forces --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.

Given that 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 pypy/goal/targetpypystandalone.py.


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 -ltcl & -ltk, which causes issues.

Even excluding the default values would be better and just allow user to provide LDFLAGS/LIBS instead.

A better approach may be to use something like pkg-config or another build tool that is aware of how to detect packages.

Edited Aug 19, 2021 by Michael Cho
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking