Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3095898pxb; Sun, 26 Sep 2021 05:16:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmL71tnp01BAjJU5fG7AphZCKtxT28+zbIWETqGLNs3R95Dh0GJRYQnA5K9lckR4CKYZxI X-Received: by 2002:a17:906:311b:: with SMTP id 27mr21414976ejx.428.1632658614490; Sun, 26 Sep 2021 05:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632658614; cv=none; d=google.com; s=arc-20160816; b=NUYB66HpU2IAc54Hv3a2kZrMRdgQysB5bjQPZ5M8Ss6QYNGgRI6mh0b5zoEl4Q9TE7 4EwLpE2QGIXqdFNcx4YQa6VeOSFwbznIDLwyR4iLF29vddbeGxFk+9FxWtxmUVor8ZG1 1ebsremEDVjExoVkDqxXG9DoZBfWc/x5nRPARxhoQjTlk3YT8VqHHlm3WQsV0rmW214h M7BXjA2xiqFTDORSJxnXUW6G3hrfft8crH/uLgMAUA7BhEIhKfH43kGQu32bsqZM/XUw 9UGxnkpczB80TVFEPDXjdHRrzX+sOMQy4XdgV4E2g4f0mIVjj0thatBJilTMAnIi2HZY sJRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eZFQDo+oZu9UbOzDH3wpSTI+cv1z4x2iOHSke0cxsfw=; b=QBRgPRnW9BDiUJju1/DTdWuGii53f7+5crDpSNpF14iurBeo10fH/U/WwNLRuefzr9 g6yIW9ZjasmJwbYFTjJmFajaKSAxiVXzKAr+RwKr0YN+406UXJXvPPPxXoDCwkrWzI9X pkmUyikYneerO086xhCOQt0t3bnHdziR6aih3B6955gBLSABYMgHpZTf9MwU9im9uVXo lHAi08pyG7hJ9GRiDvkaTAvM+yFw79EFtKiBqt3zuYTYYQSINAfHZ+/UercSeryQfRXl zYQ6WbKAAezBs3sn9nYLMx7xxH7Y/giV7UBYKmt9Ne0x/MNta7VvB1A6BHgwHhBct/La mBpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q0Zbr2i4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v2si15117644ejk.531.2021.09.26.05.16.31; Sun, 26 Sep 2021 05:16:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q0Zbr2i4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbhIZMQ3 (ORCPT + 99 others); Sun, 26 Sep 2021 08:16:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:56982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhIZMQ3 (ORCPT ); Sun, 26 Sep 2021 08:16:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B5A6B60EE2; Sun, 26 Sep 2021 12:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632658492; bh=y3/satZFfSkTdvxsNt0Fd+Altve/CYaZU+BVGarbhdw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q0Zbr2i4nWM7cRRrDohTa4CCrPwFzYCh22uAJC6WSfGTumn6Sw2GobEbi17hA+hnf HlVvNPdEeXYfIbbg1s/68uCYK1Myj3PT9aJA8wTsbxzUjk6xYQRtDW9KcpzX12lcAB h0YcYWtXRO712AAK8TysTOQ7vmJ5jClkeKuscENUoMErR34oaTgK7JsH0PLGekcOJX UEAvLhsYv+l6err5L/O3jdg2D0MX+Ab2meXsTNT8Ojd9CQrOgSuiFtaGdQzvb9maxN j8YlAf/+/uRdsJM8tr8oAnIK7z3iL3PpT+gaqPWmVgxAaK18ufUHaEVnzrBd3KakWp tLM6bS7o28z1Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D0BB8410A1; Sun, 26 Sep 2021 09:14:49 -0300 (-03) Date: Sun, 26 Sep 2021 09:14:49 -0300 From: Arnaldo Carvalho de Melo To: Jinshan Xiong Cc: jolsa@redhat.com, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/lib/perf: make the static libperf complete Message-ID: References: <20210926023028.2338342-1-jinshan.xiong@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210926023028.2338342-1-jinshan.xiong@gmail.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, Sep 25, 2021 at 07:30:24PM -0700, Jinshan Xiong escreveu: > This patch makes libperf.a complete. Initially it misses the symbols > fdarray_* that makes it unusable: > $ nm tools/lib/perf/libperf.a | grep fdarray_ > U fdarray__add > 0000000000002b3e t fdarray__available_entries > U fdarray__exit > U fdarray__filter > U fdarray__grow > U fdarray__init > U fdarray__poll > > After this patch is applied: > $ nm tools/lib/perf/libperf.a | grep fdarray_ > 00000000000063f7 T fdarray__add > ...... > 00000000000065d4 T fdarray__poll Have you tried to build tools/perf/ with this? LINK /tmp/build/perf/plugins/plugin_futex.so LINK /tmp/build/perf/plugins/plugin_jbd2.so INSTALL trace_plugins /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o):/var/home/acme/git/perf/tools/lib/api/debug.c:20: multiple definition of `__pr_debug'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/debug.c:20: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `sysfs__read_bool': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:505: multiple definition of `sysfs__read_bool'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:505: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `fdarray__poll': /var/home/acme/git/perf/tools/lib/api/fd/array.c:120: multiple definition of `fdarray__poll'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fd/array.c:120: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `tracefs__configured': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:316: multiple definition of `tracefs__configured'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:316: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `sysfs__read_int': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:479: multiple definition of `sysfs__read_int'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:479: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `fdarray__fprintf': /var/home/acme/git/perf/tools/lib/api/fd/array.c:125: multiple definition of `fdarray__fprintf'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fd/array.c:125: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `sysfs__write_int': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:547: multiple definition of `sysfs__write_int'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:547: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `filename__read_str': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:378: multiple definition of `filename__read_str'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:378: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `hugetlbfs__mountpoint': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:317: multiple definition of `hugetlbfs__mountpoint'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:317: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `debugfs__mountpoint': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:315: multiple definition of `debugfs__mountpoint'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:315: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `fdarray__delete': /var/home/acme/git/perf/tools/lib/api/fd/array.c:71: multiple definition of `fdarray__delete'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fd/array.c:71: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `procfs__mountpoint': /var/home/acme/git/perf/tools/lib/api/fs/fs.c:314: multiple definition of `procfs__mountpoint'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/fs.c:314: first defined here /usr/bin/ld: /tmp/build/perf/libperf.a(libperf-ar.o): in function `get_tracing_file': /var/home/acme/git/perf/tools/lib/api/fs/tracing_path.c:74: multiple definition of `get_tracing_file'; /tmp/build/perf/libapi.a(libapi-in.o):/var/home/acme/git/perf/tools/lib/api/fs/tracing_path.c:74: first defined here You probably need to include libapi.a as well. - Arnaldo