Skip to content

Instantly share code, notes, and snippets.

@pavelz
Last active August 31, 2025 17:21
Show Gist options
  • Select an option

  • Save pavelz/e3556c6c4e1e0fb8c5562ca67b20823e to your computer and use it in GitHub Desktop.

Select an option

Save pavelz/e3556c6c4e1e0fb8c5562ca67b20823e to your computer and use it in GitHub Desktop.
cabal.project.local to build cardano-node on Macbook M1/2/3 aarch64 macOS
with-compiler: ghc-9.6.7
package trace-dispatcher
ghc-options: -Wwarn
package HsOpenSSL
flags: -homebrew-openssl
-- Force Cabal/GHC to use Apple toolchain
program-locations
gcc-location: /Library/Developer/CommandLineTools/usr/bin/clang
ld-location: /Library/Developer/CommandLineTools/usr/bin/ld
-- Give the C/C++ compiler the SDK sysroot (replace the path if yours differs)
program-options
gcc-options: -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-- Also push sysroot through GHC’s C/C++/linker option passthroughs
package *
ghc-options:
-pgmc /Library/Developer/CommandLineTools/usr/bin/clang
-pgml /Library/Developer/CommandLineTools/usr/bin/clang
-pgma /Library/Developer/CommandLineTools/usr/bin/as
-pgmcxx /Library/Developer/CommandLineTools/usr/bin/clang++
-optc -isysroot
-optc /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-optcxx -isysroot
-optcxx /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-optcxx -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
-optl -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
@pavelz
Copy link
Author

pavelz commented Aug 31, 2025

for some reason it is picking up g++ instead of clang/clang++ ... without specifying it directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment