# problem merging klibc

## jza

I'm getting the following error when updating klibc (as part of emerge -u world) :

```

* Found kernel source directory:

 * /usr/src/linux

 * Found sources for kernel version:

 * 2.6.11-gentoo-r9

>>> Unpacking source...

>>> Unpacking klibc-1.1.1.tar.bz2 to /var/tmp/portage/klibc-1.1.1/work

 * Your kernel sources are not configured for your chosen arch!

 * (KERNEL_ARCH="", ARCH="i386")

!!! ERROR: dev-libs/klibc-1.1.1 failed.

!!! Function src_unpack, Line 81, Exitcode 0

!!! Your kernel sources are not configured for your chosen arch!

```

I know my kernel is indeed configured for my arch, is there some variable that needs to be seet or something?

----------

## xenon

Dirty hack (emerged the package, still have to test if all works):

```
cd /usr/src/linux/include

ln -s asm-i386 asm
```

Of course i386 should be replaced with the correct arch.

----------

## slack2daze

run "gcc-config -c"  You will probably get an error that says:  "*/usr/bin/gcc-config: No gcc profile is active!"  I got that and then set a profile using "gcc-config i686-pc-linux-gnu-3.4.4" and still it returned the above error.  so to solve it i re-emerge gcc (which updated to 3.4.6) and now splash utils emerges just fine....

----------

## Tolstoi

 *slack2daze wrote:*   

> run "gcc-config -c"  You will probably get an error that says:  "*/usr/bin/gcc-config: No gcc profile is active!"  I got that and then set a profile using "gcc-config i686-pc-linux-gnu-3.4.4" and still it returned the above error.  so to solve it i re-emerge gcc (which updated to 3.4.6) and now splash utils emerges just fine....

 

ahh, at last   :Very Happy:   - that worked for me. Thanks!

----------

## boazbd

Hi all, trying to emerge klibc-1.2.1-r2 I get this:

```

>>> Emerging (1 of 5) dev-libs/klibc-1.2.1-r2 to /

 * klibc-1.2.1.tar.bz2 MD5 ;-) ...                                                    [ ok ]

 * klibc-1.2.1.tar.bz2 RMD160 ;-) ...                                                 [ ok ]

 * klibc-1.2.1.tar.bz2 SHA1 ;-) ...                                                   [ ok ]

 * klibc-1.2.1.tar.bz2 SHA256 ;-) ...                                                 [ ok ]

 * klibc-1.2.1.tar.bz2 size ;-) ...                                                   [ ok ]

 * checking ebuild checksums ;-) ...                                                  [ ok ]

 * checking auxfile checksums ;-) ...                                                 [ ok ]

 * checking miscfile checksums ;-) ...                                                [ ok ]

 * checking klibc-1.2.1.tar.bz2 ;-) ...                                               [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.18-gentoo-r4/build

 * Found sources for kernel version:

 *     2.6.18-gentoo-r4

>>> Unpacking source...

>>> Unpacking klibc-1.2.1.tar.bz2 to /var/tmp/portage/klibc-1.2.1-r2/work

 * Your kernel sources are not configured for your chosen arch!

 * (KERNEL_ARCH="", ARCH="i386")

!!! ERROR: dev-libs/klibc-1.2.1-r2 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_unpack

  ebuild.sh, line 708:   Called src_unpack

  klibc-1.2.1-r2.ebuild, line 83:   Called die

!!! Your kernel sources are not configured for your chosen arch!

!!! If you need support, post the topmost build error, and the call stack if relevant.

```

Tried the solutions posted above, no luck.

Need some help please...

 :Sad: 

----------

## boazbd

anyone???

----------

## foolosophy

Yes, please. What can we do?

I have the same problem, but the instructions above did not work for me.

----------

## thedeadlyquiche

Yes I have the same problem, and I've tried the above fixes.

But with me I get

Your kernel sources are not configured for yoru chosen arch!

(KERNEL_ARCH="x86", ARCH="i386")

I have a core2duo, with gcc 4.2.2

gcc-config -l = i686-pc-linux-gnu-4.2.2

Please help.

----------

## Bloodsurfer

Same problem here on amd64:

 * Your kernel sources are not configured for your chosen arch!

 * (KERNEL_ARCH="", ARCH="x86_64")

----------

## PurpleSkunk

Solved the problem by adding dev-libs/klibc to /etc/portage/package.keywords

Not a very clean solution, but it worked, emerging klibc-1.5.7-r2 instead of klibc-1.5

----------

## Holysword

Seems to be a know issue, according to spock's site:

 *Quote:*   

> NOTE: The older versions of klibc seem to have problems with the new unified arches in the kernel (2.6.24). To avoid these issues, use klibc-1.5.8 or newer. Thanks to David Raison for pointing this out.

 

http://dev.gentoo.org/~spock/projects/uvesafb/

----------

