Compile : Always missing headers

2008-11-08 Thread d bena
Hi,

We have just install our FreeBSD and we try naturally to update our system.
$ uname -a
FreeBSD pinky.e-cac.fr 7.0-RELEASE-p5 FreeBSD
7.0-RELEASE-p5 #0: Wed Oct  1 10:10:12 UTC 2008
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

But each time we compile softs, ports or world, we have errors with the headers 
not found or wrong headers like that :
 /usr/include/sys/param.h:63:23: error: sys/types.h: No such file or directory 

 /usr/src/lib/libmagic/../../contrib/file/file.h:50:23: error: sys/types.h: No 
such file or directory 
 chkproc.c:61:23: error: sys/types.h: No such file or directory 
 /usr/src/sys/sys/types.h:169: error: two or more data types in declaration 
specifiers 
 /usr/src/sys/sys/types.h:169: warning: useless type name in empty declaration 


We think : Hmmm ... il seems that includes are wrong ... try to add some 
includes folders
So we precise the CFLAGS : CFLAGS='-I/usr/src/sys -I/usr/include -I/sys'
Unfortunately, we have always some errors in the compilation...

Example :
# make buildworld
[...]
/usr/src/lib/libmagic/../../contrib/file/file.h:336: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'sread'
In file included from /usr/src/lib/libmagic/../../contrib/file/apprentice.c:37:
/usr/include/unistd.h:510: error: expected declaration specifiers or '...' 
before 'vm_offset_t'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:550: error: expected ')' before '...' token
In file included from /usr/src/lib/libmagic/../../contrib/file/funcs.c:27:
/usr/src/lib/libmagic/../../contrib/file/file.h:50:23: error: sys/types.h: No 
such file or directory
In file included from /usr/src/lib/libmagic/../../contrib/file/funcs.c:27:
/usr/src/lib/libmagic/../../contrib/file/file.h:336: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'sread'
In file included from /usr/src/lib/libmagic/../../contrib/file/magic.c:28:
/usr/src/lib/libmagic/../../contrib/file/file.h:50:23: error: sys/types.h: No 
such file or directory
In file included from /usr/src/lib/libmagic/../../contrib/file/magic.c:28:
/usr/src/lib/libmagic/../../contrib/file/file.h:336: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'sread'
In file included from /usr/src/lib/libmagic/../../contrib/file/magic.c:33:
/usr/include/unistd.h:510: error: expected declaration specifiers or '...' 
before 'vm_offset_t'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:550: error: expected ')' before '...' token
In file included from /usr/src/lib/libmagic/../../contrib/file/print.c:32:
/usr/src/lib/libmagic/../../contrib/file/file.h:50:23: error: sys/types.h: No 
such file or directory
In file included from /usr/src/lib/libmagic/../../contrib/file/print.c:32:
/usr/src/lib/libmagic/../../contrib/file/file.h:336: error: expected '=', ',', 
';', 'asm' or '__attribute__' before 'sread'
In file included from /usr/src/lib/libmagic/../../contrib/file/print.c:39:
/usr/include/unistd.h:510: error: expected declaration specifiers or '...' 
before 'vm_offset_t'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:528: error: expected declaration specifiers or '...' 
before 'fd_set'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:546: error: expected declaration specifiers or '...' 
before 'u_long'
/usr/include/unistd.h:550: error: expected ')' before '...' token
*** Error code 1


We don't understand why it lacks some headers files like 
/usr/include/sys/types.h ?
And google, our best friend, doesn't want to explain us...

If you need more information, tell us, we'll be glad to answer.

--
Three poor french guys, very happy to discover FreeBSD but little disturb...



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Compile : Always missing headers

2008-11-08 Thread Mel
On Saturday 08 November 2008 14:11:59 d bena wrote:
 Hi,

 We have just install our FreeBSD and we try naturally to update our system.
 $ uname -a
 FreeBSD pinky.e-cac.fr 7.0-RELEASE-p5 FreeBSD
 7.0-RELEASE-p5 #0: Wed Oct  1 10:10:12 UTC 2008
 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

 But each time we compile softs, ports or world, we have errors with the
 headers not found or wrong headers like that : 
 /usr/include/sys/param.h:63:23: error: sys/types.h: No such file or
 directory   /usr/src/lib/libmagic/../../contrib/file/file.h:50:23: error:

snip more examples of sys/types.h missing


 We don't understand why it lacks some headers files like
 /usr/include/sys/types.h ?

Only you can tell that. Is the file present or not? Maybe an fsck couldn't 
restore it? Or something went wrong during install?
Do you have a /usr/src populated with the OS and kernel sources?

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]