Bug 48724 - Lto build of mozilla dies at lto-wrapper: error trying to exec 'make -j1': execvp: No such file or directory
Summary: Lto build of mozilla dies at lto-wrapper: error trying to exec 'make -j1': ex...
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: mozillametabug
  Show dependency treegraph
 
Reported: 2011-04-22 09:05 UTC by Jan Hubicka
Modified: 2017-11-16 20:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-05-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hubicka 2011-04-22 09:05:05 UTC
Hi,
It seems that environment vars set by mozilla build confuse lto-wrapper with:

lto-wrapper: error trying to exec 'make -j1': execvp: No such file or directory

cut&pasting the compilation command line and executing it by hand works well.

Honza
Comment 1 Richard Biener 2011-04-22 09:16:34 UTC
Does it set MAKE?  I suppose we need to split (and preserve?) arguments :/
Comment 2 Jan Hubicka 2011-04-22 09:24:59 UTC
Hmm,
grep didn't seem to find any interesting positives on this.  However I did not update my mozilla tree since last build that did not reproduce this and nothing seems to have changed on GCC side.  I think evans got updated, so perhaps it is feature of new GNU Make to prevent fork bombs?

Mozilla Makefiles do not use "+" clauses and I simply use hard wired -flto=24 setting.

Honza
Comment 3 Andrew Pinski 2011-12-15 23:39:37 UTC
Has this been fixed?
Comment 4 Richard Biener 2012-05-07 12:30:01 UTC
No response and unclear bug.
Comment 5 Jan Hubicka 2012-05-07 23:20:50 UTC
> No response and unclear bug.
It is still there.  In lto-wrapper.c we do 
         new_argv[0] = getenv ("MAKE");
and when MAKE is set to something like "make -j" we try to execute it...

Honza
Comment 6 Richard Biener 2012-05-08 10:15:26 UTC
Ok, you didn't state that Mozilla indeed sets MAKE to 'make -j'.  Yes, if that
happens there is a problem.
Comment 7 Richard Biener 2013-03-08 13:58:27 UTC
Caused by

2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

       * lto-wrapper.c (run_gcc): Unset MAKEFLAGS and MFLAGS
       before calling make; allow override through $MAKE.
       * doc/invoke.texi (Optimize Options): Document override.

simply checking with access (..., X_OK) of course doesn't work (that doesn't
search the path...).
Comment 8 Jan Hubicka 2015-01-20 02:30:01 UTC
This no longer happens with recent Firefox builds, but I think it was rather fixed at Firefox buildsystem...
Comment 9 Eric Gallager 2017-11-16 20:53:31 UTC
(In reply to Jan Hubicka from comment #8)
> This no longer happens with recent Firefox builds, but I think it was rather
> fixed at Firefox buildsystem...

That sounds like WORKSFORME then.