Skip to content

Build from source on macOS / Apple Silicon #3139

Closed Answered by nukopia
nukopia asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, nevermind. Figured it out from reading .github/scripts/arm/build.sh, FWIW:

  • I'm using Homebrew installed libpq and used brew info libpq to recall PATH and compiler flags
  • ensure GHC 9.2.8 is installed, then;
# From `brew info libpq` ...
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libpq/include"
# Build it ...
ghcup set ghc 9.2.8
ghcup set cabal latest
cabal v2-update && cabal v2-build
PGRST_BIN=$(cabal exec which postgrest|tail -1)
cp $PGRST_BIN ~/Scripts  # on my machine
~/Scripts/postgrest -e

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@steve-chavez
Comment options

@nukopia
Comment options

Answer selected by nukopia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants