From patchwork Sun Nov 13 18:05:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 19386 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1779886wru; Sun, 13 Nov 2022 10:06:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6qsG8Zd1weK7gO1+ffPECK57l+nBjKdeqgiqPr4gs0iyTN6hXPn9e3NXMBcR8yobFqs6+3 X-Received: by 2002:a05:6402:b63:b0:460:6194:d293 with SMTP id cb3-20020a0564020b6300b004606194d293mr8951637edb.331.1668362804481; Sun, 13 Nov 2022 10:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668362804; cv=none; d=google.com; s=arc-20160816; b=oE5amTHBEVWsmPP6XUxHok0Q27bcaKyF+sEJN+kCyWCss5sBBxcbRW5IKNAXL1XCyH fV5o+WAX13ebRrHIukHq6Vy8Rkx58zXfHRhm/fsXsZsAkX3Qc8hRjewfXaAW6Ys6g5H7 U0sArUfQ7h3uvJYJ1TGzfFxdZ5BwFAHUncZQ40o3mMIaOpOvcD9XV8znowuM2QcOY4ZV gbs6Pxr6xfIt4r7mO+5EJCXnhIUjj0h8aXP5WhnnwH05EpHogG6ZhXJ65ssC4eaDDc9/ nSTquH80ThbaneUYx//EZG4Yy3iW+1WCQdW9bQDRYDCLKBTTEuZzqg14AWKHBcaBQ4sv s2nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=9E6LGybBIOB6VktoF+CJbT1h9KZk5T5WSjxCu3syrj0=; b=Tb2bk5RvyqcLGv2SLsXFnmlit9VASyMpyWZjiL6VTt62U0Xtb4LPEh4W52py5CeoVE 4ttv9Xmq3Fn7qRhRDfBIqHnbc44nQFDveL4HLuHNatNkB9Pk0qa/RauzUWKTNSE31CSr 6ZliATqbH+0hvOM9KVXkvRyPHSzbIsp2l2iELfUDKUNbd00KxGBOCPccXztKs1wK/cS9 xwnIXglqclzsMnwKGuoRfdoAvuBx1xDSVHiqmNBamHG6VXNViIx+GOWuJFIafLXoCm6b 5Igrj3hWYbGH6jjpbmTSn7EoUZldLJpiz28XYP0bPdIm2AEB69gesUjOt9iqqgAcKPBm m9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ce3ak1Or; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c26-20020a056402159a00b00463c5d64f30si6545426edv.557.2022.11.13.10.06.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ce3ak1Or; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C0993885C1F for ; Sun, 13 Nov 2022 18:06:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C0993885C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668362791; bh=9E6LGybBIOB6VktoF+CJbT1h9KZk5T5WSjxCu3syrj0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Ce3ak1OriLfttrM0YAWEGuCPl/+zOMObFJbHamB302u9b308j4DsRlb5YbARMTtGn 7poVR3eoud65KAAF9ji+quyGYCZcgeR3zgOnghSO9hYrahwaL82SM21oUcDNC8ON0D JKghAgv68FGLy2MjteXhcVDZ0kYVlxHR1zN25n8E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id AB92F3858436; Sun, 13 Nov 2022 18:05:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB92F3858436 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4N9L2q60qBz9sSF; Sun, 13 Nov 2022 19:05:39 +0100 (CET) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH] libstdc++: Fix python/ not making install directories Date: Sun, 13 Nov 2022 19:05:27 +0100 Message-Id: <20221113180527.2907744-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749405195810781714?= X-GMAIL-MSGID: =?utf-8?q?1749405195810781714?= I'm unsure why this issue only started manifesting now with how old this code is, but this should fix it. libstdc++-v3/ChangeLog: * python/Makefile.am: Call mkinstalldirs before INSTALL_DATA when installing gdb scripts. * python/Makefile.in: Regenerate. --- Hi, Someone spotted on IRC spotted an error: if trying to install to a fresh prefix/sysroot with --enable-libstdcxx-debug, the install fails since it's intended target directories don't exist. I could replicate this on r13-3944-g43435c7eb0ff60 using $ ../gcc/configure --disable-bootstrap \ --enable-libstdcxx-debug \ --enable-languages=c,c++ \ --prefix=$(pwd)/pfx Install tested on x86_64-pc-linux-gnu with and without --enable-libstdcxx-debug. libstdc++-v3/python/Makefile.am | 4 ++++ libstdc++-v3/python/Makefile.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am index f523d3a44dc..7987d33e6d9 100644 --- a/libstdc++-v3/python/Makefile.am +++ b/libstdc++-v3/python/Makefile.am @@ -58,9 +58,13 @@ install-data-local: gdb.py libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ fi; \ + echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)"; \ + $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir); \ echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \ if [ -n "$(debug_gdb_py)" ]; then \ sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \ + echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug"; \ + $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug; \ $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \ fi diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in index 05e79b5ac1e..a68c1836481 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -623,10 +623,14 @@ install-data-local: gdb.py libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ fi; \ + echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)"; \ + $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir); \ echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py ; \ if [ -n "$(debug_gdb_py)" ]; then \ sed "/^libdir = /s;'$$;/debug';" gdb.py > debug-gdb.py ; \ + echo " $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug"; \ + $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)/debug; \ $(INSTALL_DATA) debug-gdb.py $(DESTDIR)$(toolexeclibdir)/debug/$$libname-gdb.py ; \ fi