Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 737660 - dev-lang/python-3.8.5: does not respect MAKEOPTS
Summary: dev-lang/python-3.8.5: does not respect MAKEOPTS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-17 13:03 UTC by m1027
Modified: 2020-08-18 12:34 UTC (History)
4 users (show)

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


Attachments
build.log for amd64 (dev-lang:python-3.8.5:20200817-131105.log,983.76 KB, text/x-log)
2020-08-17 13:14 UTC, m1027
Details
patch to remove -j0 (compileall-singlethreaded-v2.patch,1.73 KB, patch)
2020-08-17 20:08 UTC, m1027
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description m1027 2020-08-17 13:03:20 UTC
I cannot compile python-3.8.5 on on my Raspberry Pi 3 anymore because

MAKEOPTS="-j1 -l1"

is not applied for (all) build phases. At least the configure phase and some
phases in the end use all CPUs here. In turn, this tears down the entire
Rapsberry Pi due to RAM and/or temperature issues.

This also happens on amd64, not only arm.

Very similar or same issues:

https://bugs.gentoo.org/715542
https://bugs.gentoo.org/716758

Thanks



Reproducible: Always
Comment 1 m1027 2020-08-17 13:14:25 UTC
Created attachment 655098 [details]
build.log for amd64
Comment 2 Alexander Tsoy 2020-08-17 18:37:48 UTC
Some info with a workaround patch is available in bug #720050. The problem is that compileall.py is called with -j0 option, so it uses all available threads.
Comment 3 m1027 2020-08-17 20:08:14 UTC
Created attachment 655178 [details, diff]
patch to remove -j0

Slightly modified patch as linked to in this comment:

https://bugs.gentoo.org/720050#c16
Comment 4 m1027 2020-08-17 20:14:18 UTC
Thanks for pointing to bug #720050.

My patch (v2) is a slightly modified version since the original hat hunk errors.

This helped partly:

The final compile phase seemed indeed to run on one CPU core only, however, there is some intermediate phase where again all cores are used. These tests were run on amd64 and not arm yet so I believe my Raspberry Pi will not entirely be satisfied by this patch...
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-18 07:03:17 UTC
(In reply to m1027 from comment #3)
> Created attachment 655178 [details, diff] [details, diff]
> patch to remove -j0
> 
> Slightly modified patch as linked to in this comment:
> 
> https://bugs.gentoo.org/720050#c16

Doesn't this effectively force -j1 for everyone?  I suppose it would be better to sed it into correct job count.  I'll look at it in a minute.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-08-18 07:24:31 UTC
From a quick peek, the following parts do not respect MAKEOPTS:

1. setup.py build of extensions,

2. tests,

3. compileall.

I'll try to patch all of them.
Comment 7 Larry the Git Cow gentoo-dev 2020-08-18 08:03:59 UTC
The bug has been closed via the following commit(s):

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

commit a2cb4f6a8da80865a65bbebd5cf749e4cab8ae62
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-08-18 07:54:48 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-08-18 08:03:54 +0000

    dev-lang/python: Respect MAKEOPTS throughout the build
    
    Closes: https://bugs.gentoo.org/737660
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/python/python-3.6.11-r2.ebuild | 14 +++++++++++---
 dev-lang/python/python-3.7.8-r2.ebuild  | 14 +++++++++++---
 dev-lang/python/python-3.8.5.ebuild     | 15 ++++++++++++---
 dev-lang/python/python-3.9.0_rc1.ebuild | 16 ++++++++++++----
 4 files changed, 46 insertions(+), 13 deletions(-)
Comment 8 m1027 2020-08-18 12:34:05 UTC
Fix confirmed at least for the -j1 case, on amd64 and arm (Raspberry Pi 3).

@Michał: No patch but sed'ing in the ebuilds... quite a cool one. :-)