Repository navigation
[hotfix] Fix onnxruntime build failure on macOS x86_64 #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I didn't add
onnxruntime>=1.24.1for python 3.11 initially, but I found for python 3.11 in macOS & arm, uv will also useonnxruntime==1.23.2, even ifonnxruntime==1.24.1is available. So I finally add a minimum version requirement for onnxruntime in python 3.11.But the minimum version requirement indeed break the build in macos & x86_64. Do you have any good solutions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wenjin272 Did you notice this in your local env or CI? Have you tried to remove
.envfolder and uv lock to start with a fresh build?I currently don't have ARM version Python installed on my (Company)laptop, I can check if installing ARM version Python is accpetable in my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like all CI passed without this
onnxruntimeissue, seems we are good?The current failed CI test seems to be not related to this change, it failed in maven test phrase:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test (default-test) on project flink-agents-end-to-end-tests-resource-cross-language:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this both in my local env and CI, even if I remove the uv lock or try uv sync --upgrade.
For example, in ut test for python 3.11 on macos for this pr: https://github.com/apache/flink-agents/actions/runs/21851853229/job/63068025146?pr=525, the installed onnxruntime is 1.23.2

It actually won't cause any failure, but may be unexpected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wenjin272 You are right on
onnxruntime==1.23.2is automatically resolved and picked up by uv. I think this is because of uv's universal resolver no longer needs to fork based on current constraints:Since 1.23.2 satisfies both, uv unifies on a single version rather than forking. I would say this is expected from uv perspective, and the version
1.23.2should work well with all Python versions we supported today.Note: that the root cause here is upstream: chromadb declares https://github.com/chroma-core/chroma/blob/main/pyproject.toml#L10 with no upper bound and no platform markers. This means chromadb is unaware that newer onnxruntime releases may drop support for certain platforms (like macOS x86_64 in 1.24.1). Ideally, chromadb should handle this with appropriate version bounds or environment markers so that downstream projects don't need to independently work around these compatibility gaps.
I don't see a hard blocker that we had to to remove the support on
macOS x86_64. That said, I think we should continue to supportmacOS x86_64. There are still users(like us internally) replies on the builds frommacOS x86_64.@wenjin272 @xintongsong WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice discussion. Here are my two cents.
Based on these, I think the changes @alnzng proposed in this PR make sense. WDYT, @wenjin272?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense