Hi, I'm not really sure where to post this, but I followed the instructions here to build the Mavericks xnu kernel: http://shantonu.blogspot.com/
For some reason it can't find any of the frameworks and libraries on its' own. I've installed the latest command line tools and everything for Xcode.
the first errors I run into are these:
So I created the folders manually that it couldn't find, and ended up with even more errors:
As far as I can tell, all of the headers it's looking for are either in /usr/include
or /System/Library/Frameworks/Kernel.framework, but despite that, it won't find them. I tried manually copying them to the EXTERNAL_HEADERS folder, which got around some of the errors but more "file not found" errors came up.
Obviously I have something set up wrong. Anyone know what I'm doing wrong?
For some reason it can't find any of the frameworks and libraries on its' own. I've installed the latest command line tools and everything for Xcode.
the first errors I run into are these:
Code:
make: *** /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/BUILD/obj/RELEASE_X86_64/iokit/RELEASE: No such file or directory. Stop.
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make: *** /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/BUILD/obj/RELEASE_X86_64/osfmk/RELEASE: No such file or directory. Stop.
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_iokit] Error 2
make[2]: *** Waiting for unfinished jobs....
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_osfmk] Error 2
make: *** /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/BUILD/obj/RELEASE_X86_64/pexpert/RELEASE: No such file or directory. Stop.
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_pexpert] Error 2
make: *** /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/BUILD/obj/RELEASE_X86_64/bsd/RELEASE: No such file or directory. Stop.
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_bsd] Error 2
make[1]: *** [build_all_bootstrap_RELEASE^X86_64^NONE] Error 2
make: *** [all] Error 2
So I created the folders manually that it couldn't find, and ended up with even more errors:
Code:
Jamie-Morriss-Hackbook-Air:xnu-2422.110.17 jamiethemorris$ mkdir BUILD/obj/RELEASE_X86_64/iokit/RELEASE BUILD/obj/RELEASE_X86_64/osfmk/RELEASE BUILD/obj/RELEASE_X86_64/pexpert/RELEASE BUILD/obj/RELEASE_X86_64/bsd/RELEASE
Jamie-Morriss-Hackbook-Air:xnu-2422.110.17 jamiethemorris$ make ARCH_CONFIGS=X86_64 KERNEL_CONFIGS=RELEASE
CC device_tree.o
C++ IOHibernateIO.cpo
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/pexpert/gen/device_tree.c:32:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/pexpert/pexpert/protos.h:34:10: fatal error: 'mach/mach_types.h' file not found
#include <mach/mach_types.h>
^
1 error generated.
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/iokit/Kernel/IOHibernateIO.cpp:137:10: fatal error: 'sys/systm.h' file not found
#include <sys/systm.h>
^
make[7]: *** [device_tree.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_pexpert] Error 2
make[2]: *** Waiting for unfinished jobs....
CC IOHibernateRestoreKernel.o
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/iokit/Kernel/IOHibernateRestoreKernel.c:29:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:14:10: fatal error: 'machine/types.h' file not found
#include <machine/types.h>
^
MIG default_pager_alerts_user.c
1 error generated.
make[7]: *** [IOHibernateRestoreKernel.o] Error 1
make[7]: *** Waiting for unfinished jobs....
MIG default_pager_object_server.c
CC nfs4_subs.o
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/nfs/nfs4_subs.c:32:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/param.h:83:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/types.h:81:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/machine/endian.h:35:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/i386/endian.h:99:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/_endian.h:124:10: fatal error: 'libkern/_OSByteOrder.h' file not found
#include <libkern/_OSByteOrder.h>
^
1 error generated.
make[7]: *** [IOHibernateIO.cpo] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_iokit] Error 2
CC nfs4_vnops.o
MIG device_server.h
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/nfs/nfs4_vnops.c:32:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/param.h:83:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/types.h:81:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/machine/endian.h:35:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/i386/endian.h:99:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/bsd/sys/_endian.h:124:10: fatal error: 'libkern/_OSByteOrder.h' file not found
#include <libkern/_OSByteOrder.h>
^
MIG audit_triggers_user.c
MIG device_server.c
1 error generated.
make[7]: *** [nfs4_subs.o] Error 1
make[7]: *** Waiting for unfinished jobs....
MIG UNDRequest.c
MIG clock_reply_user.c
MIG UNDReplyServer.c
MIG exc_user.c
MIG gssd_mach.c
MIG kextd_mach.c
1 error generated.
make[7]: *** [nfs4_vnops.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_bsd] Error 2
MIG host_notify_reply_user.c
MIG mach_exc_user.c
MIG gssd_mach.h
MIG kextd_mach.h
MIG mach_notify_user.c
MIG memory_object_user.c
MIG lockd_mach.c
MIG memory_object_control_user.c
MIG memory_object_default_user.c
MIG task_access_user.c
MIG lockd_mach.h
MIG telemetry_notification_user.c
MIG upl_user.c
MIG vm_map_user.c
MIG clock_server.c
MIG clock_priv_server.c
MIG exc_server.c
MIG host_priv_server.c
MIG host_security_server.c
MIG lock_set_server.c
MIG mach_exc_server.c
MIG mach_host_server.c
MIG mach_notify_server.c
MIG mach_port_server.c
MIG mach_vm_server.c
MIG memory_object_server.c
MIG memory_object_control_server.c
MIG memory_object_default_server.c
MIG memory_object_name_server.c
MIG processor_server.c
MIG processor_set_server.c
MIG security_server.c
MIG task_server.c
MIG thread_act_server.c
MIG upl_server.c
MIG vm_map_server.c
MIG vm32_map_server.c
CC vm_compressor_backing_store.o
CC default_pager.o
CC dp_backing_store.o
CC dp_memory_object.o
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/dp_backing_store.c:62:10: fatal error: 'mach/host_priv.h' file not foundIn file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/default_pager.c
:63:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/default_pager_internal.h:66:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/default_pager_types.h:36:10: fatal error: 'sys/appleapiopts.h'#include <mach/host_priv.h>
file not ^
found
#include <sys/appleapiopts.h>
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/dp_memory_object.c:62:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/default_pager_internal.h:66:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/default_pager/default_pager_types.h:36:10: fatal error: 'sys/appleapiopts.h' file not found
#include <sys/appleapiopts.h>
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:35:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:29:9: error: unknown type name 'u_int8_t'; did you mean 'u_bit8_t'?
typedef u_int8_t uint8_t; /* u_int8_t is defined in <machine/types.h> */
^~~~~~~~
u_bit8_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/libsa/i386/types.h:62:23: note: 'u_bit8_t' declared here
typedef unsigned char u_bit8_t; /* unsigned 8-bit quantity */
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:35:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:30:9: error: unknown type name 'u_int16_t'; did you mean 'u_bit16_t'?
typedef u_int16_t uint16_t; /* u_int16_t is defined in <machine/types.h> */
^~~~~~~~~
u_bit16_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/libsa/i386/types.h:65:24: note: 'u_bit16_t' declared here
typedef unsigned short u_bit16_t; /* unsigned 16-bit quantity */
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:35:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:31:9: error: unknown type name 'u_int32_t'; did you mean 'u_bit32_t'?
typedef u_int32_t uint32_t; /* u_int32_t is defined in <machine/types.h> */
^~~~~~~~~
u_bit32_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/libsa/i386/types.h:68:22: note: 'u_bit32_t' declared here
typedef unsigned int u_bit32_t; /* unsigned 32-bit quantity */
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:35:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:32:9: error: unknown type name 'u_int64_t'; did you mean 'u_bit64_t'?
typedef u_int64_t uint64_t; /* u_int64_t is defined in <machine/types.h> */
^~~~~~~~~
u_bit64_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/libsa/i386/types.h:72:43: note: 'u_bit64_t' declared here
typedef struct { unsigned int __val[2]; } u_bit64_t;/* unsigned 64-bit quantity */
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:35:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:36:9: error: unknown type name 'int8_t'; did you mean 'uint8_t'?
typedef int8_t int_least8_t;
^~~~~~
uint8_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:29:31: note: 'uint8_t' declared here
typedef u_int8_t uint8_t; /* u_int8_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:37:9: error: unknown type name 'int16_t'; did you mean 'uint16_t'?
typedef int16_t int_least16_t;
^~~~~~~
uint16_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:30:30: note: 'uint16_t' declared here
typedef u_int16_t uint16_t; /* u_int16_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:38:9: error: unknown type name 'int32_t'; did you mean 'uint32_t'?
typedef int32_t int_least32_t;
^~~~~~~
uint32_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:31:30: note: 'uint32_t' declared here
typedef u_int32_t uint32_t; /* u_int32_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:39:9: error: unknown type name 'int64_t'; did you mean 'uint64_t'?
typedef int64_t int_least64_t;
^~~~~~~
uint64_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:32:30: note: 'uint64_t' declared here
typedef u_int64_t uint64_t; /* u_int64_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:47:9: error: unknown type name 'int8_t'; did you mean 'uint8_t'?
typedef int8_t int_fast8_t;
^~~~~~
uint8_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:29:31: note: 'uint8_t' declared here
typedef u_int8_t uint8_t; /* u_int8_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:48:9: error: unknown type name 'int16_t'; did you mean 'uint16_t'?
typedef int16_t int_fast16_t;
^~~~~~~
uint16_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:30:30: note: 'uint16_t' declared here
typedef u_int16_t uint16_t; /* u_int16_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:49:9: error: unknown type name 'int32_t'; did you mean 'uint32_t'?
typedef int32_t int_fast32_t;
^~~~~~~
uint32_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:31:30: note: 'uint32_t' declared here
typedef u_int32_t uint32_t; /* u_int32_t is defined in <machine/types.h> */
^
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:50:9: error: unknown type name 'int64_t'; did you mean 'uint64_t'?
typedef int64_t int_fast64_t;
^~~~~~~
uint64_t
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/EXTERNAL_HEADERS/stdint.h:32:30: note: 'uint64_t' declared here
typedef u_int64_t uint64_t; /* u_int64_t is defined in <machine/types.h> */
^
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.c:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/vm/vm_compressor_backing_store.h:29:
In file included from /Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/kern/kern_types.h:36:
/Users/jamiethemorris/**WORKSPACE**/XNUKERNEL/xnu-2422.110.17/osfmk/mach/mach_types.h:78:10: fatal error: 'sys/cdefs.h' file not found
#include <sys/cdefs.h>
^
13 errors generated.
1 error generated.
make[7]: *** [vm_compressor_backing_store.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: *** [default_pager.o] Error 1
1 error generated.
make[7]: *** [dp_memory_object.o] Error 1
1 error generated.
make[7]: *** [dp_backing_store.o] Error 1
make[6]: *** [build_all] Error 2
make[5]: *** [do_all] Error 2
make[4]: *** [build_all] Error 2
make[3]: *** [build_all_recurse_into_conf] Error 2
make[2]: *** [build_all_recurse_into_osfmk] Error 2
make[1]: *** [build_all_bootstrap_RELEASE^X86_64^NONE] Error 2
make: *** [all] Error 2
As far as I can tell, all of the headers it's looking for are either in /usr/include
or /System/Library/Frameworks/Kernel.framework, but despite that, it won't find them. I tried manually copying them to the EXTERNAL_HEADERS folder, which got around some of the errors but more "file not found" errors came up.
Obviously I have something set up wrong. Anyone know what I'm doing wrong?