Skip to content

rebuild for ray V2.49.0, release python 3.13 limit#224

Merged
apmorton merged 18 commits intoconda-forge:mainfrom
mattip:v2.49.0
Sep 2, 2025
Merged

rebuild for ray V2.49.0, release python 3.13 limit#224
apmorton merged 18 commits intoconda-forge:mainfrom
mattip:v2.49.0

Conversation

@mattip
Copy link
Contributor

@mattip mattip commented Aug 28, 2025

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

closes (again) #222

@apmorton I couldn't resist, feel free to close this if you have a similar PR.

@mattip
Copy link
Contributor Author

mattip commented Aug 28, 2025

@conda-forge-admin, please rerender

@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Aug 28, 2025

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). This parser is not currently used by conda-forge, but may be in the future. We are collecting information to see which recipes are compatible with grayskull.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/17370084851. Examine the logs at this URL for more detail.

recipe/meta.yaml Outdated
# Avoid building openssl-1.1.1f and redis, not needed in the shipped package
- patches/0011-do-not-build-redis-openssl.patch
# Ray patches grpc, update the patch for 1.67
- patches/0012-update-patch-for-grpc-1.67.patch
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New patch, taken from ray-project/ray#51673. It is a shame that PR is stuck on one failing test file.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you make this part of the vendor 1.67 patch rather than a second patch?

recipe/meta.yaml Outdated
- patches/0003-remove-dependencies.patch
# This needs modification for each release
- patches/0012-update-commit-sha.patch
- patches/0010-cython-shebang.patch # [linux]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

merged upstream, no longer needed

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

macos builds are failing to find a compiler. Did the 'compilers' package change? In arm64 I see
bazel_toolchain/cc_wrapper.sh: line 57: arm64-apple-darwin20.0.0-clang: command not found

and similarly in x86_64 I see
bazel_toolchain/cc_wrapper.sh: line 57: x86_64-apple-darwin13.4.0-clang: command not found

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

Ahh, we can drop osx_64 (macos x86_64) builds, as upstream no longer supports macos x86_64. Is there talk on conda-forge about using arm64 macos build machines and not cross-compiling?

@h-vetinari
Copy link
Member

Ahh, we can drop osx_64 (macos x86_64) builds, as upstream no longer supports macos x86_64.

Just because upstream drops them, we don't have to. There are very few differences between osx-64 and osx-arm64 (once you got the same deployment target), so that shouldn't be an issue. Though of course it can be dropped if there's an actual problem.

Is there talk on conda-forge about using arm64 macos build machines and not cross-compiling?

We're waiting for availability of osx-arm64 agents on azure pipelines, but osx-64 agents are still available on there for a while (e.g. macos-15 still supports it on AZP, even though it's been dropped for GHA).

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

The failure is at this line in the templated shell file
CONDA_BUILD_SYSROOT=${CONDA_BUILD_SYSROOT} ${CLANG} "$@". Note it is trying to call ${CLANG}, which for the x86_64 build is x86_64-apple-darwin13.4.0-clang. Locally I find this executable in the miniconda3/envs/ray-dev/conda-bld/ray-packages_1756452724796/_build_env/bin directory, and I can execute it. So maybe the problem is that the $PATH suddenly does not include the _build_env/bin somehow?

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

