-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add onnxruntime to Conan package manager #8556
Comments
You must have built the dependent libraries as shared libraries, which will break things. Please let onnx runtime static link to onnx. The latest code in master uses a "commit in the middle" of onnx. But the last release(1.8.1) doesn't. You may try that one. |
@snnn thanks for the response and suggestion for static link
I see that it points to commit rel-1.9.1 but there is still no tag |
@snnn I just checked and I think link stack Here is list of libraries form
As far as I understood P.S. reported a ticket about missing 1.9.1 tag onnx/onnx#3618 |
Surprise. I even can't find it in https://github.com/onnx/onnx/commits/rel-1.8.1 . @askhade . Do you know what happened? |
I will need more logs to understand "Schema error: Trying to register schema with name ... (domain: version: 1) from file ... line ..., but it is already registered from file ... line " Could you please more details here? Like which file and line? and the logs around it. |
@snnn sure
|
@snnn maybe you can just give me a general direction on this issue, I can confirm that onnx linked statically with onnxruntime |
How about this: let's run "ldd" on the result binary to see what it depends. You got the error must because your have duplicated symbols of something. |
I'm experiencing the same issue. Compiled with system libraries and
|
This seems to be because both ONNX and ONNX runtime call ONNX runtime's expectation of disabling static registration seems reasonable as it only wants its own schemas. Thus ONNX should be built with |
@tambry Generally speaking, global variables should be initialized at compile time. See: https://docs.microsoft.com/en-us/cpp/code-quality/c26426 . That's why we introduced the ONNX_DISABLE_STATIC_REGISTRATION macro. Without this, when ONNX is doing its initialization, how do you know libprotobuf is already initialized? ONNX heavily depends on libprotobuf, but compilers do not guarantee who will be initialized first. |
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
Is your feature request related to a problem? Please describe.
It will be nice if
onnxruntime
will be available as package to install via Conan package manager.I already started work on this in conan-io/conan-center-index#5180 and I think it's mostly done, it compiles fine.
But I was faced with problems during the test sample execution:
Schema error: Trying to register schema with name ... (domain: version: 1) from file ... line ..., but it is already registered from file ... line ...
Also, the sample finished with 0 exit code
System information
Describe the solution you'd like
Schema error: Trying to register schema with name ... (domain: version: 1) from file ... line ..., but it is already registered from file ... line ...
happensI am sure that this happens because we didn't use dependencies from gitmodules in
cmake/external
because this ruine whole idea of package manager nature.I think we suffer because
onnxruntime
points to "commits in the middle" ofonnx
. In package manager software usually provide only release version of the packages.onnx
which can be used withonnxruntime
Describe alternatives you've considered
"The alternative" is to build
onnxruntime
from git for 1.7.1 I can confirm that it works, but because of "embed" third-party deps this ruins the idea of using any package managerAdditional context
No PR need for this repo, all configurations will be stored in https://github.com/conan-io/conan-center-index so no extra maintenance will be needed for https://github.com/microsoft/onnxruntime contributors
The text was updated successfully, but these errors were encountered: