chai2010 / webp

WebP decoder and encoder for Go (Zero Dependencies).
http://godoc.org/github.com/chai2010/webp
BSD 3-Clause "New" or "Revised" License
522 stars 88 forks source link

trying to compile a project for linux from osx #16

Open badoet opened 8 years ago

badoet commented 8 years ago

i get this error

$ GOOS=linux GOARCH=amd64 go build main.go                                                                          
# github.com/chai2010/webp
../../github.com/chai2010/webp/webp.go:24: undefined: CBuffer

did i miss anything? thank you (:

chai2010 commented 8 years ago

webp use cgo. cgo is disabled in cross compile env. try this command: GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build main.go.

badoet commented 8 years ago

do i need to install the cgo first? i get this error when trying to run that command

ld: unknown option: --build-id=none
clang: error: linker command failed with exit code 1 (use -v to see invocation)

im compiling using go 1.5.1 on osx yosemite

chai2010 commented 8 years ago

cgo is a builtin tool. I think this is a cgo bug in cross compile(clang is default for osx, not for linux).

puzanov commented 7 years ago

any updates?