Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 432390 - toolchain-funcs.eclass:tc-ninja_magic_to_arch() uses KV but never sets it
Summary: toolchain-funcs.eclass:tc-ninja_magic_to_arch() uses KV but never sets it
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 434354 436450 436472 436522 446878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-23 08:08 UTC by Dennis Schridde
Modified: 2017-08-29 18:29 UTC (History)
10 users (show)

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


Attachments
proposed patch (toolchain-funcs.eclass.set-KV.patch,409 bytes, patch)
2012-08-23 08:09 UTC, Dennis Schridde
Details | Diff
proposed patch (incl. inherit linux-info) (toolchain-funcs.eclass.set-KV.patch,655 bytes, patch)
2012-08-23 08:12 UTC, Dennis Schridde
Details | Diff
proposed patch v2 (tf-fix.patch,1.86 KB, patch)
2012-09-14 16:56 UTC, Ian Stakenvicius
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2012-08-23 08:08:47 UTC
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
Comment 1 Dennis Schridde 2012-08-23 08:09:10 UTC
Created attachment 321988 [details, diff]
proposed patch
Comment 2 Dennis Schridde 2012-08-23 08:10:44 UTC
P.S: I think "inherit linux-info" is also missing.
Comment 3 Dennis Schridde 2012-08-23 08:12:52 UTC
Created attachment 321990 [details, diff]
proposed patch (incl. inherit linux-info)
Comment 4 Ian Stakenvicius gentoo-dev 2012-09-14 16:53:14 UTC
*** Bug 434354 has been marked as a duplicate of this bug. ***
Comment 5 Ian Stakenvicius gentoo-dev 2012-09-14 16:56:38 UTC
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.
Comment 6 Anthony Basile gentoo-dev 2012-09-15 14:37:08 UTC
(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.
Comment 7 SpanKY gentoo-dev 2012-09-24 03:30:26 UTC
(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).
Comment 8 Ian Stakenvicius gentoo-dev 2012-09-27 19:35:58 UTC
+  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
Comment 9 Joakim 2012-09-28 09:24:17 UTC
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
Comment 10 Albert Veli 2012-09-28 11:15:12 UTC
It seems like bug_436450 is also a duplicate of this one.
Comment 11 Albert Veli 2012-09-28 11:54:41 UTC
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.
Comment 12 Ian Stakenvicius gentoo-dev 2012-09-28 15:11:00 UTC
*** Bug 436450 has been marked as a duplicate of this bug. ***
Comment 13 David Williams 2012-09-28 15:30:05 UTC
The patch  https://436450.bugs.gentoo.org/attachment.cgi?id=325174 works for qt-gui, qt-sql & qt-declarative.
Comment 14 SpanKY gentoo-dev 2012-09-28 15:34:43 UTC
*** Bug 436472 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2012-09-28 15:38:19 UTC
fix has landed to not die for non-kernel checks:
http://sources.gentoo.org/eclass/toolchain-funcs.eclass?r1=1.118&r2=1.119
Comment 16 Ralph Sennhauser (RETIRED) gentoo-dev 2012-09-28 17:34:54 UTC
*** Bug 436522 has been marked as a duplicate of this bug. ***
Comment 17 SpanKY gentoo-dev 2012-12-17 04:45:04 UTC
*** Bug 446878 has been marked as a duplicate of this bug. ***
Comment 18 Andreas K. Hüttel gentoo-dev 2017-08-29 18:29:27 UTC
OK seems like this issue is essentially fixed, outstanding cosmetic modifications nonwithstanding.