Is it possible to change webp library location installed with Homebrew?
Closed this issue · 10 comments
Question.
I'm on Macbook M1 and my webp libary is installed under /opt/homebrew/
, when running rimage
it's currently expecting to be installed here: /usr/local/opt/webp/lib/libwebp.7.dylib
and therefore give me an error. Is it possible to change the default location of this library in a config file?
Thanks.
Here is quote from libwebp-rs crate:
If libwebp is found in the system, it links against the library. Otherwise it builds and links against the bundled libwebp.
In these cases, static link is preferred:
- For musl target.
- When cross-compiling.
- static feature is turned on.
- LIBWEBP_SYS_STATIC environment variable is set to 1 when building.
Possibly there is no way to add custom path to library, but there is way to build with bundled libwebp.
Thank you for explaining so how do I re-build it with bundled libweb?
I just pushed changes with static
feature for libwebp to main. If you have all needed dependencies you can try this command:
cargo install --git https://github.com/SalOne22/rimage.git
When installing I see the following error:
error: failed to run custom build command for `libdav1d-sys v0.5.0`
Caused by:
process didn't exit successfully: `/var/folders/39/0_y_yqlx27n1rpbz2wb6n53w0000gn/T/cargo-installThQHTC/release/build/libdav1d-sys-d262a6d417588d27/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at 'This crate requires meson (and ninja) to be installed: https://mesonbuild.com/: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/myusername/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libdav1d-sys-0.5.0/build.rs:22:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rimage v0.8.2 (https://github.com/SalOne22/rimage.git#a6ba3209)`, intermediate artifacts can be found at `/var/folders/39/0_y_yqlx27n1rpbz2wb6n53w0000gn/T/cargo-installThQHTC`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Do I need to install meson and ninja and what's the best way to do it?
Here is all external dependencies for build: cmake, nasm, ninja, meson
You can install them by using brew
Or you can wait until I create a new release and build it at GitHub actions, and just download from release tabs
Thank you, that worked. It's really fast, performance wise. There's another issues though.
Do you know why if I specify both --width
and --height
it squeezes image and rotates it 90 deg clockwise.
If I specify just --width
or just --height
then it resizes it properly but still rotates the image 90 deg clockwise. Any ideas?
This requires more information, on my machine everything works as expected. Please open a new issue for this bug.
This may be a Mac OS only issue and I don't currently have a MacBook to test this.
OK, will open new issue, thank you.
Close this issue as resolved.