[klibc] Compilation errors

Peter Christy christy at attglobal.net
Mon Nov 12 09:25:22 PST 2012


OK, starting to get somewhere now, but still not out of the woods......

In the traditional Slackware fashion, I'm using a build-script, originally 
found on slacky.eu (IIRC!)

This included the lines:

KERNEL=${KERNEL:-$(uname -r)}

and

KLIBCKERNELSRC=/lib/modules/$KERNEL/source HOSTCFLAGS=$SLKCFLAGS make
KLIBCKERNELSRC=/lib/modules/$KERNEL/source make install INSTALLROOT=$PKG

Now when I compiled my kernel, I added my initials as a suffix (-pc), which (of 
course!) uname -r wasn't picking up! So, you were quite right about the kernel 
headers! Mea culpa!

I amended the script to correct this, but the compilation still fails, this 
time with:

/tmp/SBo/klibc-2.0.2/usr/klibc/../include/errno.h:9:23: fatal error: 
asm/errno.h: No such file or directory

I tried it again, replacing the links to the source with your suggested link:

KLIBCKERNELSRC=`pwd`/../linux/usr/ HOSTCFLAGS=$SLKCFLAGS make 
KLIBCKERNELSRC=`pwd`/../linux/usr/ make install INSTALLROOT=$PKG

but it still failed with the same error.

So I did a locate errno.h, and got this:

/usr/src/linux-3.6.3/arch/parisc/include/asm/errno.h
/usr/src/linux-3.6.3/arch/sparc/include/asm/errno.h
/usr/src/linux-3.6.3/arch/mn10300/include/asm/errno.h
/usr/src/linux-3.6.3/arch/score/include/asm/errno.h
/usr/src/linux-3.6.3/arch/s390/include/asm/errno.h
/usr/src/linux-3.6.3/arch/powerpc/include/asm/errno.h
/usr/src/linux-3.6.3/arch/h8300/include/asm/errno.h
/usr/src/linux-3.6.3/arch/alpha/include/asm/errno.h
/usr/src/linux-3.6.3/arch/cris/include/asm/errno.h
/usr/src/linux-3.6.3/arch/ia64/include/asm/errno.h
/usr/src/linux-3.6.3/arch/avr32/include/asm/errno.h
/usr/src/linux-3.6.3/arch/xtensa/include/asm/errno.h
/usr/src/linux-3.6.3/arch/microblaze/include/asm/errno.h
/usr/src/linux-3.6.3/arch/frv/include/asm/errno.h
/usr/src/linux-3.6.3/arch/arm/mach-bcmring/include/csp/errno.h
/usr/src/linux-3.6.3/arch/mips/include/asm/errno.h
/usr/src/linux-3.6.3/arch/x86/include/asm/errno.h
/usr/src/linux-3.6.3/arch/m32r/include/asm/errno.h
/usr/src/linux-3.6.3/include/linux/errno.h
/usr/src/linux-3.6.3/include/asm-generic/errno.h

Note that last line! It looks as if - again - klibc is looking in the wrong 
place for files, just as it did with unistd_64.h

The kernels I'm using are bog standard ones, downloaded from kernel.org, which 
means they haven't got any "tweaks" that are often applied by some distros. 
Also, I'm running 64-bit, so I don't know if this makes a difference to where 
things go!

I'll have a go at tweaking the errno.h file in klibc to point to the right 
place and see if that helps. Just hope there aren't too many more like 
this....!

Cheers,

-- 
Pete
christy at attglobal.net

On Monday 12 Nov 2012 16:02:06 maximilian attems wrote:
> On Mon, Nov 12, 2012 at 02:48:39PM +0000, Peter Christy wrote:
> > my kernel source tree, but I'll double check...) but to follow your logic,
> > I need to know where you are starting from! Am I right that
> > KLIBCKERNELSRC should point to my kernel source tree? (In my case, this
> > is in
> > /usr/src/linux-3.6.3).
> 
> [ /usr/src on a single user machine is a bit very oldstyle, use your $HOME
> aka ~/src ]
> 
> and no it should point to the configured && installed headers as the make
> was implying.
> 
> > Thanks for your help! Although I'm not a programmer, I do regularly
> > compile
> > stuff, and usually manage to sort myself out, but this time, I've got
> > confused!
> just follow step by step what I told you, it's the easiest way, especially
> if you don't want to dig those variables up. (;
> 
> --
> maks


More information about the klibc mailing list