Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383063 - dev-python/pypy-1.5 - die "${FUNCNAME}: check-reqs eclass called but not actualy used!"[sic]
Summary: dev-python/pypy-1.5 - die "${FUNCNAME}: check-reqs eclass called but not actu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal blocker with 1 vote (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 10:36 UTC by Michał Gasewicz
Modified: 2011-11-30 20:56 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Gasewicz 2011-09-15 10:36:52 UTC
At the beginning of emerging error "check-reqs_prepare: check-reqs eclass called but not actually used!" occurs.

Removing occurrences of check_reqs from ebuild solved problem for me, but machines with not enough RAM won't be able to build this package (not sure what's the minimum amount, but "2.x GB of RAM on a 32-bit system and 4.x GB on 64-bit systems" from pypy-1.6 docs)

Ebuild worked before upgrading to portage-2.1.10.11.

Reproducible: Always

Steps to Reproduce:
1.emerge pypy

Actual Results:  
 * Set some check-reqs eclass variables if you want to use it.
 * If you are user and see this message file a bug against the package.
 * ERROR: dev-python/pypy-1.5 failed (setup phase):
 *   check-reqs_prepare: check-reqs eclass called but not actualy used!
 * 
 * Call stack:
 *           ebuild.sh, line   56:  Called pkg_setup
 *           ebuild.sh, line 1450:  Called check-reqs_pkg_setup
 *   check-reqs.eclass, line   94:  Called check-reqs_prepare
 *   check-reqs.eclass, line  120:  Called die
 * The specific snippet of code:
 *              die "${FUNCNAME}: check-reqs eclass called but not actualy used!"

 *              die "${FUNCNAME}: check-reqs eclass called but not actualy used!"


Expected Results:  
Successful emerge

Portage 2.1.10.11 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.0.3
Timestamp of tree: Thu, 15 Sep 2011 06:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="rsync://gentoo.prz.rzeszow.pl/gentoo ftp://gentoo.po.opole.pl ftp://tux.rainside.sk/gentoo/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pl"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 apache2 berkdb bzip2 cli cracklib crypt cups cxx dbus dri dvd fortran gdbm gif gpm iconv icu ipv6 java jpeg kde lm_sensors mmx mng modules mp3 mudflap multilib ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre perl png pppd python qt3support qt4 readline sasl semantic-desktop session spell sse sse2 sse3 ssl svg sysfs tcpd tiff truetype unicode v4l v4l2 vorbis xine xinerama xorg zlib" ALSA_CARDS="hda-intel" 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 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ilya Osadchiy 2011-09-16 19:53:25 UTC
This simple change should fix the issue (looks like check-reqs eclass has changed):

================
--- pypy-1.5.ebuild~~	2011-09-16 22:27:06.924000044 +0300
+++ pypy-1.5.ebuild	2011-09-16 22:43:48.619000044 +0300
@@ -30,10 +30,10 @@
 S="${WORKDIR}/${P}-src"
 DOC="README LICENSE"
 
+CHECKREQS_MEMORY="1250M"
+use amd64 && CHECKREQS_MEMORY="2500M"
+
 src_prepare() {
-	CHECKREQS_MEMORY="1250"
-	use amd64 && CHECKREQS_MEMORY="2500"
-	check_reqs
 	epatch "${FILESDIR}/${PV}-patches.patch"
 }
================ 

I'm also not sure how much memory is needed exactly. The numbers are based on comment by Domen Kožar in bug 300301
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-09-16 20:10:57 UTC
http://doc.pypy.org/en/latest/getting-started-python.html says:
"As of March 2011, you will need at least 2 GB of memory on a 32-bit machine and 4GB on a 64-bit machine."
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-09-20 17:07:44 UTC
check_reqs() should be simply used in pkg_setup() rather than src_prepare().
Comment 4 Mahmoud 2011-10-04 05:20:56 UTC
I'm also facing this issue with Portage 2.6.30. Is there an ETA by chance?
Comment 5 Ilya Osadchiy 2011-10-08 09:12:49 UTC
(In reply to comment #3)
> check_reqs() should be simply used in pkg_setup() rather than src_prepare().

In check-reqs eclass it is written that check_reqs() is obsolete. The check is performed automatically without calling the function (If appropriate variables are set).


(In reply to comment #4)
> I'm also facing this issue with Portage 2.6.30. Is there an ETA by chance?

Did you try using the patch from my comment #1 ?
You need a local portage tree where you make the changes (otherwise sync will revert them). If you don't care about sync - just apply the change to dev-pypy/pypy-1.5.ebuild and then run `ebuild pypy-1.5.ebuild manifest` as root and then merge it.
Comment 6 Mahmoud 2011-10-08 10:15:36 UTC
Thanks Ilya. I had no trouble fixing and installing it normally (I just built it from source off the pypy site). I was just trying to show my support for a working pypy build in the main repo. Thanks again for the reply all the same :D
Comment 7 Francesco Riosa 2011-10-10 21:52:02 UTC
workaround for the impatient:

CHECKREQS_MEMORY="2500M" emerge -1 pypy
Comment 8 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-11-30 08:49:48 UTC
Fixed in pypy-1.7.ebuild.
Comment 9 Arfrever Frehtes Taifersar Arahesis 2011-11-30 20:56:58 UTC
use() shouldn't be called in global scope.
PMS section "Use List Functions" says:
"Ebuilds must not run any of these functions in global scope."

Comment #2 suggests that more memory is needed.

Example usage for EAPI <=3:

pkg_setup() {
	CHECKREQS_MEMORY="2G"
	use amd64 && CHECKREQS_MEMORY="4G"
	check-reqs_pkg_setup

	python_pkg_setup
}

Example usage for EAPI >=4:

pkg_pretend() {
	CHECKREQS_MEMORY="2G"
	use amd64 && CHECKREQS_MEMORY="4G"
	check-reqs_pkg_pretend
}