h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.65k stars 337 forks source link

Build fails with latest vips library #450

Open joeyave opened 1 year ago

joeyave commented 1 year ago
/opt/homebrew/Cellar/go/1.20.3/libexec/pkg/tool/darwin_arm64/link: running cc failed: exit status 1
ld: warning: directory not found for option '-L/opt/homebrew/Cellar/vips/8.14.1_1/lib'
ld: warning: directory not found for option '-L/opt/homebrew/Cellar/glib/2.74.6/lib'
ld: library not found for -lvips
clang: error: linker command failed with exit code 1 (use -v to see invocation)
zenyui commented 1 year ago

@joeyave just experienced the same. do you have a fix?

joeyave commented 1 year ago

@joeyave just experienced the same. do you have a fix?

Nope. Only downgrading vips.

zenyui commented 1 year ago

@joeyave were you able to downgrade with homebrew or did you build from source?

seopei commented 1 year ago

@joeyave how exactly did you manage to downgrade and to which version?

shu-pf commented 1 year ago

I solved it this way.

  1. uninstall vips

    $ brew uninstall vips
  2. Download past installation scripts. Create the file vips.rb by duplicating the following. ver. 8.14.4

  3. Installation

    $ brew install -s vips.rb
seopei commented 1 year ago

@shu-pf thanks! Downgrading did not do the trick for me. It was a caching problem. I had to run go clean -cache and then it worked

siddharthg commented 12 months ago

@seopei was facing the same issue! go clean -cache helped.

bartzz commented 10 months ago
/usr/local/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.78.1/lib/libgobject-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.78.1/lib/libgio-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/gettext/lib/libintl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/glib/2.78.1/lib/libglib-2.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/vips/8.14.5_1/lib/libvips.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_g_free", referenced from:

I'm getting those errors on 8.14.5 go v.1.21.1