Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 774141 - dev-lang/ghc-8.8.4 calls python directly (dev-lang/python-exec[-native-symlinks])
Summary: dev-lang/ghc-8.8.4 calls python directly (dev-lang/python-exec[-native-symlin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 762406
  Show dependency tree
 
Reported: 2021-03-04 07:50 UTC by Agostino Sarubbo
Modified: 2021-04-20 19:31 UTC (History)
0 users

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


Attachments
build.log.xz (build.log.xz,165.82 KB, application/x-xz)
2021-03-04 07:50 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-03-04 07:50:34 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-lang/ghc-8.8.4 calls python directly (dev-lang/python-exec[-native-symlinks]).
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
Please take a look at the tracker bug for more info.
Comment 1 Agostino Sarubbo gentoo-dev 2021-03-04 07:50:38 UTC
Created attachment 689277 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-04 08:50:24 UTC
Happens only in test phase (where python is used directly as a test driver):

>>> Test phase: dev-lang/ghc-8.8.4
make -C testsuite/tests CLEANUP=1 SUMMARY_FILE=../../testsuite_summary.txt
make[1]: Entering directory '/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/testsuite/tests'
"/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/inplace/bin/ghc-stage2" --make -o ../mk/ghc-config ../mk/ghc-config.hs
[1 of 1] Compiling Main             ( ../mk/ghc-config.hs, ../mk/ghc-config.o )
Linking ../mk/ghc-config ...
../mk/ghc-config "/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/inplace/bin/ghc-stage2" >"../mk/ghcconfig_var_tmp_portage_dev-lang_ghc-8.8.4_work_ghc-8.8.4_inplace_bin_ghc-stage2.mk"; if
[ $? != 0 ]; then rm -f "../mk/ghcconfig_var_tmp_portage_dev-lang_ghc-8.8.4_work_ghc-8.8.4_inplace_bin_ghc-stage2.mk"; exit 1; fi
Looks like you don't have timeout, building it first...
make -C ../timeout all
make[2]: Entering directory '/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/testsuite/timeout'
rm -f -f TimeMe.o TimeMe.hi TimeMe TimeMe.exe
python3 calibrate '/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/inplace/bin/ghc-stage1' > calibrate.out
/bin/sh: line 1: python3: command not found
make[2]: *** [Makefile:54: calibrate.out] Error 127
make[2]: Leaving directory '/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/testsuite/timeout'
make[1]: *** [../mk/test.mk:344: ../timeout/install-inplace/bin/timeout] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-lang/ghc-8.8.4/work/ghc-8.8.4/testsuite/tests'
make: *** [Makefile:224: test] Error 2
>>> Completed testing dev-lang/ghc-8.8.4

python needs to be detected (and overridden with PYTHON=) at ./configure time and possibly explicitly passed to make at src_test() time:

aclocal.m4:# FIND_PYTHON
aclocal.m4:AC_DEFUN([FIND_PYTHON],[
aclocal.m4:    AC_PATH_PROG([PYTHON], [python3], [], [/mingw64/bin $PATH])
aclocal.m4:    PythonCmd="$PYTHON"

testsuite/mk/boilerplate.mk:PYTHON ?= python3

testsuite/timeout/Makefile:     echo 'exec "${PYTHON}" $$0.py "$$@"' >> $@
testsuite/timeout/Makefile:     $(PYTHON) calibrate '$(STAGE1_GHC)' > $@

validate:if [ "z$PYTHON" != "z" ]; then
validate:    PYTHON_ARG="PYTHON=$PYTHON"
validate:    $make -C testsuite/tests $BINDIST $PYTHON_ARG \
validate:    $make -C testsuite/tests/stage1 $PYTHON_ARG \
Comment 3 Larry the Git Cow gentoo-dev 2021-04-20 19:31:24 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efe8d14608f9b047bf92652c347fe9eb2a775400

commit efe8d14608f9b047bf92652c347fe9eb2a775400
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-04-20 19:30:38 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-04-20 19:31:21 +0000

    dev-lang/ghc: use ${EPYTHON}
    
    Reported-by: Agostino Sarubbo
    Closes: https://bugs.gentoo.org/774141
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-lang/ghc/ghc-8.10.4.ebuild | 19 +++++++++++++++++--
 dev-lang/ghc/ghc-8.8.4.ebuild  | 22 +++++++++++++++++++---
 dev-lang/ghc/ghc-9.0.1.ebuild  | 19 +++++++++++++++++--
 3 files changed, 53 insertions(+), 7 deletions(-)