From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id 77947384403D for ; Mon, 12 Oct 2020 15:30:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 77947384403D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x442.google.com with SMTP id e18so19654043wrw.9 for ; Mon, 12 Oct 2020 08:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=X9jKl7HQV37N0Vf0Uk01P+SxNSGc736BQWKL11mAtVY=; b=Z04fT8l0unCQk6NKGpqPzoz7PnP+YFk/AekyRfJyTBdndBGWHCpFEKJmO7Dk/ZDrki b36ZMOZTMovyCGeZgWJnXhfNvGDWUkjrxBdctV/ci008z/70qUSgcOb36I8wquL1FbLk OH/Kf5gxI+AvXu4RBvTvMyU4raMX46QHQtQEVfK0yTmWXgaveNbDnv3+326FhQY8T7X1 usFJXrt/NZdxvVjHaz9fU8YUzTmcpuTfMdjONhxfw0qLTy7PIXcKqyTBkQBhw3ggTaQq Mgj8snqHvJO1i0fuPjIzxdjzSqkPzKVO+OzBPDxsgUkXcVJ3j1tXlKoZ3r+jxDTU1KQu RvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=X9jKl7HQV37N0Vf0Uk01P+SxNSGc736BQWKL11mAtVY=; b=OIW94Bf3pDeyonxiJI+gwUcihPaxXslMgANfLYOIokevyxzMZ/YqT1n/JzhY9Hw39T BlFzax3Z11WiITebjJpMtm6Hzdsmm76CrAa7irSWcVMGCYHlxHw8Vgfm/6IqXC7y4TlF sdK26aUn6zkpsCVybugalPM2ShpUTtf2p9JBsjSremrPEzERDpOgkFXmEC+N03+9If5e eTzmrxypQIBTe9pz6pRq1TvOhKO+hJLLCmOfPvsabCntRVmj44pjv84BPAfHYZMXn9vG eQ7cWKb6/1EqbAghMOJwcXjnFvqSUB/wV4p4/79wjRWgPxjl5lRo0oFMC9dJa2xzqS4p XJIQ== X-Gm-Message-State: AOAM531ghjtmfMkpNLjDjHuJRDGPu6LLsDZpbfwi8Mpg1nyBXw1Dsi+L tUIjjieOkYLIm+ei1+jnXuyLyA== X-Google-Smtp-Source: ABdhPJzyfZ/U4Pl+VwA9HQQcB04BGZWpdthaZneP9AkY/D5JMvW6p75hKCiusv2oYPdnztbEKhsfvA== X-Received: by 2002:adf:8290:: with SMTP id 16mr32391040wrc.103.1602516616496; Mon, 12 Oct 2020 08:30:16 -0700 (PDT) Received: from localhost (host86-130-161-39.range86-130.btcentralplus.com. [86.130.161.39]) by smtp.gmail.com with ESMTPSA id 64sm4824045wmd.3.2020.10.12.08.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 08:30:15 -0700 (PDT) Date: Mon, 12 Oct 2020 16:30:14 +0100 From: Andrew Burgess To: Simon Marchi Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [PATCH] gnulib: Ensure all libraries are used when building gdb/gdbserver Message-ID: <20201012153014.GV605036@embecosm.com> References: <20201005165134.1620549-1-andrew.burgess@embecosm.com> <2feb66c2-8f65-7cbf-d1be-ae3d04b45d9a@simark.ca> <20201006121751.GK605036@embecosm.com> <95d52add-47c2-9621-7e60-1ff9a4331324@simark.ca> <20201007153319.GL605036@embecosm.com> <20201009083436.GP605036@embecosm.com> <20201012114130.GA28251@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux/5.8.12-100.fc31.x86_64 (x86_64) X-Uptime: 16:28:45 up 9 days, 7:41, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2020 15:30:19 -0000 * Simon Marchi [2020-10-12 10:16:08 -0400]: > On 2020-10-12 7:41 a.m., Joel Brobecker wrote: > > I got reports of the nightly source packaging failing soon after > > you pushed this patch, and I was able to reproduce it by configuring > > (out of tree), followed by a "make distclean". I did a "make -C gdb install" > > as well, but I don't think it should have any influence on the outcome. > > > > The error I get is the following: > > > > | Makefile:246: ../gnulib/Makefile.gnulib.inc: No such file or directory > > | make[2]: *** No rule to make target '../gnulib/Makefile.gnulib.inc'. Stop. > > | make[2]: Leaving directory '/[...]/gdb' > > > > Do you think you could look into it? > > Ah, that's a case I didn't think of. When make distclean runs, it runs > first in gnulib, so erases gnulib/Makefile.gnulib.inc. When it then > runs in gdb, the Makefile can't run. > > So I guess we'll need to make the inclusion condition/non-fatal for this > reason, unless you see another way? How about this? I've added a module dependency to ensure that gdb/gdbserver are both cleaned before gnulib. My hope is that this should ensure Makefile.gnulib.inc still exists when needed... Thanks, Andrew --- commit 75b86a705adbb127962beb5ef8d9d7181afe3789 Author: Andrew Burgess Date: Mon Oct 12 16:04:32 2020 +0100 gdb/gdbserver: use '-include' to pull in Makefile.gnulib.inc After commit: commit 361cb219351d8b7e39e1962fe77f40aa80657b27 Date: Tue Oct 6 10:09:06 2020 +0100 gnulib: Ensure all libraries are used when building gdb/gdbserver We now get an error when, at the top level of the build tree, we do 'make distclean'. The reason for this is that the gnulib directory is cleaned before the gdb directory, cleaning gnulib deletes Makefile.gnulib.inc from the gnulib build directory, which is currently pulled in by the gdb Makefile.in using 'include'. This commit adds a dependency between distclean-gnulib and both distclean-gdb and distclean-gdbserver. This means that gdb and gdbserver will be cleaned before gnulib, as a result the Makefile.gnulib.inc file should exist when needed. ChangeLog: * Makefile.in: Rebuild. * Makefile.def: Make distclean-gnulib depend on distclean-gdb and distclean-gdbserver. diff --git a/Makefile.def b/Makefile.def index 76d062bb671..089e70ae3ed 100644 --- a/Makefile.def +++ b/Makefile.def @@ -548,6 +548,12 @@ dependencies = { module=configure-libctf; on=all-intl; }; dependencies = { module=configure-libctf; on=all-zlib; }; dependencies = { module=configure-libctf; on=all-libiconv; }; +// The Makefiles in gdb and gdbserver pull in a file that configure +// generates in the gnulib directory, so distclean gnulib only after +// gdb and gdbserver. +dependencies = { module=distclean-gnulib; on=distclean-gdb; }; +dependencies = { module=distclean-gnulib; on=distclean-gdbserver; }; + // Warning, these are not well tested. dependencies = { module=all-bison; on=all-intl; }; dependencies = { module=all-bison; on=all-build-texinfo; }; diff --git a/Makefile.in b/Makefile.in index 9dfd39fae13..fe34132f9e5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52366,6 +52366,8 @@ configure-stage3-libctf: maybe-all-stage3-libiconv configure-stage4-libctf: maybe-all-stage4-libiconv configure-stageprofile-libctf: maybe-all-stageprofile-libiconv configure-stagefeedback-libctf: maybe-all-stagefeedback-libiconv +distclean-gnulib: maybe-distclean-gdb +distclean-gnulib: maybe-distclean-gdbserver all-bison: maybe-all-build-texinfo all-flex: maybe-all-build-bison all-flex: maybe-all-m4