Compile on FreeBSD
Closed this issue · 0 comments
bwmarrin commented
Any chance you (or someone) has the steps for getting this to build on FreeBSD? I'm not super versed on cgo side of Go. I did clone this package and I cloned in the libwebp_src files (v1.2.0 per the readme).
I tried the generate command from the readme and I get the below
2023/04/07 13:45:47 lstat /code/webp/gowebp/libwebp_src/sharpyuv: no such file or directory exit status 1 gen/main.go:1: running "go": exit status 1
If I just ignore that like if somehow it's unimportant step and I try run the tests I get the below.
go test ./libwebp
# github.com/bep/gowebp/libwebp.test
/home/bwmarrin/.go/root/pkg/tool/freebsd_amd64/link: running clang failed: exit status 1
ld: error: undefined symbol: log10
>>> referenced by frame_enc.c:555 (../../libwebp_src/src/enc/frame_enc.c:555)
>>> /tmp/go-link-3667838680/000052.o:(VP8EncLoop)
>>> referenced by frame_enc.c:555 (../../libwebp_src/src/enc/frame_enc.c:555)
>>> /tmp/go-link-3667838680/000052.o:(VP8EncTokenLoop)
>>> referenced by picture_psnr_enc.c:129 (../../libwebp_src/src/enc/picture_psnr_enc.c:129)
>>> /tmp/go-link-3667838680/000077.o:(WebPPlaneDistortion)
>>> referenced 6 more times
ld: error: undefined symbol: log
>>> referenced by lossless_enc.c:376 (../../libwebp_src/src/dsp/lossless_enc.c:376)
>>> /tmp/go-link-3667838680/000060.o:(FastLog2Slow_C)
>>> referenced by lossless_enc.c:351 (../../libwebp_src/src/dsp/lossless_enc.c:351)
>>> /tmp/go-link-3667838680/000060.o:(FastSLog2Slow_C)
>>> referenced by picture_psnr_enc.c:123 (../../libwebp_src/src/enc/picture_psnr_enc.c:123)
>>> /tmp/go-link-3667838680/000077.o:(WebPPlaneDistortion)
>>> referenced 1 more times
ld: error: undefined symbol: pow
>>> referenced by picture_csp_enc.c:201 (../../libwebp_src/src/enc/picture_csp_enc.c:201)
>>> /tmp/go-link-3667838680/000075.o:(ImportYUVAFromRGBA)
>>> referenced by picture_csp_enc.c:100 (../../libwebp_src/src/enc/picture_csp_enc.c:100)
>>> /tmp/go-link-3667838680/000075.o:(ImportYUVAFromRGBA)
>>> referenced by picture_csp_enc.c:100 (../../libwebp_src/src/enc/picture_csp_enc.c:100)
>>> /tmp/go-link-3667838680/000075.o:(ImportYUVAFromRGBA)
>>> referenced 9 more times
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL github.com/bep/gowebp/libwebp [build failed]
FAIL