Update macos local development dependencies (#1268)

* Add needed homebrew formulae and corresponding compiler settings for macos to run api

* coderabbitai feedback

* Don't set CPLUS_INCLUDE_PATH de-novo
This commit is contained in:
Tyler Hagen
2025-08-07 09:40:20 -05:00
committed by GitHub
parent 2d1c5df73b
commit 4cb5834661

View File

@@ -297,7 +297,7 @@ In macOS, install dependencies:
```sh ```sh
$ brew update # Update the package list $ brew update # Update the package list
$ brew install golang gcc pkg-config libheif dlib jpeg # For API $ brew install golang gcc pkg-config libheif dlib jpeg libmagic imagemagick # For API
$ brew install reflex sqlite3 # For API optional tools $ brew install reflex sqlite3 # For API optional tools
``` ```
@@ -332,9 +332,11 @@ Then run the following commands:
# Optional: Set the compiler environment in Debian/Ubuntu # Optional: Set the compiler environment in Debian/Ubuntu
$ source ./scripts/set_compiler_env.sh $ source ./scripts/set_compiler_env.sh
# Set the compiler environment with `homebrew` # Set the compiler environment with `homebrew`
$ export CPLUS_INCLUDE_PATH="$(brew --prefix)/opt/jpeg/include:$(brew --prefix)/opt/dlib/include" $ export CPLUS_INCLUDE_PATH="$(brew --prefix)/opt/jpeg/include:$(brew --prefix)/opt/dlib/include:${CPLUS_INCLUDE_PATH:-}"
$ export LD_LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib" $ export C_INCLUDE_PATH="$(brew --prefix)/opt/libmagic/include:${C_INCLUDE_PATH:-}"
$ export LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib" $ export DYLD_LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib:$(brew --prefix)/opt/libmagic/lib:${DYLD_LIBRARY_PATH:-}"
$ export LIBRARY_PATH="$(brew --prefix)/opt/jpeg/lib:$(brew --prefix)/opt/dlib/lib:$(brew --prefix)/opt/libmagic/lib:${LIBRARY_PATH:-}"
$ export CGO_CFLAGS_ALLOW=-Xpreprocessor
# Start API server # Start API server
$ cd ./api $ cd ./api
$ go run . $ go run .