Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70241 - Ebuilds that don't build in parallel don't prevent buildings with distcc
Summary: Ebuilds that don't build in parallel don't prevent buildings with distcc
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-06 03:25 UTC by J.O. Aho
Modified: 2005-02-28 01:33 UTC (History)
1 user (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 J.O. Aho 2004-11-06 03:25:00 UTC
When you emerge an ebuild with distcc, it's a lottery for the user if the ebuild will build or not, as there are NO information about it can't be built with distcc.

Reproducible: Always
Steps to Reproduce:
1. FEATURES="distcc" MAKEOPTS="-j3" emerge xorg-x11

Actual Results:  
The ebuild files when it's trying to parallel compile code that can't be built
in parallel (parts of the X11 is written like this)

Expected Results:  
The ebuild should have a "flag" if it can be built in parallel or not, if not,
build it normally after informed the user that the ebuild can't be built in
parallel.

This isn't a distcc bug and nor is it an ebuild bug either, it's a feature
missing in the portage system.
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2004-11-06 04:15:19 UTC
This can be fixed by settings MAKEOPTS=1 in the ebuild, no?
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-06 20:30:43 UTC
I think 'emake -j1' is the suggestion.
Comment 3 Tuan Van (RETIRED) gentoo-dev 2004-11-06 23:17:27 UTC
I wonder if below is bad for QA:

        if has distcc $FEATURES; then
                einfo "You have \"distcc\" enabled"
                einfo "build with MAKEOPTS=-j1"
                emake -j1 || die "compile problem"
        else
                einfo "build with MAKEOPTS=$MAKEOPTS"
                emake || die "compile problem"
        fi
It won't affect people have more than 1 CPU.
Comment 4 foser (RETIRED) gentoo-dev 2004-11-08 07:05:55 UTC
@ comment #3 : -j1 often gets set because packages don't build well in parallel, this has nothing todo with distcc itself, it merely exposes the problems : there are more users with a distcc setup than users with a multi-cpu setup.

In general i think this bugreport is about adding a 'feature' that tells the user that something is being built 'jobs restricted'. I personally think it's a bit vain; sure in some cases it might have some impact if we build with -j12, but in most cases it just doesn't and as such it is not relevant to know if something is makejobs capped (while this is often for a good reason).

My suggestion to the reporter : just grep the ebuild for '-j1' or MAKEOPTS if you really want to know & go with the defaults.
Comment 5 J.O. Aho 2004-11-09 02:05:57 UTC
The suggestion of grepping don't work, take a look at xorg-x11. IMHO this suggestion is as good as removing the ACCEPT_KEYWORDS and tell the users to check the ebuilds ChangeLog to see if the ebuild is stable or not, or even builds on the CPU in question.

It seems that no one is prepared to take on this subject properly, rather tell it's someone elses problem to fix. I would like to see something more like

ACCEPT_KEYWORDS="ppc x86 -*"
ACCEPT_DISTCC=1

or 

ACCEPT_KEYWORDS="ppc x86 -*"
ACCEPT_DISTCC=0

And if the ACCEPT_DISTCC is set to 0, then FEATURES="distcc" would be ignored, and the ebuild would be completly buildt locally.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2004-11-09 03:20:26 UTC
Do you have any examples where a package fails with distcc, but works with -jX locally? If not I dont see the point of adding a new env var when the information is already defined in the make call. Also what if an ebuild has multiple make calls and only one would fail with distcc?
Comment 7 SpanKY gentoo-dev 2004-11-09 21:31:10 UTC
agreed, like foser said, if something fails to build with distcc, chances are it's just a simple parallel build bug that only seems to be exposed with distcc

if it fails in parallel with distcc, then you should (in theory) be able to reproduce it with good old -j and no distcc

in other words, this bug should be punted and you should file bugs against packages which dont build in parallel
Comment 8 J.O. Aho 2004-11-10 16:32:38 UTC
There are quite many packages that failes with distcc, but works fine locally (even with a high -j value), as a few example are gettext and zlib.

I frankly see the only option to really have a varaible to allow/disallow distcc, or else see to drop distcc from the portage.
Comment 9 SpanKY gentoo-dev 2004-11-10 16:39:33 UTC
what version of zlib fails ?

there was an issue with zlib not working properly (which distcc triggered), but that should be fixed (and thus distcc works now)
Comment 10 Brian Harring (RETIRED) gentoo-dev 2005-02-28 01:33:10 UTC
Invalidating this.  File bugs against the pkgs that fail.