Skip to content
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

Using onnxruntime causes double registration exceptions #215955

Open
4 tasks done
chetant opened this issue Mar 23, 2025 · 0 comments · May be fixed by #215960
Open
4 tasks done

Using onnxruntime causes double registration exceptions #215955

chetant opened this issue Mar 23, 2025 · 0 comments · May be fixed by #215960

Comments

@chetant
Copy link

chetant commented Mar 23, 2025

brew gist-logs <formula> link OR brew config AND brew doctor output

brew config output:

% brew config
HOMEBREW_VERSION: 4.4.25-33-gfa9f8bd
ORIGIN: https://github.com/Homebrew/brew
HEAD: fa9f8bd78142b8cdf30e640dd20efcd2a6caf60a
Last commit: 35 hours ago
Branch: master
Core tap HEAD: 79b014b844302d133c697e881424478073cebaf7
Core tap last commit: 2 hours ago
Core tap JSON: 22 Mar 18:28 UTC
Core cask tap JSON: 22 Mar 18:28 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 16
HOMEBREW_NO_INSTALL_FROM_API: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.7/bin/ruby
CPU: 16-core 64-bit arm_palma
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 14.6.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false


brew doctor output:

% brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  onnxnostaticreg

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Use onnxruntime to load an onnx model (for inference).

What happened (include all command output)?

Compilation and linking works fine via cmake.
However when progam is run, there are several caught exceptions:

Schema error: Trying to register schema with name Abs (domain:  version: 1) from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2743, but it is already registered from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2743

Schema error: Trying to register schema with name Add (domain:  version: 1) from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2627, but it is already registered from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2627

Schema error: Trying to register schema with name And (domain:  version: 1) from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/logical/old.cc line 138, but it is already registered from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/logical/old.cc line 138
...

What did you expect to happen?

No errors or exceptions thrown (which are caught and error messages printed)

Step-by-step reproduction instructions (by running brew commands)

brew install onnxruntime
Compile any onnx program with the onnx package in cmake:

    find_package(onnxruntime REQUIRED)

    target_link_libraries(${TARGET} PRIVATE onnxruntime::onnxruntime)

Run said program to get the errors

Schema error: Trying to register schema with name Abs (domain:  version: 1) from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2743, but it is already registered from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2743

Schema error: Trying to register schema with name Add (domain:  version: 1) from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2627, but it is already registered from file /tmp/onnx-20250108-35339-a6pxcu/onnx-1.17.0/onnx/defs/math/old.cc line 2627

...
@chetant chetant linked a pull request Mar 23, 2025 that will close this issue
6 tasks
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 a pull request may close this issue.

1 participant