Ahh, indeed, the line before the error shows (locally)

  (cd /Users/mattip/miniconda3/envs/ray-dev/conda-bld/ray-packages_1756452724796/_build_env/share/bazel/6f0f404af16e17b93f84c222a50a19f3/sandbox/darwin-sandbox/4/execroot/io_ray && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
    PWD=/proc/self/cwd \
  bazel_toolchain/cc_wrapper.sh

Note the $PATH is missing the conda env binary path.

Edit: so how did it work previously?
Edit2: indeed, if I build locally in a x86_64 conda env on main it all JustWorks.

recipe/meta.yaml Outdated
# Avoid building openssl-1.1.1f and redis, not needed in the shipped package
- patches/0011-do-not-build-redis-openssl.patch
# Ray patches grpc, update the patch for 1.67
- patches/0012-update-patch-for-grpc-1.67.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

can you make this part of the vendor 1.67 patch rather than a second patch?

- msgpack-python >=1.0.0,<2.0.0
- packaging
- protobuf >=3.15.3,!=3.19.5
- protobuf >=3.20.3
Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, I don't know when this happened, but it seems the following requirements are orphaned:

aiosignal
frozenlist
setproctitle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aiosignal and frozenlist were dropped in 2.45.0
`setproctitle is vendored in thirdparty/setproctitle from 2.48.0

recipe/meta.yaml Outdated
patches:
- patches/0001-Disable-making-entry-scripts.patch
- patches/0002-Ignore-warnings-in-event.cc-and-logging.cc.patch
- patches/0003-remove-dependencies.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to patch out dependencies.

Instead of using setup.py install on unix, use:

"${PYTHON}" -m pip install . -vv --no-deps --no-build-isolation

(and add those flags to windows)

We already use -m pip install on windows, so this shouldn't be a problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the cython build dep is out of date - it should be cython >=3.0.12.

If you switch to pip you'll also need to add it to host deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does --no-deps hold for both extras_requires and install_requires kwargs in the setup_tools.setup() call?

@apmorton
Copy link
Contributor

Linux builds fail in CI with:

ERROR: /home/conda/feedstock_root/build_artifacts/ray-packages_1756462154054/work/bazel/BUILD.bazel:15:11: //bazel:gen_extract depends on @py_deps_buildkite_bazel_runfiles//:pkg in repository @py_deps_buildkite_bazel_runfiles which failed to fetch. no such package '@py_deps_buildkite_bazel_runfiles//': whl_library py_deps_buildkite_bazel_runfiles failed:  (/home/conda/feedstock_root/build_artifacts/ray-packages_1756462154054/_build_env/share/bazel/2b025b9b96a5afec433c3ce619d9dfca/external/python3_9_x86_64-unknown-linux-gnu/bin/python3: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

This was happening locally for me last night too, so at least I can reproduce.

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

Fixed the dependencies and the macOS build, still todo

  • collapse patch/0012 onto patch/0005
  • think about removing patch/0003 to not modify setup.py at all

@mattip
Copy link
Contributor Author

mattip commented Aug 29, 2025

Linux builds fail in CI with

Grr. Why are they installing such an old python? I will look at this later.

@apmorton
Copy link
Contributor

macos CC_FOR_BUILD doesn't work for cross compile; attempting to disable bazel sandbox, since that seems to be what is blowing up the path...

@mattip
Copy link
Contributor Author

mattip commented Aug 31, 2025

macos CC_FOR_BUILD doesn't work for cross compile;

It worked locally. Where is the CI run with the commit 61e8c3c that tried this? I see various CI runs at https://dev.azure.com/conda-forge/feedstock-builds/_build?definitionId=11419&_a=summary. The commit sha in those runs is not the one in the branch. I see two CI runs: cd8441e4 (Merge e3bdcb1 into 526885e) and run d1a50fb34 (Merge 3874bd0 into 526885e). It seems something went wrong with azure pipelines, the run of 61e8c3c does not appear.

@mattip
Copy link
Contributor Author

mattip commented Sep 1, 2025

it might be worth a try to add a symlink

I have no sudo permissions inside the docker

@mattip
Copy link
Contributor Author

mattip commented Sep 1, 2025

its attempting to compile an arm64 assembly file as x86

That sounds familiar, I think we had this before.

@mattip
Copy link
Contributor Author

mattip commented Sep 1, 2025

Hmm. The previous problem led to this comment from the rules_boost maintainer:

With the continued caveat that I don't closely follow bazel targets/cross-compilation, the docs make it look to me like --cpu and --platforms are somewhat independent and they're in the middle of a migration from the one to the other. So you may need both?

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found some lint.

Here's what I've got...

For recipe/recipe.yaml:

  • ❌ Selectors in comment form no longer work in v1 recipes. Instead, if / then / else maps must be used. See lines [34].

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/17382187634. Examine the logs at this URL for more detail.

@mattip
Copy link
Contributor Author

mattip commented Sep 1, 2025

Seems like its attempting to compile an arm64 assembly file as x86

Yup, cuz the CLANG=$CC_FOR_BUILD is using the wrong compiler, the cross-compilation has not been set up yet.

# Avoid building openssl-1.1.1f and redis, not needed in the shipped package
- patches/0011-do-not-build-redis-openssl.patch
# https://github.com/conda-forge/docker-images/issues/311
- patches/0012-use-unzip-from-env.patch # [linux]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This needs conversion to if: then:

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm experimenting with some fixes locally; I don't think we should be patching in this way - it should be possible to point to unzip installed to $PREFIX from conda-forge.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

- psutil
- python
- setproctitle >=1.2.2,<1.4
- unzip
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this needs to be m2-unzip on windows

@mattip
Copy link
Contributor Author

mattip commented Sep 2, 2025

Let's try to get this over the finish line without additional refactoring. There are people waiting for the release. Please do the boost refactoring after we have a successful merge of this PR.

@apmorton
Copy link
Contributor

apmorton commented Sep 2, 2025

I specifically unvendored boost in hopes it would fix the osx_arm64 cross compilation builds - if you have an alternate fix I'm all ears.

@apmorton
Copy link
Contributor

apmorton commented Sep 2, 2025

I bet we can drop the CC_FOR_BUILD stuff with recipe/patches/0012-No-path-isolation.patch actually if you'd like to revert the boost unvendoring and try that

@mattip
Copy link
Contributor Author

mattip commented Sep 2, 2025

I will try that change locally on an macsos-arm64 build. Thanks for finding the --incompatible_strict_action_env flag.

@mattip
Copy link
Contributor Author

mattip commented Sep 2, 2025

it would fix the osx_arm64 cross compilation builds

It turns out the CC_FOR_BUILD trick did not fix the problem: the wrong compiler was (is?) being used on osx_arm64

Edit: for future me, the rattler-build command requires target-platform:
rattler-build build --recipe ./recipe -m ./.ci_support/osx_arm64_python3.10.____cpython.yaml --test skip --target-platform osx-arm64

@apmorton
Copy link
Contributor

apmorton commented Sep 2, 2025

Edit: for future me, the rattler-build command requires target-platform: rattler-build build --recipe ./recipe -m ./.ci_support/osx_arm64_python3.10.____cpython.yaml --test skip --target-platform osx-arm64

you should be able to use pixi run:

	build-linux_64_python3.13.____cp313
	build-locally
	build-osx_64_python3.10.____cpython
	build-osx_64_python3.13.____cp313
	build-osx_arm64_python3.13.____cp313
	build-win_64_python3.13.____cp313

there are also lint/rerender/smithy commands

Comment on lines +16 to +17
# Exchange the short exe name for the full path, used in
# # bazel_toolchain/cc_wrapper.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

stray comment now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bleh. I will remove it in the upcoming 2.49.1 release, which should be happening in a few days

Copy link
Contributor

@apmorton apmorton left a comment

Choose a reason for hiding this comment

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

LGTM once build is green

@mattip mattip mentioned this pull request Sep 2, 2025
@mattip mattip linked an issue Sep 2, 2025 that may be closed by this pull request
@mattip mattip added the automerge Merge the PR when CI passes label Sep 2, 2025
@apmorton
Copy link
Contributor

apmorton commented Sep 2, 2025

Windows python 3.12 test is hung :(

python -c "import ray; ray.init('ray://127.0.0.1:10001')" 

Given other windows versions passed, I'm going to proceed with merging in hopes its a fluke.
Worst case we're missing one windows version and debug in a follow up.

@apmorton apmorton merged commit d459f2e into conda-forge:main Sep 2, 2025
18 of 20 checks passed
@mattip
Copy link
Contributor Author

mattip commented Sep 2, 2025

Thanks @apmorton

@mattip mattip mentioned this pull request Sep 2, 2025
5 tasks
@mattip mattip mentioned this pull request Nov 27, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Merge the PR when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.13 blockers?

4 participants