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

[Feature] Make clog optional #304

Closed
cyanic-selkie opened this issue Oct 19, 2024 · 3 comments
Closed

[Feature] Make clog optional #304

cyanic-selkie opened this issue Oct 19, 2024 · 3 comments

Comments

@cyanic-selkie
Copy link

When building onnxruntime with the flag --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF, ort-sys building fails with the following error:

error: could not find native static library `clog`, perhaps an -L flag is missing?
error: could not compile `ort-sys` (lib) due to 1 previous error

The reason you might want to do that is because it drastically speeds up compilation times when tests aren't compiled.

@cyanic-selkie
Copy link
Author

@decahedron1 Apparently, re2 needs to be optional as well - it compiles for me when I take it out.

P.S. Your speed of fixing these issues is absurd, and very much appreciated, thanks!

@decahedron1
Copy link
Member

Weird, for me (Windows x64, ONNX Runtime 1.19.2) re2 isn't compiled when unit tests are disabled, but ONNX Runtime still depends on a few symbols, causing undefined symbol errors if I make the re2 link optional. Compiling with --build_shared_lib gets it to compile re2.lib, though. I wonder if there's a misconfiguration upstream. What platform/branch are you using?

@cyanic-selkie
Copy link
Author

You're right, running cargo build --lib passes, but cargo test fails due to missing symbols for me.

I'm on linux, compiling onnxruntime @ 5aabc53121 with:

./build.sh --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync --update --build --build_dir build/linux

It does seem like an upstream issue. I'll open an issue there.

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

No branches or pull requests

2 participants