#Compiler build and install on Mac

1 messages · Page 1 of 1 (latest)

severe stratus
#

I'm still arguing with make trying to get Odin compiled on my Mac Ventura.

It appears that the header files are now in a different directory. But, I still get scads of warnings and errors, if I put the following in my .zshrc ...

export PATH="/usr/local/opt/llvm@11/bin:$PATH"
export CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -Wnullability-completeness"
export CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -Wnullability-completeness"
export CXXFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -Wnullability-completeness"
export LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
severe stratus
# severe stratus I'm still arguing with make trying to get Odin compiled on my Mac Ventura. It a...

moving along, I've changed to using:

export CPPFLAGS="-I/usr/local/Cellar/llvm@11/11.1.0_4/include/c++/v1"
export LDFLAGS=""

and now get fewer fatal errors

...
src/gb/gb.h:201:11: fatal error: 'dlfcn.h' file not found
        #include <dlfcn.h>
                 ^~~~~~~~~
1 error generated.
...
/usr/local/Cellar/llvm@11/11.1.0_4/include/c++/v1/stdio.h:107:15: fatal error: 'stdio.h' file not found
#include_next <stdio.h>
              ^~~~~~~~~
1 error generated.
make: *** [debug] Error 1

[I continue to wonder if I'm just in the weeds and this could be easily fixed in a way that I don't see]

static rover
#

Hmm dlfcn.h is normally something one gets with cmdline tools.
There should be no need todo custom cpp flags.

#

A other option is simply creating a folder link to /usr/include/ to the sdk

severe stratus
#

Thanks! I stuck the following into my ~/.zshrc and appear to OK (after booting a fresh terminal, or source-ing !/.zshrc ; having deleted the CPPFLAGS and LDFLAGS that I had)

export PATH="/usr/local/opt/llvm@11/bin:$PATH"
export ODIN_ROOT="/Users/tarvydas/project-other/Odin"
#

[so, maybe something is different in "Getting Started" for Ventura...]

drifting elm
#

are you an apple sillicon? I can probably make a build with llvm baked in (static build). I've thought about doing this for a while but wasn't sure if anyone would use it

severe stratus