Page 1 of 1

Compiling XNU for Sierra

PostPosted: Tue Dec 13, 2016 8:41 pm
by b3ntx
I've tried following ssen's blog to build Sierra (dtrace-209 and AvailabilityVersions-26), however the build fails when the source references header files related to a library called firehose_kernel. Many of the missing headers are in the libdispatch package. After copying the required headers into the xnu src dir, the build fails at the linking stage because it can't find firehose_kernel.

Code: Select all
ld: library not found for -lfirehose_kernel


Curious if this is a universal problem for everyone or simple build config error I have. I saw an unanswered post on Apple's forums, but that's it.
Using Xcode 8.1. Same results trying to build xnu-3789.*.tar.gz.

Re: Compiling XNU for Sierra

PostPosted: Wed Dec 14, 2016 12:21 am
by morpheus
You can fix that by building libfirehose (which is internal to libdispatch, as you have correctly identified) from the dispatch-7xx sources (possibly changing -lfirehose_kernel in the makedefs/MakeInc.def to link with dispatch might work, but I haven't tried). AAPL are <.....> for not bothering to document any of this properly... but then that's not surprising. Sometimes I think they only release open sources because they have to, not because they're doing anyone a favor.

Re: Compiling XNU for Sierra

PostPosted: Wed Dec 14, 2016 12:18 pm
by b3ntx
Administrator wrote:Sometimes I think they only release open sources because they have to, not because they're doing anyone a favor.

I think you're 100% right here.


*edited for clarity