function tc-ninja_magic_to_arch() in toolchain-funcs.eclass uses ${KV}, but never sets it. This results in wrong output of tc-arch-kernel() on ppc64. Attached patch fixes the issue. Reproducible: Always
Created attachment 321988 [details, diff] proposed patch
P.S: I think "inherit linux-info" is also missing.
Created attachment 321990 [details, diff] proposed patch (incl. inherit linux-info)
*** Bug 434354 has been marked as a duplicate of this bug. ***
Created attachment 323786 [details, diff] proposed patch v2 As this function is used as-is in 'kernel-2.eclass', even though $KV was deprecated in EAPI=4 it is still important to keep currently functionality. This patch uses a separate local variable and sets it to either KV or if undefined to KV_FULL ; also it dies if neither are found so that the developer knows they need to inherit an eclass to find the kernel version.
(In reply to comment #5) > Created attachment 323786 [details, diff] [details, diff] > proposed patch v2 > > As this function is used as-is in 'kernel-2.eclass', even though $KV was > deprecated in EAPI=4 it is still important to keep currently functionality. > > This patch uses a separate local variable and sets it to either KV or if > undefined to KV_FULL ; also it dies if neither are found so that the > developer knows they need to inherit an eclass to find the kernel version. This does help the lirc problem in bug #434322, but I think there might be another independant problem with lirc on ppc. Obviously I'll post that in the correct report when I narrow it down better. I'm cc-ing mike who takes care of kernel-2.eclass FYI.
(In reply to comment #5) you can localize a global var. so just do: + local KV=${KV:-${KV_FULL}} then you don't have to modify anything else in there. otherwise, we could move tc-arch-kernel to linux-info thus enforcing people to include linux-info themselves ... seems like very few packages use this func themselves (like ~15).
+ 27 Sep 2012; Ian Stakenvicius <axs@gentoo.org> toolchain-funcs.eclass: + Fixed tc-ninja_magic_to_arch() to also use KV_FULL and fail if no kernel + version specified, bug 432390 + leaving bug open , in case toolchain wants to move the 'tc-arch-kernel' function out of toolchain-funcs.eclass and into linux-info.eclass
I would like to point out that this patch probably is what makes it impossible to update glibc now inside openvz containers: >>> Emerging (1 of 2) sys-libs/glibc-2.15-r3 * glibc-2.15.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * glibc-ports-2.15.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * glibc-2.15-patches-22.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] make -s glibc-test make -s glibc-test >>> Unpacking source... * ERROR: sys-libs/glibc-2.15-r3 failed (unpack phase): * toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info * * Call stack: * ebuild.sh, line 85: Called src_unpack * environment, line 3507: Called eblit-run 'src_unpack' * environment, line 876: Called eblit-glibc-src_unpack * src_unpack.eblit, line 166: Called setup_env * common.eblit, line 276: Called setup_flags * common.eblit, line 162: Called setup_target_flags * common.eblit, line 43: Called tc-arch * environment, line 3587: Called tc-ninja_magic_to_arch 'portage' * environment, line 3889: Called die * The specific snippet of code: * [[ -z ${KV} ]] && die "toolchain-funcs.eclass: Kernel version could not be determined, please inherit kernel-2 or linux-info"; #emerge --info Portage 2.2.0_alpha132 (default/linux/amd64/10.0/server, gcc-4.6.3, glibc-2.15-r2, 2.6.32-openvz-057.1 x86_64) ================================================================= System uname: Linux-2.6.32-openvz-057.1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-2.2 Timestamp of tree: Fri, 28 Sep 2012 06:45:01 +0000 app-shells/bash: 4.2_p37 dev-lang/python: 2.7.3-r2 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.69 sys-devel/automake: 1.11.5, 1.12.3 sys-devel/binutils: 2.22.90 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.5 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo x-portage Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /sbin/rc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd readline session snmp sse sse2 ssl tcpd truetype unicode urandom xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
It seems like bug_436450 is also a duplicate of this one.
I tried the proposed_patch_v2 but it didn't help. The patch attached to the other bug, https://436450.bugs.gentoo.org/attachment.cgi?id=325174 seems to work though. At least it works for emerging x11-libs/qt-core.
*** Bug 436450 has been marked as a duplicate of this bug. ***
The patch https://436450.bugs.gentoo.org/attachment.cgi?id=325174 works for qt-gui, qt-sql & qt-declarative.
*** Bug 436472 has been marked as a duplicate of this bug. ***
fix has landed to not die for non-kernel checks: http://sources.gentoo.org/eclass/toolchain-funcs.eclass?r1=1.118&r2=1.119
*** Bug 436522 has been marked as a duplicate of this bug. ***
*** Bug 446878 has been marked as a duplicate of this bug. ***
OK seems like this issue is essentially fixed, outstanding cosmetic modifications nonwithstanding.