-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Onnxruntime fix #215960
base: master
Are you sure you want to change the base?
Onnxruntime fix #215960
Conversation
Fixes the onnx dependency for onnxruntime by disabling static registration in this package. Previously using onnxruntime would throw exceptions on double registrations (once from onnx, another from onnxruntime) More details: https://onnxruntime.ai/docs/build/dependencies.html#use-preinstalled-packages
Uses a fixed onnx build with static registrations disabled, as per https://onnxruntime.ai/docs/build/dependencies.html#use-preinstalled-packages
args = %W[ | ||
-DBUILD_SHARED_LIBS=ON | ||
-DCMAKE_INSTALL_RPATH=#{rpath} | ||
-DONNX_DISABLE_STATIC_REGISTRATION=ON |
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.
Can we just rebuild onnx
with this configuration instead?
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.
We can, and it will build, but any program linking with onnx only (and using nodes) will not work correctly, since it will skip over the schema registration at startup.
We don't want to introduce a conflicting formula that is only used as a dependency for a single formula. There are 2 options I can think of:
Debian is also trying to resolve this2. They did try Footnotes |
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Fixes #215955
When running a program compiled with onnxruntime that creates an
Ort::Env
, we'd get the following schema double registration errors:As per https://onnxruntime.ai/docs/build/dependencies.html#use-preinstalled-packages
This creates a separate onnx build
onnxnostaticreg
(with the correct flags) specifically foronnxruntime
and updates its dependency.