public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/106472] No rule to make target '../libbacktrace/libbacktrace.la', needed by 'libgo.la'.
Date: Tue, 02 Apr 2024 11:41:32 +0000	[thread overview]
Message-ID: <bug-106472-4-HxQyY6HceJ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106472-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #38 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:9a5e4aade2b847c5262577a1490ce6f3df9a9841

commit r14-9751-g9a5e4aade2b847c5262577a1490ce6f3df9a9841
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 2 13:40:27 2024 +0200

    Fix up postboot dependencies [PR106472]

    On Wed, Mar 13, 2024 at 10:13:37AM +0100, Jakub Jelinek wrote:
    > While the first Makefile.tpl hunk looks obviously ok, the others look
    > completely wrong to me.
    > There is nothing special about libgo vs. libbacktrace/libatomic
    > compared to any other target library which is not bootstrapped vs. any
    > of its dependencies which are in the bootstrapped set.
    > So, Makefile.tpl shouldn't hardcode such dependencies.

    Here is my version of the fix.
    The dependencies in the toplevel Makefile simply didn't take into account
    that some target modules could be in a bootstrapped build built in some
    configurations as bootstrap modules (typically as dependencies of other
    target bootstrap modules), while in other configurations just as
    dependencies of non-bootstrap target modules and so not built during the
    bootstrap, but after it.
    Makefile.tpl arranges for those postboot target module -> target module
    dependencies to be emitted only inside of an @unless gcc-bootstrap block,
    while for @if gcc-bootstrap it just emits
    configure-target-whatever: stage_last
    dependencies which ensure those postbootstrap target modules are only built
    after everything that is bootstrapped has been.

    Now, the libbacktrace/libatomic target modules have bootstrap=true
    target_modules = { module= libbacktrace; bootstrap=true; };
    target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; };
    because those modules are dependencies of libphobos target module, so
    when d is included among bootstrapped languages, those are all bootstrapped
    and everything works correctly.
    While if d is not included, libphobos target module is disabled,
    libbacktrace/libatomic target modules aren't bootstrapped, nothing during
    bootstrap needs them, but post bootstrap libgo target module depends on
    the libatomic and libbacktrace target modules, libgfortran target module
    depends on the libbacktrace target module and libgm2 target module depends
    on the libatomic target module, but those dependencies were emitted only
    @unless gcc-bootstrap.  There is a similar theoretical problem for zlib
    target module if GCJ would be ressurected, libphobos as bootstrap target
    module depends on the zlib target module, but if d is not configured,
    fastjar also depends on it.

    The following patch arranges for the @if gcc-bootstrap case to emit also
    target module -> target module dependencies, but conditionally on the
    on dependency not being bootstrapped.

    In the generated Makefile.in you can see what the Makefile.tpl change
    produces and that it just adds extra dependencies which weren't there
    before in the @if gcc-bootstrap case.

    I've bootstrapped without this patch with
    ../configure --enable-languages=c,c++,go; make
    on x86_64-linux (note, make -j2 or higher usually worked) which failed
    as described in the PR, then with this patch with the same command which
    built fine and the Makefile difference between the two builds being
    diff -up obj40{a,b}/Makefile
    --- obj40a/Makefile     2024-03-31 00:35:22.243791499 +0100
    +++ obj40b/Makefile     2024-03-31 22:40:38.143299144 +0200
    @@ -29376,6 +29376,14 @@ configure-bison: stage_last
     configure-flex: stage_last
     configure-m4: stage_last

    +configure-target-fastjar: maybe-configure-target-zlib
    +all-target-fastjar: maybe-all-target-zlib
    +all-target-libgo: maybe-all-target-libbacktrace
    +all-target-libgo: maybe-all-target-libatomic
    +all-target-libgm2: maybe-all-target-libatomic
    +configure-target-libgfortran: maybe-all-target-libbacktrace
    +configure-target-libgo: maybe-all-target-libbacktrace
    +

     # Dependencies for target modules on other target modules are
     # described by lang_env_dependencies; the defaults apply to anything

    which I believe are exactly the extra dependencies we want.
    Plus I've done normal x86_64-linux and i686-linux bootstraps/regtests
    which in my case include
