public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed
@ 2020-10-21 19:19 tstellar at redhat dot com
  2020-10-22  6:32 ` [Bug lto/97524] " marxin at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tstellar at redhat dot com @ 2020-10-21 19:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

            Bug ID: 97524
           Summary: Compiling with -flto=auto fails in make is not
                    installed
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tstellar at redhat dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Compiling with -flto=auto does not work when make is not installed.  The
documentation for -flto=auto says it should fallback to autodetection when the
make job server is not available.

Instructions to reproduce: On a system without make installed run:

echo "void main() { }" | gcc -x c -flto=auto -

Command output:

lto-wrapper: fatal error: execvp: No such file or directory
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
@ 2020-10-22  6:32 ` marxin at gcc dot gnu.org
  2020-10-22  7:15 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-22  6:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-10-22
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed. When make is not installed, no fallback is possible as LTO uses make
to do the parallel execution.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
  2020-10-22  6:32 ` [Bug lto/97524] " marxin at gcc dot gnu.org
@ 2020-10-22  7:15 ` jakub at gcc dot gnu.org
  2020-10-22  7:22 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-22  7:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, can't it fall back to serial compilation?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
  2020-10-22  6:32 ` [Bug lto/97524] " marxin at gcc dot gnu.org
  2020-10-22  7:15 ` jakub at gcc dot gnu.org
@ 2020-10-22  7:22 ` rguenth at gcc dot gnu.org
  2020-10-22  7:25 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-22  7:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Well, can't it fall back to serial compilation?

It could, maybe with some diagnostic.  It could also use fork-based
parallelism.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (2 preceding siblings ...)
  2020-10-22  7:22 ` rguenth at gcc dot gnu.org
@ 2020-10-22  7:25 ` marxin at gcc dot gnu.org
  2020-10-22 12:09 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-22  7:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
> It could, maybe with some diagnostic.  It could also use fork-based
> parallelism.

It seems to me extra work.
Expecting make for parallel execution seems to be a reasonable request.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (3 preceding siblings ...)
  2020-10-22  7:25 ` marxin at gcc dot gnu.org
@ 2020-10-22 12:09 ` marxin at gcc dot gnu.org
  2020-10-22 14:05 ` tstellar at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-22 12:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. the following also fails probably since the beginning:

$ echo "void main() { }" | MAKE=mymake gcc -x c -flto=16 -
lto-wrapper: fatal error: execvp: No such file or directory
compilation terminated.
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status

I've got a patch for both cases.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (4 preceding siblings ...)
  2020-10-22 12:09 ` marxin at gcc dot gnu.org
@ 2020-10-22 14:05 ` tstellar at redhat dot com
  2020-10-23  7:03 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tstellar at redhat dot com @ 2020-10-22 14:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

--- Comment #6 from Tom Stellard <tstellar at redhat dot com> ---
If I have make installed on my system, but am using something else (e.g. ninja)
to build my project, will I still get parallel execution?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (5 preceding siblings ...)
  2020-10-22 14:05 ` tstellar at redhat dot com
@ 2020-10-23  7:03 ` marxin at gcc dot gnu.org
  2020-10-23  7:48 ` cvs-commit at gcc dot gnu.org
  2020-10-23  7:55 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-23  7:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Tom Stellard from comment #6)
> If I have make installed on my system, but am using something else (e.g.
> ninja) to build my project, will I still get parallel execution?

No, we construct an artificial Make file that we pass to make.
Anyway, a system w/o make is quite awkward, it's such an essential tool :)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (6 preceding siblings ...)
  2020-10-23  7:03 ` marxin at gcc dot gnu.org
@ 2020-10-23  7:48 ` cvs-commit at gcc dot gnu.org
  2020-10-23  7:55 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-23  7:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:6fade5a6044b7102758f4ca66c8715ebc12a6306

commit r11-4279-g6fade5a6044b7102758f4ca66c8715ebc12a6306
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Oct 22 14:07:29 2020 +0200

    LTO: check that make command works

    gcc/ChangeLog:

            PR lto/97524
            * lto-wrapper.c (make_exists): New function.
            (run_gcc): Use it to check that make is present and working
            for parallel execution.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug lto/97524] Compiling with -flto=auto fails in make is not installed
  2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
                   ` (7 preceding siblings ...)
  2020-10-23  7:48 ` cvs-commit at gcc dot gnu.org
@ 2020-10-23  7:55 ` marxin at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-23  7:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97524

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |11.0
         Resolution|---                         |FIXED
      Known to fail|                            |10.2.0

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed, not planning to backport it.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-23  7:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 19:19 [Bug lto/97524] New: Compiling with -flto=auto fails in make is not installed tstellar at redhat dot com
2020-10-22  6:32 ` [Bug lto/97524] " marxin at gcc dot gnu.org
2020-10-22  7:15 ` jakub at gcc dot gnu.org
2020-10-22  7:22 ` rguenth at gcc dot gnu.org
2020-10-22  7:25 ` marxin at gcc dot gnu.org
2020-10-22 12:09 ` marxin at gcc dot gnu.org
2020-10-22 14:05 ` tstellar at redhat dot com
2020-10-23  7:03 ` marxin at gcc dot gnu.org
2020-10-23  7:48 ` cvs-commit at gcc dot gnu.org
2020-10-23  7:55 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).