PMunch / futhark

Automatic wrapping of C headers in Nim
MIT License
355 stars 19 forks source link

OS X-- build out of the box #81

Open viega opened 10 months ago

viega commented 10 months ago

Added a flag to link the default libclang that installs when you have already installed XCode.

I couldn't figure out how to get this into the nimble file without delving into nimble code, so it's living in a new config.nims.

viega commented 10 months ago

Note that this only helps the build; you still need to (as root) set up opir etc. to use the lib, eg:

install_name_tool -add_rpath /Library/Developer/CommandLineTools/usr/lib/ ~/.nimble/pkgs/futhark-0.9.3/opir
install_name_tool -change libclang.dylib @loader_path/Library/Developer/CommandLineTools/usr/lib/ ~/.nimble/pkgs/futhark-0.9.3/opir
PMunch commented 10 months ago

Could you drop that last part into the README? And how does this differ from the logic already in the opir.nims file? I'm not familiar with how OSX handles their paths but I was under the impression that that would ask xcode where it had stored its libraries.

viega commented 10 months ago

Sure, I didn't even take the time to look closely; didn't see opir.nims actually. I just dealt with the errors that came up when I moved to a Mac. I'll take a closer look and try to do it right, but might not be able to get to it until later in the week.