davidbyttow / govips

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

Cant build for linux #305

Closed apomarinov closed 2 years ago

apomarinov commented 2 years ago

Im on macOS monterey and when I go build . there is no issue, but when trying to build for my app's ruby:3.1.0-alpine container, it fails. It was building fine before using vips.

$ ~ go build .   
$ ~ GOOS=linux GARCH=amd64 go build .
# packgen/character
character/character.go:43:2: undefined: vips.LoggingSettings
character/character.go:43:28: undefined: vips.LogLevelWarning
character/character.go:44:2: undefined: vips.Startup
character/character.go:45:8: undefined: vips.Shutdown
character/character.go:102:72: undefined: vips.ImageRef
character/character.go:110:89: undefined: vips.ImageRef
character/character.go:118:43: undefined: vips.ImageRef
character/character.go:126:41: undefined: vips.ImageRef
character/character.go:135:86: undefined: vips.ImageRef
character/character.go:180:58: undefined: vips.ImageRef
character/character.go:45:8: too many errors
tonimelisma commented 2 years ago

Hey @apomarinov. This doesn't look like a govips bug, but more something in your environment and dependencies. Perhaps you forgot to go get the govips library.

apomarinov commented 2 years ago

@tonimelisma Im not sure if it is related to govips but I found this https://stackoverflow.com/questions/62204478/golang-cross-compile-undefined-errors/72292762#72292762 I am also unable to start it on ubuntu, after following the instructions: image