Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Compilation error: can't find crate for ffmpeg #14

Closed
saeschdivara opened this issue Nov 25, 2015 · 4 comments
Closed

Compilation error: can't find crate for ffmpeg #14

saeschdivara opened this issue Nov 25, 2015 · 4 comments

Comments

@saeschdivara
Copy link

I have the follwing toml file:

[package]
name = "myserver"
version = "0.1.0"
authors = ["Sascha Häusler [email protected]"]

[dependencies.ffmpeg-sys]
version = "2.8.0"
default-features = false
features = ["static", "avcodec", "avdevice", "avfilter", "avformat", "swscale"]
optional = true

[dependencies.ffmpeg]

version = "~0.2.0"

git = "https://github.com/meh/rust-ffmpeg"
default-features = false
features = ["static", "codec", "device", "filter", "format", "software-scaling"]
optional = true

And the error message looks like this:
src/main.rs:1:1: 1:21 error: can't find crate for ffmpeg
src/main.rs:1 extern crate ffmpeg;

Am I doing something wrong? Or do I need to correct the toml file?

@meh
Copy link
Owner

meh commented Nov 25, 2015

You don't need to also define ffmpeg-sys, ffmpeg is enough, it will define the proper feature dependencies.

Secondly you defined ffmpeg as an optional package, so unless you're building with the ffmpeg feature it won't find the crate.

@saeschdivara
Copy link
Author

Ok, I don't get this error anymore.
But I have a new error:
error: could not find native static library avutil, perhaps an -L flag is missing?
Could not compile ffmpeg-sys

Should I make a new issue for this error?

@saeschdivara
Copy link
Author

If I remove the static feature I get the followin error message: note: /usr/bin/ld: warning: libavutil.so.55, needed by //usr/local/lib/libavcodec.so, may conflict with libavutil.so.52
/usr/bin/ld: /home/saskyrar/Development/Languages/rust/myserver/target/debug/deps/libffmpeg-805255d617bd8363.rlib(ffmpeg-805255d617bd8363.0.o): undefined reference to symbol 'av_frame_set_colorspace@@LIBAVUTIL_55'
/usr/local/lib/libavutil.so.55: error adding symbols: DSO missing from command line

@saeschdivara
Copy link
Author

Ok, I found the library which had an older version and now everything works

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants