Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130175 - klibc doesnt compile on ARCH=powerpc (kernel 2.6.16 and later)
Summary: klibc doesnt compile on ARCH=powerpc (kernel 2.6.16 and later)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
: 145129 145509 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-16 10:38 UTC by Oscar Carballal
Modified: 2006-08-29 13:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for klibc-1.2.1-r1.ebuild (patch-klibc,521 bytes, patch)
2006-06-02 23:22 UTC, Ron MacNeil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oscar Carballal 2006-04-16 10:38:36 UTC
Trying to compile klibc with kernel 2.6.16-gentoo-r1 crashes

!!! Your kernel sources are not configured for your chosen arch!
!!! (KERNEL_ARCH="powerpc", ARCH="ppc")

Build 2006-04-16 on Gentoo 2006.0 PPC
Comment 1 Oscar Carballal 2006-04-16 13:53:15 UTC
 # emerge --info 
Portage 2.1_pre7-r5 (default-linux/ppc/ppc32/2006.0/G4, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r1 ppc)
=================================================================
System uname: 2.6.16-gentoo-r1 ppc 7447A, altivec supported
Gentoo Base System version 1.12.0_pre17
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X
11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://213.186.33.37/gentoo-distfiles/ http://213.186.33.37/gentoo-distfiles/ ftp://ftp.heanet.ie/pub/gentoo/ ftp://213.186.33.38/g
entoo-distfiles/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc 7zip X a52 aac aalib adsl aim alsa altivec amrr ao apache2 apm applet asf asm asterisk ax25 background berkdb bidi bitmap-fonts bittorren
t bl bluetooth bonobo bookmarks bootsplash bzip2 c++ calendar cdda cddb cdio cdparanoia cdr cdrom cgi chroot cjk cli cln clock-screen corba cpudet
ection cracklib crosscompile crypt crypto_libgcrypt crypto_openssl css ctype cups curl curlwrappers cvs daap dba dbus dbx dcraw dhcp dict directfb
 diskio dlloader dmi dnd doc dpms dri dts dv dvb dvbplayer dvd dvdr dvdread dvi edl eds effects emboss emoticon encode erandom escreen esd etherea
l etwin exif exim expat ext-iiimf ext-png ext-zlib extensions extraengine extras fam fastbuild fat fbcon fbsplash ffmpeg figlet finger firefox fla
c flash flatfile fltk fluidsynth font-server fontconfig foomaticdb force-cgi-redirect fortran fping freetds ftp fuse gaim gd gdbm geoip geometry g
g gif gimp gimpprint ginac gkrellm glitz glut glx gmail gmailtimestamps gnutls gpm graphviz gs gsnd gstreamer gtk2 gtkhtml gzip hal hddtemp hdf5 h
fs html http icecast icq id3 idea ieee1394 image imagemagick imlib2 infopipe inifile inkjar inline input_devices_evdev input_devices_keyboard inpu
t_devices_mouse intl ipod ipv6 irc irssi isdnlog j2ee jabber java javascript jfs jit jms john jpeg jpeg2k latex lcms ldap libcaca libg++ libgda li
bsexy libwww logrotate lua lzo mad mail mailbox maildir maildrop mailwrapper math md5sum memlimit mikmod milter ming mmap mng mod mod_python modpe
rl modplug motif mouse mozilla mozsvg mp3 mp4 mp4live mpd-mad mpeg mpeg2 mplayer msession msn msnextras multiuser musepack music musicbrainz nat n
curses net nethack nfs nls nptl nptlonly ntfs numeric nvram objc objc++ octave ogg on-the-fly-crypt openal opengl openntpd openssh openssl oscar p
am pbbuttonsd pcre pdf pdflib perl php physfs player plugin pmu png pnp pop pop3d posix pppd python qt quicktime readline rpm rrdtool rsh rss ruby
 sasl scp screen sdk sdl sendfile session sftp sftplogging shape shaper sheep silvercity simplexml skins slang smp smtp sndfile snmp soap sockets 
socks5 sounds soundtouch spell spl srp srs ssl svg svgz sysfs syslog szip t1lib tagwriting tcltk tcp tcpd tetex text tga themes theora threads thr
eadsonly thumbnail tiff timidity tokenizer tools truetype truetype-fonts type1 type1-fonts udev unzip ups usb vcd vcdimager vfat video_cards_ati v
idix vim vlm vnc vorbis web wifi wma wma123 wmf wordperfect wv xchat xchatdccserver xfs xine xml xml2 xmlrpc xmms xosd xpm xprint xscreensaver xsl
 xv yahoo yiff yv12 zeo zip zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 2 Wormo (RETIRED) gentoo-dev 2006-04-16 18:30:59 UTC
Do you have a symbolic link /usr/src/linux which points to /usr/src/linux-2.6.16-gentoo-r1 ?
Comment 3 Oscar Carballal 2006-04-16 23:22:23 UTC
Yes, pointing to the 2.6.16 kernel headers 
Comment 4 Wormo (RETIRED) gentoo-dev 2006-04-16 23:44:57 UTC
The error message you are getting says that the .config file you used to build your kernel is not being found. Your kernel config needs to be available at /usr/src/linux/.config so please check that it really is there. 

By the way, when you said "pointing to the kernel headers", does that mean your /usr/src/linux points to the include dir of the kernel source, e.g.

 /usr/src/linux -> linux-2.6.12-gentoo-r9/include

If so, it needs point to the base of the kernel source, not just the headers:

 /usr/src/linux -> linux-2.6.12-gentoo-r9 
Comment 5 Oscar Carballal 2006-04-17 04:01:39 UTC
Sorry, when i said the headers, i meant the base of the kernel (/usr/src/linux-2.6.16-gentoo-r1)

The .config is in /usr/src/linux-2.6.16-gentoo-r1/.config (and the symlink to /usr/src/linux is correct) and i don't see any var that defines $KERNEL_ARCH

Thanks
Comment 6 nixnut (RETIRED) gentoo-dev 2006-04-17 08:49:38 UTC
I think this is caused by the merge of ppc and powerpc arches that happened in the 2.6.16 sources. Perhaps `ARCH="powerpc" emerge klibc` would do the trick.
Comment 7 Joe Jezak (RETIRED) gentoo-dev 2006-04-29 09:29:16 UTC
There's a check in the klibc ebuild that makes sure that the kernel arch is the same as the guessed arch.  Unfortunately, with kernels 2.6.16 and up, this is no longer true since we now use ARCH="powerpc" instead of ARCH="ppc".  Ignoring the mismatch does seem to work, but I'm not sure if that's the correct workaround.  klibc maintainers?
Comment 8 Lugduweb 2006-05-24 10:28:03 UTC
(In reply to comment #6)
> I think this is caused by the merge of ppc and powerpc arches that happened in
> the 2.6.16 sources. Perhaps `ARCH="powerpc" emerge klibc` would do the trick.
> 

Hi !
I'm having the same trouble here it seems (Pegasos II PPC) :
* Your kernel sources are not configured for your chosen arch!
 * (KERNEL_ARCH="", ARCH="ppc")

But I don't see any "KERNEL_ARCH" or "ARCH" in my .config file :-(
I've tried a 'ARCH="powerpc" KERNEL_ARCH="powerpc" emerge klibc' and it does not work :-(

Note : in /usr/src I have a "linux" link on "linux-2.6.15-gentoo-r1".
I also have a "linux-2.6.16-gentoo-r5" which seems unused.
My .config file is in the linux one.

Regards.
Comment 9 Ron MacNeil 2006-06-02 23:22:52 UTC
Created attachment 88233 [details, diff]
Patch for klibc-1.2.1-r1.ebuild

Hiya,

This patch adds an s/powerpc/ppc to the KERNEL_ARCH detector to match the same substitution that was already being done in the ARCH detector, allowing comparisons of the two two match, which seems to fix this bug.

Best,
Ron
Comment 10 Lars Weiler (RETIRED) gentoo-dev 2006-07-01 03:25:51 UTC
I marked klibc-1.2.1-r1 stable on ppc.
Comment 11 Neil Bothwick 2006-07-09 03:11:38 UTC
The same thing happens with the 1.4.8 and 1.4.8 ebuilds. The patch has to be applied manually.
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2006-07-09 09:17:53 UTC
Added patch to klibc-1.2.1-r2 and klibc-1.4.9.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-08-25 23:36:12 UTC
*** Bug 145129 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-08-29 13:10:10 UTC
*** Bug 145509 has been marked as a duplicate of this bug. ***