qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
18.38k stars 606 forks source link

Czkawka wont install on mac m2 #1141

Open Me-Mr opened 7 months ago

Me-Mr commented 7 months ago

Desktop (please complete the following information):

Bug Description I'm trying to install czkawka but keep getting the above error. ...

qarmin commented 7 months ago

error: could not compile czkawka_gui (bin "czkawka_gui") due to previous error

This is not an error, but a summary message

What exactly error is printed?

Me-Mr commented 7 months ago

Hi Thank you for your help, and this amazing program. I've used it in the past on a windows machine and it worked amazing then. I've attached the error codes. error: linking withccfailed: exit status: 1 and clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think that is the error, if you need anything else please let me know!

qarmin commented 7 months ago

This is error message about failed linking, but without any info what package failed

Here is instruction how to properly compile app on mac arm https://github.com/qarmin/czkawka/blob/8df5e991a6f05e49069a447d7d300de433ed8f2f/instructions/Installation.md?plain=1#L45C1-L62

Me-Mr commented 7 months ago

Hi I tried this earlier, and am still getting the same error. Could it be that my homebrew path is different? With arm silicon homebrew required me to use this: /opt/homebrew/bin/brew install xyz

BooterMan98 commented 6 months ago

Hi, m1 MacBook Air here with the same problem, my error is related to finding the extra libraries

          ld: warning: search path '/Users/$USER$/$PATH_TO_FOLDER$/czkawka/target/release/build/libraw-rs-sys-fdde6505b0628b48/out/lib' not found
          ld: library 'heif' not found`

This only happens when including the heif feature when compiling, if excluded and left with only libraw or no extra features it results in a successful compilation.

petko02 commented 4 months ago

I've found solution https://github.com/qarmin/czkawka/issues/1125 Just change your path accordingly. For me it was export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/libheif/1.17.6/lib/ Check your own location. Credit to user ibta.

So my installation on Mac M1 was

brew install rustup
rustup-init
brew install gtk4 adwaita-icon-theme librsvg libheif pkg-config
git clone https://github.com/qarmin/czkawka.git
cd czkawka
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/libheif/1.17.6/lib/ 
source "$HOME/.cargo/env"
cargo run --release --bin czkawka_gui --features "heif,libraw"
BooterMan98 commented 3 months ago

I've found solution #1125 ...

Thank you! this indeed solves the problem

expbox77 commented 1 month ago

솔루션 #1125를 찾았습니다. 그에 따라 경로를 변경하세요. 나에게는 export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/libheif/1.17.6/lib/자신의 위치를 ​​확인하는 것이 었습니다. 사용자 ibta 에 대한 크레딧입니다 .

Mac M1에 설치한 내용은 다음과 같습니다.

brew install rustup
rustup-init
brew install gtk4 adwaita-icon-theme librsvg libheif pkg-config
git clone https://github.com/qarmin/czkawka.git
cd czkawka
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/Cellar/libheif/1.17.6/lib/ 
source "$HOME/.cargo/env"
cargo run --release --bin czkawka_gui --features "heif,libraw"

Thank you, this is a valid option for M3 MAX Sonoma 14.4.1.