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

opencv-rust compatability #130

Open
dominikWin opened this issue Oct 4, 2024 · 1 comment
Open

opencv-rust compatability #130

dominikWin opened this issue Oct 4, 2024 · 1 comment
Assignees

Comments

@dominikWin
Copy link

dominikWin commented Oct 4, 2024

Rust's opencv bindings used to just work with rusty_ffmpeg, but switching from 0.14 to 0.15 breaks linking.

Adding this line to any Cargo.toml using rusty_ffmpeg v0.15+ causes this issue:

opencv = { version = "0.93.1", default-features = false, features = ["clang-runtime"] }
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'
/usr/bin/ld: /workspaces/myproject/ffmpeg/./libavutil/timestamp.h:76: undefined reference to `av_ts_make_time_string2'

Tested with FFmpeg 7.0 and 7.1

@dominikWin
Copy link
Author

Turns out the issue is in linking_with_pkg_config when introduced here.

This old behavior works fine:

.statik(true).cargo_metadata(true)

The new behavior (.cargo_metadata(false)) is what causes the linker failure

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