davidbyttow / govips

A lightning fast image processing and resizing library for Go
MIT License
1.23k stars 196 forks source link

Compatibility issue with libvips 8.15.0 on macOS? #391

Closed cschaible closed 9 months ago

cschaible commented 9 months ago

Hello, I get an error when the latest version of libvips (8.15.0) is installed on macOS (with brew).

The terminal output when building an app that's using govips is the following:

/opt/homebrew/Cellar/go/1.21.4/libexec/pkg/tool/darwin_arm64/link: running cc failed: exit status 1
ld: warning: search path '/opt/homebrew/Cellar/vips/8.14.5_1/lib' not found
ld: library 'vips' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Maybe it's only something on my system - but reinstalling the old version (8.14.5) on my system as follows solves the issue.

curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/439ffb3030020f0669ba76a32d419162b2946621/Formula/v/vips.rb && brew install ./vips.rb

I'm not sure where the version 8.14.5 is referenced (as i haven't found it in this repository). Updating it to 8.15.0 again brings back the issue. My conclusion therefore is that there could be a problem with the new libvips version. I would appreciate if someone could check if there's a general problem or if it's just something on my system. Thanks in advance!

tonimelisma commented 9 months ago

Looks to probably be an issue in your environment.

cschaible commented 9 months ago

Thanks for clarifying. The old version was referenced in a go build cache file in: ~/Library/Caches/go-build/. After running go clean -cache the problem is solved.