Skip to content

Add pip req arm64 - #5468

Open
JuanMBriones wants to merge 1 commit into
mac_arm64_coverage_guided_fuzzers_support_extra_depsfrom
add_pip_req_arm64
Open

JuanMBriones wants to merge 1 commit into
mac_arm64_coverage_guided_fuzzers_support_extra_depsfrom
add_pip_req_arm64

Conversation

@JuanMBriones

@JuanMBriones JuanMBriones commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

When packaging bot deployment bundles on a Linux host via butler package,
_install_pip() installs all packages from Pipfile.lock (including
transitive dependencies with Linux x86_64 ELF shared objects) into
src/third_party. _install_platform_pip() then downloads pre-compiled
binary wheels for each package listed in src/platform_requirements.txt
to replace the Linux binaries with target platform native binaries.

Previously, markupsafe and pynacl were transitive dependencies containing
compiled C/CFFI extensions that were missing from
src/platform_requirements.txt:

  • markupsafe==3.0.3 (transitive dependency of Jinja2==3.1.4 / Flask):
    contains the compiled C extension markupsafe/_speedups.cpython-*.so.
    Without it in platform_requirements.txt, the Linux ELF .so remained in
    the macOS ARM64 bundle.
  • pynacl==1.6.0 (transitive dependency of pygithub==1.55): contains the
    compiled libsodium CFFI native binary nacl/_sodium.abi3.so. Without it in
    platform_requirements.txt, importing github / nacl on macOS ARM64 fails
    with ImportError: dlopen(.../nacl/_sodium.abi3.so): not a mach-o file.

Adding both packages ensures butler package -p macos_arm64 downloads the
native macOS ARM64/universal2 wheels (markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl
and pynacl-1.6.0-cp38-abi3-macosx_10_10_universal2.whl) into src/third_party.

Bug: 555853673

@JuanMBriones
JuanMBriones added this pull request to stack #5469 September 11, 2026 19:47
@JuanMBriones
JuanMBriones requested a review from a team as a code owner September 11, 2026 19:47
When packaging bot deployment bundles on a Linux host via `butler package`,
`_install_pip()` installs all packages from `Pipfile.lock` (including
transitive dependencies with Linux x86_64 ELF shared objects) into
`src/third_party`. `_install_platform_pip()` then downloads pre-compiled
binary wheels for each package listed in `src/platform_requirements.txt`
to replace the Linux binaries with target platform native binaries.

Previously, `markupsafe` and `pynacl` were transitive dependencies containing
compiled C/CFFI extensions that were missing from
`src/platform_requirements.txt`:

* `markupsafe==3.0.3` (transitive dependency of `Jinja2==3.1.4` / `Flask`):
  contains the compiled C extension `markupsafe/_speedups.cpython-*.so`.
  Without it in `platform_requirements.txt`, the Linux ELF `.so` remained in
  the macOS ARM64 bundle.
* `pynacl==1.6.0` (transitive dependency of `pygithub==1.55`): contains the
  compiled libsodium CFFI native binary `nacl/_sodium.abi3.so`. Without it in
  `platform_requirements.txt`, importing `github` / `nacl` on macOS ARM64 fails
  with `ImportError: dlopen(.../nacl/_sodium.abi3.so): not a mach-o file`.

Adding both packages ensures `butler package -p macos_arm64` downloads the
native macOS ARM64/universal2 wheels (`markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl`
and `pynacl-1.6.0-cp38-abi3-macosx_10_10_universal2.whl`) into `src/third_party`.

Bug: 555853673
Signed-off-by: Manuel Briones <manuelbriones@google.com>
@@ -1 +1 @@
# This file contains dependencies from src/Pipfile that contain native/compiled

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mention here that it also includes transitive dependencies? We should change Pipfile to mention that transitive dependencies should added here as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left inline comments. But I think they mention it (but not at the files beginning)

# into src/third_party.
#
# If you add or bump a package in Pipfile that has native extensions, make sure
# to update it here as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@g-ortuno I think this might be achieved by above's lines? Also, on Pipfile we've got these lines https://github.com/google/clusterfuzz/blob/dd68bf6511544caa1e457b1c8984286e637d56a1/Pipfile#L7-8

@g-ortuno g-ortuno Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but I don't think it covers the packages this PR is adding. From the PR description:

markupsafe and pynacl were transitive dependencies containing compiled C/CFFI extensions that were missing from src/platform_requirements.txt:

Specifically the part about transitive dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants