missing "unistd.h"

Find out how to get that @*&^$&@ thing to compile!

missing "unistd.h"

Postby ossslab » Thu Sep 05, 2002 3:09 pm

Hi all,

Last week, I started to use MacOSX, and I tried to
build kernel(XNU).
But I have a serious problem.
When I try to build cctools, I get following error message.

%sudo make RC_OS=macos kld_build
cc -g -I.. -I../../include -I. -Wall -Wno-precomp -Wno-long-double -static -DRLD -DKLD -fno-builtin -finline -fno-keep-inline-functions -fsigned-bitfields -force_cpusubtype_ALL -msoft-float -nostdinc -I/System/Library/Frameworks/Kernel.framework/Headers/libsa -I/System/Library/Frameworks/Kernel.framework/Headers/bsd -I/System/Library/Frameworks/Kernel.framework/Headers -DKERNEL -DKERNEL_PRIVATE -DAPPLE -DNeXT -DLIBSA_PRIVATE -O -c -MD \
-dependency-file ./pass1.d -o ./pass1.o ../pass1.c
/System/Library/Frameworks/Kernel.framework/Headers/sys/file.h:63: header file 'sys/unistd.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make[1]: *** [pass1.o] Error 1
make: *** [kld_build] Error 2

Truely, there is no such a header file.
How can I get the file? Please help me.
Posts: 2
Joined: Thu Sep 05, 2002 7:00 pm

Re: missing "unistd.h"

Postby apex » Tue Sep 10, 2002 7:46 am

I have unistd.h in 10.2. Make sure you install the BSD subsytem and the latest version of dev tools.
<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><hr><pre>
Posts: 355
Joined: Sun Aug 05, 2001 7:00 pm

Re: missing "unistd.h"

Postby ossslab » Wed Sep 11, 2002 8:00 am

I have installed the latest version of DeveloperTools.
I have /usr/include/sys/unistd.h and /usr/include/unistd.h.
I think cctools requires
Do you have this one? If you have, did you do something special?

>Make sure you install the BSD subsystem
I don't know what is the BSD subsystem and where to get that.
Posts: 2
Joined: Thu Sep 05, 2002 7:00 pm

Re: missing "unistd.h"

Postby DMCrimson » Fri Oct 04, 2002 8:35 am

BSD subsystem is part of OS X...it's on the install CD.
Posts: 13
Joined: Mon Sep 09, 2002 7:00 pm
Location: Finland

Re: missing "unistd.h"

Postby jpm » Fri Dec 20, 2002 10:10 pm

unfortunately it was errantly not included in the kernel framework. you can resolve this issue with: <blockquote><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><hr><pre>% sudo cp /usr/include/sys/unistd.h \

additionally, i have thrown together some of my notes into a doc for building xnu -- this might be helpful: http://www.opendarwin.org/~jpm/xnu.html
Posts: 18
Joined: Fri Dec 20, 2002 8:00 pm
Location: 42° 16.62' north, 83° 45.23' west

Return to Compile Problems

Who is online

Users browsing this forum: No registered users and 5 guests