From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) by sourceware.org (Postfix) with ESMTPS id C5CDF3858D28 for ; Tue, 17 Jan 2023 10:21:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5CDF3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UEdYXEtmHIdVTEIoIc4wOBARSfnL4jcMH0Y6YpinmbE=; b=db3MyGIWfCvD5o068F5uX5ohEa5xQdLSLS1LdleSkHIOs7KyEn0Nvn8GczeynAiafiCbZoi5r4qNF65cVa2Hgrg7iMVHjHq6NMTLuD74A8g6vF7Z8L1e9KNSV9NAexf2Oa4dtukYCYp2sA1Qs7AyWXrw7CB+NNACW9rn4PaUYrE= Received: from AS9PR0301CA0038.eurprd03.prod.outlook.com (2603:10a6:20b:469::9) by DB9PR08MB8700.eurprd08.prod.outlook.com (2603:10a6:10:3d0::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Tue, 17 Jan 2023 10:21:43 +0000 Received: from AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:469:cafe::33) by AS9PR0301CA0038.outlook.office365.com (2603:10a6:20b:469::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Tue, 17 Jan 2023 10:21:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT016.mail.protection.outlook.com (100.127.140.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13 via Frontend Transport; Tue, 17 Jan 2023 10:21:43 +0000 Received: ("Tessian outbound b1d3ffe56e73:v132"); Tue, 17 Jan 2023 10:21:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a199cf0e5c68770b X-CR-MTA-TID: 64aa7808 Received: from add16921be60.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BC843590-A51C-4F32-B66B-ECC01FF014BD.1; Tue, 17 Jan 2023 10:21:35 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id add16921be60.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 17 Jan 2023 10:21:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJIZdsX+rXwk3HwUoheu1igh8OvShu36dv1K8mHRVxgptTcS3S6AEnZqJLRtpzeOF0tnU9vliW2Smcgi/tOiOOdwaiswDaqGMASXTRq9BnY/WnfQuxjyTRJMm28zXYfZPUOZlT1MsSWd3o9gg6mCJJ3bCcdXjpI1NYhDZ7t2mK6FGMC1Z9s9Qc0LYuaG1K1JdG+Mvz6yZr5H9/Rnfklx4gAvfhpimzqs3GndUBc0SA2W9BSxWKTIfqs7EUedJjhBoD+sD5JLUUQ+W/8brlHzyrwH3DqSsnaa3MxUdhWI7aKLjl0nJBNOdCF/vQpC0ZkhrbntVZGSSxvcgO5f2iP4gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UEdYXEtmHIdVTEIoIc4wOBARSfnL4jcMH0Y6YpinmbE=; b=GqXqhFV599no0LNgx2rNaCcBX8Yn54YXwy0lHA3/Cuo6hr1XJVF5UhelLMIGdhFC4wyH80fa4O0P4I/vyYFYGGS4oIcGOCBbyqPhUqX5Z1VO06X3jvfL/+MNhEFXj30Keg/xqKhFVJjtkUnxopO0dLzOBrJpSI7ED/dQn2usp7lUadLIxiV1quvJzZBZg92+wKX4pDZQaotlHbRNWIgzQJXdvabEcJ5Em2JMXrTFArq2DmvVErdIEotaV/M9fU7pL65g3L0+ZTIEmtfgxbArye3ROhVa1eu3c7BSOZt7OmcPfb/JM760a4WJ679ccOdwJ5qaYL34DeBzRY8W7WlVdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UEdYXEtmHIdVTEIoIc4wOBARSfnL4jcMH0Y6YpinmbE=; b=db3MyGIWfCvD5o068F5uX5ohEa5xQdLSLS1LdleSkHIOs7KyEn0Nvn8GczeynAiafiCbZoi5r4qNF65cVa2Hgrg7iMVHjHq6NMTLuD74A8g6vF7Z8L1e9KNSV9NAexf2Oa4dtukYCYp2sA1Qs7AyWXrw7CB+NNACW9rn4PaUYrE= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by PA4PR08MB7436.eurprd08.prod.outlook.com (2603:10a6:102:2a7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Tue, 17 Jan 2023 10:21:32 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a%6]) with mapi id 15.20.5986.023; Tue, 17 Jan 2023 10:21:30 +0000 Message-ID: Date: Tue, 17 Jan 2023 10:21:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] gprofng: PR29987 bfd/archive.c:1447: undefined reference to `filename_ncmp' Content-Language: en-US To: Vladimir Mezentsev , "binutils@sourceware.org" References: <20230112205654.3456561-1-vladimir.mezentsev@oracle.com> <4f171a70-f1a4-f750-05aa-bf365970ae05@oracle.com> <85078aba-407e-2576-7eb4-58a457924adc@arm.com> <0e70554b-6c1e-25ae-3c83-efed1ed5f854@oracle.com> Cc: nick Clifton , Joseph Myers From: Luis Machado In-Reply-To: <0e70554b-6c1e-25ae-3c83-efed1ed5f854@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P123CA0023.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:313::9) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|PA4PR08MB7436:EE_|AM7EUR03FT016:EE_|DB9PR08MB8700:EE_ X-MS-Office365-Filtering-Correlation-Id: 6194214e-4762-41b0-5ec9-08daf874a176 X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bVfEaaIvmawhUEg7gxzVJOYORXq5JN3QUOp868PKNPSIulJ+ipwlR76pbFabgQ4ijKRTbzC16wWE3xhpLEZ7RfqmmGubDkXP3SdIUSY5vxgh95cE1RprINLOoz8VAtHUUoHuDHkrGn+76ZywhDang553qJlB+mhqShUk147dnWsAodN49g69n8HydVUgQ18OWxQ1gED9MXJioC7S+CXXAZSHgyN3GJn2f32sV/kVI8n2twonZh6d55qZjNCONiPMmvHwjMsFgb4DThYRzk+HTXnwVbrBR7ql7tCwRqWgzY8mUeGgkBTZeAKpqed+PZWzoVX5UDvQQCNNOkYnzQNHu4LfZGrqApaTBoejsRNaIZ1FXQW19Me750AYzQB8p9pKcOqOYZUdSXuDyPXsu7aYZN/1hsPe2rzJU3CqG75wTMjcW2Nj4o/i8NoxBZigeZl/AeG/O1gOPT+moXcu0OsDrgYmPCyRYIEdEcLhbUdzJPwMxGOBfHGWjh0dRfmweGXFFSK8jNAQefcrjhwKzyY/PvYjTaNy+mtFX/6i7JuTuMMVcJpvk2EzBl2+evVljwcwZm26xP3qH2q4ZX4hSL2sbUdetFkm7l/zevaexvqJXh4izN7FQjNbY0bj3MtHT1sc4sTv7HHAWtaGOzjFw5h6X57W0MOjtbU3vYeOKITI6p2uGL4ZfXKaPpJmUGNIvntkg/D0jGajuQbTtoP2zsjPIxRhtZOXcz/sGKnTprskSjL1KQ7T9Cu8100af0IuKqIwnY0c/gXI0f5p0LcQfoQKIg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(366004)(39860400002)(346002)(376002)(396003)(451199015)(36756003)(8676002)(66946007)(5660300002)(66476007)(66556008)(41300700001)(44832011)(4326008)(83380400001)(26005)(6486002)(53546011)(6512007)(478600001)(186003)(8936002)(6506007)(54906003)(316002)(2616005)(110136005)(31696002)(2906002)(38100700002)(31686004)(86362001)(2004002)(81973001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB7436 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d7368883-9e03-4448-dfe1-08daf874992a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xhG6ZlHjrrhusktmy+aUK2OJNGEqx0LwV2imT/1fYAfU1VWm+zFlEOuCXdpDgIJi/Z0c+vUw/Yp59BQ6W8XAJFDGI2kKLAyl57WEwRPnfNJN86RqvePXkhByqWMBwqXX+PyWJLJSsFTyTC6XHKzzzXg7KsrdqTSHhuH1TgXWBie5kA5eRrei3INuO5utl9ypCvzdebc6OzOYro87uy2sE+6woL4zk0SFpjQrubI4r7hMIGrMb353952zVmHG3prrfwKUXyosfF/i2eM/4+j08Mp6qnolbsGtvG57SnupGQhoJjPDwRVcBYKGgGpQ2yPYcapecT2jgyqahkX72azOCegFa8bBBj1j0CSzs1BeJ8jde/Fx4axtWjbfPHha7FVgVd3vvK4xM1BBd+fkMcGZS9OwLotMz8xsKIlrIVuKpOBTynYYB2D0qrDFUE1WjfkLFxIoMvTpeFGM7y06BipLT4CdwU03iGtC5j978UxSMdUgXhRm+UlihJTzdQIXfg+MlQBQGmhnX3ohCDrRen9jLd0CAQrNNe9R33eNmtNHhWbxshcdwS1D7psXaZ/xaxtfZmk+C7FAaqznFJ5gntX1NURKoguEefXY93kGl73K7PIjOYbfGliAYjGYKBwgjzDyBGHd9hs4DC7WNTsTjyorCmlLalGNCxTBbSwNlh9L8xSDQTfXLBBtEXlryMU+I2/kvu5Vz+iM4Hkw0D6tBfiupZ9hTbaK6m1kvWa4k++YPLnWJDsenw2ckN5cHSGt9mqvH9m/xj0tqTPY1V2UxUxda57p9cuqmeDrt9N3RkTakPU= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(376002)(136003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(186003)(6512007)(478600001)(36756003)(40460700003)(86362001)(41300700001)(31696002)(336012)(316002)(110136005)(40480700001)(54906003)(2616005)(47076005)(70586007)(6486002)(70206006)(26005)(8676002)(4326008)(36860700001)(2906002)(81166007)(356005)(6506007)(53546011)(82740400003)(82310400005)(5660300002)(8936002)(31686004)(83380400001)(107886003)(44832011)(2004002)(81973001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2023 10:21:43.4349 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6194214e-4762-41b0-5ec9-08daf874a176 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8700 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY 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: Hi Vladimir, I gave the attach patch a try (had to rework it, as it doesn't apply cleanly), and it still runs into a build error. Should we revert this (did it make it to binutils 2.40?) and try to address it on-the-side as opposed to leaving the master branch in an unstable state? On 1/17/23 00:05, Vladimir Mezentsev wrote: > Hi Luis, > > On 1/16/23 06:10, Luis Machado wrote: >> Hi, >> >> I bisected a broken build on aarch64-linux Ubuntu 22.04 to this commit. >> >> It seems to cause a number of undefined references when building with --enable-targets=all. >> >> -- >> gprofng/src/../../../../repos/binutils-gdb/gprofng/src/Elf.cc:142: undefined reference to `bfd_init' >> >> /usr/bin/ld: ./.libs/libgprofng.a(Elf.o): in function `Elf::Elf(char*)': >> -- >> >> A master build of binutils-gdb should hopefully run into the problem. Passing --disable-gprofng seems to make the build complete OK. >> >> Could you please take a look at it? > > > > I don't have Ubuntu. > I cannot reproduce the problem on my configuration: > > % uname -a > Linux OL8.4-beta3 5.4.17-2102.200.13.el8uek.aarch64 #2 SMP Sun Mar 28 15:24:03 PDT 2021 aarch64 aarch64 aarch64 GNU/Linux > > % gcc --version > gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1.0.1) > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions.  There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > % libtool --version > libtool (GNU libtool) 2.4.6 > Written by Gordon Matzigkeit, 1996 > Copyright (C) 2014 Free Software Foundation, Inc. > This is free software; see the source for copying conditions.  There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > gprofng depends on libopcodes and as I see now gprofng directly depends on libbfd. > We use libtool to link gprofng only with libopcodes. > It looks like on my machines, libtool automatically links gprofng with libbfd because libopcodes depends on libbfd. > > I propose the fix below. > All builds on my machines are OK with and without this fix. > Could you check my fix on your machine ? Or should I push my path to the master branch now ? > > > Thank you, > -Vladimir > > > % cat 0001-gprofng-link-with-libbfd.patch > From 8b2b7967649a605935d6810aa58c97437cd46b6b Mon Sep 17 00:00:00 2001 > From: Vladimir Mezentsev > Date: Mon, 16 Jan 2023 15:51:44 -0800 > Subject: [PATCH] gprofng: link with libbfd > > gprofng/ChangeLog > 2023-01-16  Vladimir Mezentsev > >     PR gprofng/29987 >     * src/Makefile.am: Link with libbfd. >     * src/Makefile.in: Rebuild. > --- >  gprofng/src/Makefile.am | 1 + >  gprofng/src/Makefile.in | 4 +++- >  2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am > index 2278b9a39bb..b3423e121e3 100644 > --- a/gprofng/src/Makefile.am > +++ b/gprofng/src/Makefile.am > @@ -132,6 +132,7 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 >  # when -nostdlib is passed to libtool. >  # See bug 29364 - libgprofng.so: needs to link against -pthread >  libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ > +    $(top_builddir)/../bfd/libbfd.la \ >      -lpthread -ldl > >  dbedir = $(SYSCONFDIR) > diff --git a/gprofng/src/Makefile.in b/gprofng/src/Makefile.in > index 71dccf5f952..90455880ec7 100644 > --- a/gprofng/src/Makefile.in > +++ b/gprofng/src/Makefile.in > @@ -158,7 +158,8 @@ am__uninstall_files_from_dir = { \ >  am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \ >      "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)" >  LTLIBRARIES = $(pkglib_LTLIBRARIES) > -libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la > +libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \ > +    $(top_builddir)/../bfd/libbfd.la >  am__objects_1 = Application.lo BaseMetric.lo BaseMetricTreeNode.lo \ >      CallStack.lo CatchOutOfMemory.lo ClassFile.lo Command.lo \ >      CompCom.lo DataObject.lo DataSpace.lo Data_window.lo \ > @@ -554,6 +555,7 @@ libgprofng_la_LDFLAGS = -version-info 0:0:0 >  # when -nostdlib is passed to libtool. >  # See bug 29364 - libgprofng.so: needs to link against -pthread >  libgprofng_la_LIBADD = $(top_builddir)/../opcodes/libopcodes.la \ > +    $(top_builddir)/../bfd/libbfd.la \ >      -lpthread -ldl > >  dbedir = $(SYSCONFDIR)