tidbyt / pixlet

Build apps for pixel-based displays ✨
https://tidbyt.com
Apache License 2.0
756 stars 107 forks source link

make fails on MacOS Ventura with file not found #767

Open cybertosher opened 1 year ago

cybertosher commented 1 year ago

I am trying to compile from source on MacOS Ventura. I use MacPorts and have no desire to install Homebrew again. The process works fine until the make build phase and then fails with a file not found error.

# github.com/tidbyt/go-libwebp/webp
../../go/pkg/mod/github.com/tidbyt/go-libwebp@v0.0.0-20220802221933-1fabc3b46601/webp/anim_decode.go:7:10: fatal error: 'webp/demux.h' file not found
#include <webp/demux.h>
         ^~~~~~~~~~~~~~
1 error generated.
make: *** [build] Error 1

Any way to fix this?

tavdog commented 1 year ago

I'm getting the same error.

mattbroussard commented 1 year ago

I'm getting the same trying to build on Monterey 12.6.7. I have libwebp installed via Homebrew (brew install webp) which seems to have put it at /opt/homebrew/Cellar/webp/1.3.1 but I'm not sure how to tell cgo where to find it.

mattbroussard commented 1 year ago

Aha, this worked:

export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib
make build

Found it here: https://github.com/tidbyt/pixlet/issues/39#issuecomment-900727783