Overriding pkgrsc's default Framework path (on macOS) reddit / BSD ---------------------------------------------------------------------- Devirichu · 2018-02-02 12:06 Hi, just bootstrapped pkgsrc on my current macOS machine (macOS 10.13), and trying to install Vala, I get this error: /System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h:2 9:30: error: nullability specifier '_Nonnull' cannot be applied to non-pointer type 'uuid_t' (aka 'unsigned char [16]') - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes; This `_Nonnull` does not appear in older Framework versions, i.e. 10.11's NSUUID.h: - (instancetype)initWithUUIDBytes:(const uuid_t)bytes; So I thought I could try using the older SDK to compile the package. Looking at [Clang's manual](https://clang.llvm.org/docs/UsersManual.html), it seems I need to override `isysroot`. So I added this to my `mk.conf`: CFLAGS+= -isysroot /Users/Devirichu/Sources/MacOSX10.11.sdk CPPFLAGS+= -isysroot /Users/Devirichu/Sources/MacOSX10.11.sdk LDFLAGS+= -Wl,-syslibroot,/Users/Devirichu/Sources/MacOSX10.11.sdk However, re-running `make install` still errors out the same, complaining about `/System/Library/Frameworks/Foundation.framework/Headers/NSUUID.h` (i.e. the default Framework) instead of using the supplied one. Does anyone know how I can tell pkgsrc/make to prefer the Framework I specified instead of looking in the default search path first? ---------------------------------------------------------------------- Lev_Tolstoj · 2018-02-02 12:58 I've never used pkgsrc outside of NetBSD, Slackware and DragonflyBSD, so really cannot help you. However, why don't you try with Macports instead? https://www.macports.org/ports.php?by=library&substr=vala PS: are you using bmake instead of Darwin make? ---------------------------------------------------------------------- piglit3 · 2018-02-02 13:52 googling for the original error in NSUUID.h seems to [suggest updating your tools](https://trac.macports.org/ticket/55310) ---------------------------------------------------------------------- Devirichu · 2018-02-02 14:04 I found pkgsrc easy to quickly bootstrap some packages that I need without resorting to a full-fletched solution like Homebrew (since I can put pkgsrc wherever I want, and administer it however I want). Yes, I'm using pkgsrc's `bmake`. ---------------------------------------------------------------------- Devirichu · 2018-02-02 14:12 You are right! I feel dumb. I forgot that I selected different developer tools using `xcode-select -s`. Those were specifically older ones that I needed for another project. As a note for other pkgsrc users on macOS: Always check for the right Command Line Tools ... ---------------------------------------------------------------------- Lev_Tolstoj · 2018-02-02 14:49 Yes, undoubtedly pkgsrc is very portable, and mostly "stays outside" of the host OS. I don't know about HomeBrew, as I never used it; what I can tell you however is that Macports install everything under /opt, and can be quickly removed without leaving any trace, so in case nobody else here provided you a proper solution, nor would you be able to sort this out, just keep Darwin Macports in mind ;)