[klibc] Compilation errors

Peter Christy christy at attglobal.net
Mon Nov 12 10:55:20 PST 2012


OK, so I've tried this:

~/build/klibc/klibc-2.0.2$ make  KLIBCKERNELSRC=`pwd`/../linux/usr/
  GEN     klcc/klibc.config
  GEN     klcc/klcc
  HOSTCC  scripts/basic/fixdep
  KLIBCCC usr/klibc/__static_init.o
  GEN     usr/klibc/syscalls/SYSCALLS.i
usr/klibc/SYSCALLS.def:13:24: fatal error: asm/unistd.h: No such file or 
directory
compilation terminated.
  LIST    usr/klibc/syscalls/klib.list
  GEN     usr/klibc/socketcalls/SOCKETCALLS.i
  GEN     usr/klibc/socketcalls/socketcalls.mk
  KLIBCCC usr/klibc/socketcalls/socket.o
In file included from usr/klibc/socketcalls/socketcommon.h:8:0,
                 from usr/klibc/socketcalls/socket.c:1:
/home/pchristy/build/klibc/klibc-2.0.2/usr/klibc/../include/errno.h:9:23: 
fatal error: asm/errno.h: No such file or directory
compilation terminated.
make[3]: *** [usr/klibc/socketcalls/socket.o] Error 1
make[2]: *** [usr/klibc/socketcalls] Error 2
make[1]: *** [all] Error 2
make: *** [klibc] Error 2

And that's because its looking in the wrong place for the kernel headers! In 
the kernel source tree, there is no folder called asm, nor is there a symlink 
for it! The only place that exists in in the distro headers package found in 
usr/include

But before you say install the new headers from the kernel source, please note 
this from the Slackware kernel building page:

-------------------------------------------------------------------------------------------------------------
Slackware kernel-headers package
You are going to build and use a new kernel. You may wonder what you need to 
do with the Slackware kernel-headers package.
The answer is: do not remove this package! 
There are two places where you will find kernel headers; one place is inside 
the kernel source directory (in our case, the /usr/src/linux-2.6.37.6 
directory) and the other place is /usr/include/linux. The kernel-headers 
package usually contains the headers taken from the source of the default 
Slackware kernel. These particular headers are used when the glibc package is 
built. The fact that the kernel-headers package installs these files to 
/usr/include/linux makes them independent of the header files you find in the 
kernel source directory. 
As long as you do not upgrade your glibc package, you should not upgrade or 
remove the kernel-headers package. 
------------------------------------------------------------------------------------------------------------

Please note that last line!

I suggest that klibc *should* be looking in the running kernel source tree for 
the headers NOT in /usr/include/linux, as according to the documentation, 
upgrading the system headers in /usr/src/linux will break glibc.

As I said, I am not a programmer, but that instruction from one of the distro 
maintainers is explicit!

All the other software I have built that is kernel dependent uses the headers 
inside the kernel source tree, NOT the system headers.

You are telling me to do something that the distro maintainers specifically 
prohibit!

Or am I misunderstanding you?

(There is also a link to the kernel source tree in /lib/modules/3.6.3/build/)

-- 
Pete
christy at attglobal.net

On Monday 12 Nov 2012 17:44:07 you wrote:
> dude I won't repeat myself again, you are *not* compiling
> against the right headers if you have to start symlinking stuff.
> 
> No idea why you insist on some bog stupid script instead
> of following a simple recipe.
> 
> over and out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.zytor.com/pipermail/klibc/attachments/20121112/b5fffa2f/attachment-0001.html>


More information about the klibc mailing list