From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1668362739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9E6LGybBIOB6VktoF+CJbT1h9KZk5T5WSjxCu3syrj0=; b=MaBjGzjCjHCcW5kedVD1jkJ45hs0Fo/fbj9ytyygL409/LDcLrxDITipOcfrtj6nXgMy/K 1CEEotcElbb60Rh4/ACDzfzmYtzy6bExQsbZZW0RffSRNWyyKTUMnXarak8q6QLOEtNDjq vmReT+IfMl2fIxttZkS6Gy/tmAr+9hvz/ICRH3Yly3OvRPDRT9vp+PCvjUYS85LoNKd5wo HDwOmEnZAGuv2o+iu4TDAwkLwIwkN0zpPu5P6HmMv6zkDDDv25kuTGDR0O7HGEsowR+36O eF+LaBNGTdQbou5thauFcV2mIXuWW1bdPQEi4+MWJAzTgoayy7Pockdn3sCuAQ== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: =?UTF-8?q?Arsen=20Arsenovi=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 Content-Transfer-Encoding: 8bit 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 List-Id: 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 -- 2.38.1