Closed carstenheisterkamp closed 3 years ago
This seems to be a build failure of https://github.com/zmwangx/rust-ffmpeg-sys
Looking at the build.rs it seems to try to fetch ffmpeg if it is not installed - if the build
feature on ffmpeg-sys-next is enabled. I suggest trying to toggle that feature flag to see if that helps.
Alternatively you may try installing ffmpeg priori to building shadergarden.
Sorry, I didn't mean to close this issue.
Thanks for bringing this to my attention, @carstenheisterkamp! Does building ffmpeg-sys-next
alone work on your machine?
@slightknack it does not work neither with a similar error. The Message in German means, that it can not find a file.
Do you have ffmpeg
/ libavutil
installed?
@slightknack I have ffmpeg installed in c:\ffmpeg\bin and the environment variable set. @strohel how can I toggle the feature flag? I am quite new to Rust.
Hmm, interesting. I'm not that well-versed in Windows; what it looks like
is that the compiler is having a hard time finding libavutil. Do you
have pkg-config
for locating libraries to compile software against installed?
On Tue, Sep 21, 2021 at 12:33 PM Carsten Heisterkamp < @.***> wrote:
@slightknack https://github.com/slightknack I have ffmpeg installed in c:\ffmpeg\bin and the environment variable set.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tonarino/shadergarden/issues/9#issuecomment-923851369, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCIUGX7K2GEUYFMLCE2EHTUDBNQTANCNFSM5EMORU4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
No unfortunately not. The standard Windows installation of ffmpeg is just unzipping 3 executables and the docs. But I found a similar post on reddit which recommends to use the shared version. It contains a libavutil.dll.a
but did not solve the issue.
Even if you have libavutil.dll.a
installed, cargo may not be able to find
it because it uses pkg-config
to locate shared library versions. I
found this guide to installing pkg-config on Windows,
let me know if it helps.
ffmpeg is only used for input, so I've pushed a new version that has ffmpeg
as an optional dependency (#10). Try checking out the no-ffmpeg
branch
and building from source with the newly-added ffmpeg
feature flag
disabled. Hope this helps!
On Thu, Sep 23, 2021 at 10:01 AM Carsten Heisterkamp < @.***> wrote:
No unfortunately not. The standard Windows installation of ffmpeg is just unzipping 3 executables and the docs. But I found a similar post on reddit https://www.reddit.com/r/ffmpeg/comments/jr1poj/missing_libavutil_package/ which recommends to use the shared version. It contains a libavutil.dll.a but did not solve the issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tonarino/shadergarden/issues/9#issuecomment-925587072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANCIUGXMXZJ5SAYQFBUXTDDUDLNF5ANCNFSM5EMORU4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Thanks @slighnack but it still doesnt work and it seems to ignore the "optional" since it still tries to compile the ffmpeg features. When I remove them from the Manifest and ruhn it with cargo it throws new errors like `[{float}; 2]
is not an iteratorin
src\util\mod.rs:58:22`. May be its my machine and I will double check it on another Windows machine.
Interesting... compiling with --no-default-features
should not try to compile the ffmpeg features. I would try the following:
rustup update
to ensure you're on the latest version of the Rust toolchainshadergarden
and running git clone https://github.com/tonarino/shadergarden
again, to get a fresh versionshadergarden
and running cargo build --no-default-features
cargo run --no-default-features -- run demos/life
cargo install --path . --force --no-default-features
shadergarden --help
to verify it's installedshadergraph run demos/life
Let me know how that goes, and on which step things stop working, if any. This should work (I've verified this process works on my machine), but then again, I don't have a windows machine on which to reproduce the issue.
Many thanks for the explanation, since I am new to the rust wold I wasnt aware that I need to use the no default flag and assumed that it was handled by the manifest.
Now I get the following error:
[...]
Compiling include_dir v0.6.1
Compiling structopt v0.3.22
Compiling shadergarden v0.2.0
warning: unused import: `path::PathBuf`
--> src\util\mod.rs:2:5
|
2 | path::PathBuf,
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0277]: `[{float}; 2]` is not an iterator
--> src\util\mod.rs:57:18
|
57 | for a in [0.0, 1.0] {
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[{float}; 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[{float}; 2]`
= note: required by `std::iter::IntoIterator::into_iter`
error[E0277]: `[{float}; 2]` is not an iterator
--> src\util\mod.rs:58:22
|
58 | for b in [0.0, 1.0] {
| ^^^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
|
= help: the trait `Iterator` is not implemented for `[{float}; 2]`
= note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
= note: required because of the requirements on the impl of `IntoIterator` for `[{float}; 2]`
= note: required by `std::iter::IntoIterator::into_iter`
[...]
That's weird, I don't get the same error. You can patch this by adding &
in front of the arrays for now (i.e. borrowing). Would you mind letting me know what rust/cargo version you're on by running cargo --version
and rustc --version
? I'm on:
cargo 1.55.0 (32da73ab1 2021-08-23)
rustc 1.55.0 (c8dfcfe04 2021-09-06)
I know how frustrating it can be when working with a new toolchain and things aren't working as it should, so thanks for your patience in working through this issue with me. Hope we can get everything up and running soon!
No problem, thank you for looking into this, I am on
cargo 1.55.0 (32da73ab1 2021-08-23)
rustc 1.55.0 (c8dfcfe04 2021-09-06)
too.
The iterator error is really interesting, especially given that we're on the same version of cargo/rustc. Regardless, in c234322 I published a patch that I'm pretty sure fixes the error. Let me know if this new version works for you — if it does, I'll publish a new minor release that includes the patches we've added since this issue was opened. Thanks!
Following your above described steps it was compiled successfully and I was able to run the example with cargo run --no-default-features -- run demos/life
, but the application froze after a few sceonds. The shader itself continued, but I was not able to move the shader window and the busy cursor appeared. No error message, or similar in the console.
cargo install --path . --force --no-default-features
was compiled successfully too.
shadergarden --help
Shader Garden 0.2.0
Create evolving gardens of shaders with Lisp and GLSL.
[...]
Point 7: shadergraph run demos/life
did not work but shadergarden run demos/life
. The window containing the shader froze again as described above. Same with all examples. It can be filed as a new issue and this one can be closed.
Glad to hear you got it compiling!
Please file that as a new issue if you have an idea as to why it's happening / have steps to reproduce it. GPU shaders can be resource-intensive, so it could just be that it's too much for the machine to handle. Again, I don't have a Windows machine, so if it's a Windows-specific issue, I'm not sure how much I'll be able to help.
Build fails on Windows 10 during installation
Steps to reproduce
cargo install shadergarden
Result