--enable-languages=default,ada,obj-c++,lto,go,d,rust,m2
    for x86_64 and the same except ada for i686; those with my usual make -j32.
    The Makefile difference in those builds vs. unpatched case
    is just an extra empty line.

    2024-04-02  Jakub Jelinek  <jakub@redhat.com>

            PR bootstrap/106472
            * Makefile.tpl (make-postboot-target-dep): New lambda.
            Use it to add --enable-bootstrap dependencies of target modules
            on other target modules if the latter aren't bootstrapped.
            * Makefile.in: Regenerate.

  parent reply	other threads:[~2024-04-02 11:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29  5:49 [Bug bootstrap/106472] New: " sumbera at volny dot cz
2022-07-29  6:29 ` [Bug bootstrap/106472] " pinskia at gcc dot gnu.org
2022-07-29  6:35 ` sumbera at volny dot cz
2022-07-29  8:01 ` rguenth at gcc dot gnu.org
2022-07-29  8:04 ` sumbera at volny dot cz
2022-07-30  8:40 ` roger at nextmovesoftware dot com
2022-07-30  8:53 ` schwab@linux-m68k.org
2022-07-30  9:18 ` roger at nextmovesoftware dot com
2022-07-30 14:02 ` roger at nextmovesoftware dot com
2022-07-30 14:24 ` jakub at gcc dot gnu.org
2022-07-30 14:46 ` schwab@linux-m68k.org
2022-07-30 22:14 ` roger at nextmovesoftware dot com
2022-07-31  7:14 ` cvs-commit at gcc dot gnu.org
2022-08-01  8:55 ` marxin at gcc dot gnu.org
2022-08-10  5:24 ` sumbera at volny dot cz
2022-08-12 10:48 ` jeffrey.rahr at baesystems dot com
2022-08-29 20:49 ` matoro_gcc_bugzilla at matoro dot tk
2022-09-14 12:07 ` tschwinge at gcc dot gnu.org
2022-09-14 14:35 ` jeffrey.rahr at baesystems dot com
2022-09-19 11:37 ` jeffrey.rahr at baesystems dot com
2022-09-19 17:33 ` roger at nextmovesoftware dot com
2022-09-19 18:00 ` jeffrey.rahr at baesystems dot com
2022-11-01 14:05 ` matoro_gcc_bugzilla at matoro dot tk
2022-11-01 14:06 ` matoro_gcc_bugzilla at matoro dot tk
2023-04-26  6:56 ` rguenth at gcc dot gnu.org
2023-05-12 19:49 ` matoro_gcc_bugzilla at matoro dot tk
2023-05-12 19:50 ` matoro_gcc_bugzilla at matoro dot tk
2023-07-26 18:11 ` dilyan.palauzov at aegee dot org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2023-09-10  6:11 ` egallager at gcc dot gnu.org
2023-09-10  6:34 ` egallager at gcc dot gnu.org
2023-09-10 13:42 ` matoro_gcc_bugzilla at matoro dot tk
2023-09-11  4:27 ` egallager at gcc dot gnu.org
2023-10-24 20:33 ` daniel.melendrezarmada at manchester dot ac.uk
2024-03-10 19:34 ` dilyan.palauzov at aegee dot org
2024-03-13  0:05 ` egallager at gcc dot gnu.org
2024-03-13  6:21 ` dilyan.palauzov at aegee dot org
2024-03-29 15:02 ` jakub at gcc dot gnu.org
2024-04-02 11:41 ` cvs-commit at gcc dot gnu.org [this message]
2024-04-21  4:08 ` cvs-commit at gcc dot gnu.org
2024-04-21 13:02 ` dilyan.palauzov at aegee dot org
2024-04-23  6:46 ` jakub at gcc dot gnu.org
2024-04-23  6:47 ` jakub at gcc dot gnu.org
2024-05-21  9:11 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106472-4-HxQyY6HceJ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).