public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
@ 2010-11-03 16:17 ` hjl.tools at gmail dot com
  2010-11-03 17:13 ` davek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-03 16:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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

* [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto
@ 2010-11-03 16:17 hjl.tools at gmail dot com
  2010-11-03 16:17 ` [Bug lto/46291] " hjl.tools at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-03 16:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

           Summary: [4.6 Regression] Failed to bootstrap-lto
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: davek@gcc.gnu.org, iant@google.com


On Linux/86-64, bootstrap-lto failed:

http://gcc.gnu.org/ml/gcc-regression/2010-11/msg00024.html

ld.gold: fatal error: .././libiberty/libiberty.a: lseek: Bad file descriptor
collect2: ld returned 1 exit status
make[6]: *** [build/genhooks] Error 1

Revision 166230 is OK. It may be caused by revision 166233:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00119.html


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
  2010-11-03 16:17 ` [Bug lto/46291] " hjl.tools at gmail dot com
@ 2010-11-03 17:13 ` davek at gcc dot gnu.org
  2010-11-03 20:49 ` davek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 17:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

--- Comment #1 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 17:12:51 UTC ---
I am investigating.


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
  2010-11-03 16:17 ` [Bug lto/46291] " hjl.tools at gmail dot com
  2010-11-03 17:13 ` davek at gcc dot gnu.org
@ 2010-11-03 20:49 ` davek at gcc dot gnu.org
  2010-11-03 20:51 ` davek at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 20:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.03 20:49:18
         AssignedTo|unassigned at gcc dot       |davek at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 20:49:18 UTC ---
I have found the problem.  There is an ambiguity in the plugin interface spec.

http://gcc.gnu.org/wiki/whopr/driver says

" Input Files
  [ ... ]
  struct ld_plugin_input_file
  {
    const char *name;
    int fd;
  [ ... ]
  };
  [ ... ]
fd: An open file descriptor for the input file. The current position in the
file is undefined (i.e., the plug-in must call lseek before reading). If the
plug-in 
                                                                 ^^^^^^^^^^^^^^
claims the file, it will then own the file descriptor and has the
responsibility 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
for closing it. If the plug-in does not claim the file, it must leave it open,
but
^^^^^^^^^^^^^^^
it is not required to maintain the current position in the file. "

However it also says:

" Plugin Interfaces
  [ ... ]
4. 
  [ ... ]
Whether the file is claimed or not, the linker maintains responsibility for
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opening and closing the file as necessary."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Oops.  Guess which way LD does it?  Guess which way GOLD does it?

Ian?  Which way should this really be?

While we decide, I have a patch that will fix lto-bootstrap by detecting which
linker is calling onload and deciding whether or not to close the fd on that
basis.


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-11-03 20:49 ` davek at gcc dot gnu.org
@ 2010-11-03 20:51 ` davek at gcc dot gnu.org
  2010-11-03 21:31 ` ccoutant at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 20:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

--- Comment #3 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 20:51:02 UTC ---
Created attachment 22267
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22267
only close fd if we were called by gnu ld

About to put this through a test cycle.


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-11-03 20:51 ` davek at gcc dot gnu.org
@ 2010-11-03 21:31 ` ccoutant at gcc dot gnu.org
  2010-11-03 21:35 ` davek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ccoutant at gcc dot gnu.org @ 2010-11-03 21:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

--- Comment #4 from Cary Coutant <ccoutant at gcc dot gnu.org> 2010-11-03 21:31:22 UTC ---
Sorry, the original design was for the plugin to maintain responsibility for
the file descriptor. That didn't work well, so we added the GET_INPUT_FILE and
RELEASE_INPUT_FILE interfaces to give that responsibility back to the linker.
The text under "Input Files" is old and should have been changed to reflect the
new design. I've updated the wiki.

-cary


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2010-11-03 21:31 ` ccoutant at gcc dot gnu.org
@ 2010-11-03 21:35 ` davek at gcc dot gnu.org
  2010-11-03 21:42 ` davek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 21:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

--- Comment #5 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 21:35:11 UTC ---
Thanks Cary.  I shall prepare a different patch that simply deletes the lines
that close the fd, and shall fix LD to match.


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2010-11-03 21:35 ` davek at gcc dot gnu.org
@ 2010-11-03 21:42 ` davek at gcc dot gnu.org
  2010-11-03 21:44 ` davek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 21:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22267|0                           |1
        is obsolete|                            |

--- Comment #6 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 21:42:26 UTC ---
Created attachment 22269
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22269
never close the fd


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2010-11-03 21:42 ` davek at gcc dot gnu.org
@ 2010-11-03 21:44 ` davek at gcc dot gnu.org
  2010-11-03 23:14 ` davek at gcc dot gnu.org
  2010-11-03 23:15 ` davek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 21:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, lto, patch
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2010-11/msg00362.htm
                   |                            |l

--- Comment #7 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 21:43:48 UTC ---
posted.  bootstrap running.


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2010-11-03 21:44 ` davek at gcc dot gnu.org
@ 2010-11-03 23:14 ` davek at gcc dot gnu.org
  2010-11-03 23:15 ` davek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 23:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

--- Comment #8 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 23:13:55 UTC ---
Author: davek
Date: Wed Nov  3 23:13:51 2010
New Revision: 166285

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166285
Log:
    PR lto/46291
    * lto-plugin.c (claim_file_handler): Don't close file descriptor.


Modified:
    trunk/lto-plugin/ChangeLog
    trunk/lto-plugin/lto-plugin.c


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

* [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
  2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2010-11-03 23:14 ` davek at gcc dot gnu.org
@ 2010-11-03 23:15 ` davek at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: davek at gcc dot gnu.org @ 2010-11-03 23:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 23:15:19 UTC ---
works now.


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

end of thread, other threads:[~2010-11-03 23:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03 16:17 [Bug lto/46291] New: [4.6 Regression] Failed to bootstrap-lto hjl.tools at gmail dot com
2010-11-03 16:17 ` [Bug lto/46291] " hjl.tools at gmail dot com
2010-11-03 17:13 ` davek at gcc dot gnu.org
2010-11-03 20:49 ` davek at gcc dot gnu.org
2010-11-03 20:51 ` davek at gcc dot gnu.org
2010-11-03 21:31 ` ccoutant at gcc dot gnu.org
2010-11-03 21:35 ` davek at gcc dot gnu.org
2010-11-03 21:42 ` davek at gcc dot gnu.org
2010-11-03 21:44 ` davek at gcc dot gnu.org
2010-11-03 23:14 ` davek at gcc dot gnu.org
2010-11-03 23:15 ` davek 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).