Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4350836pxb; Mon, 27 Sep 2021 15:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyt/FA70Uco6Ef8KS3x9pp7LzzXLN+mcvxu0Xq8uWny+9x6W4TfeK6LaTYtMCr8xg8QHd+1 X-Received: by 2002:a17:906:8cd:: with SMTP id o13mr2737624eje.341.1632780897903; Mon, 27 Sep 2021 15:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632780897; cv=none; d=google.com; s=arc-20160816; b=GGEQZSzc1qv17Am8hRcdG/KtvFoPB/vkDU0m8Yh+b1/fVNt8NQ5GQVE3pBXrLx7R82 5vZikqYyV4TIbPvm3elYDZwaqenYDKoXtMWJwZv8N/0zzDdF/Az4haa1z1gzcaL6zSBx jxbTzV9/6Rg8awv6Nq1gwN1ZDQ45qqlze2I7+SMm8YZ8hzvaq71wda9h2GWChaxuz3fU UzPi/OcIb9tERlcMTTU9wkxIk8fLa01GuOCcM93boRcvN1R6h2I6K4t//Bt6El88kp0B W6tCrvGWdqDIV5MFFOdn2tLPCUZ1NpKdYUJQeuqunlHa67UKeOXHUnqBp68EQwFU1KSR O6dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LQoaNx5tAGjunmfJNoYC07QY3HqXDClsG7X/kjDcaHM=; b=CG/OFKri+QsafUqJaq4LJDmZOju1ph0WHUBPMv6vpB8ZgCSrsKs0MIM1jkCtgo9UfZ gwp/UjHmK/A+/PKActN9swgMMVYwkCg2VnZn2g1/8xl4ezFLGhcdK5NV+pJkanA0iwP6 Rl45lm5ZIwKLLHrxRv0A1eYWy7CdgPjfTY7pi+ktKVVYF68c3b8/a2KSqGn2FcUlfj7q tgtoXRPNE+Icnj4+6/fgDh+vGelwOONMQ8s4+C0WplP766OJ/CbyRBtCV6N59+b3Lfwu Ppg62aik/+6Iq9+PW3lS8kbMEqkMMSKLXEyu+oEnfboCUq6d/vbljh8X6AL4bAuF7oYZ B/GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qIydS8jN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf24si19340338edb.7.2021.09.27.15.14.33; Mon, 27 Sep 2021 15:14:57 -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=@gmail.com header.s=20210112 header.b=qIydS8jN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237511AbhI0WOt (ORCPT + 99 others); Mon, 27 Sep 2021 18:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237237AbhI0WOs (ORCPT ); Mon, 27 Sep 2021 18:14:48 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 366E1C061575; Mon, 27 Sep 2021 15:13:10 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id e7so19150321pgk.2; Mon, 27 Sep 2021 15:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LQoaNx5tAGjunmfJNoYC07QY3HqXDClsG7X/kjDcaHM=; b=qIydS8jNGOHH2PajdpXajC5LXHdZnQ8xaKAsu5QaLok9cHzAxluLivYrnOFLPxqKqE 0hozzn2PyUhobcE89p9IDM4ALB+FbA8PDIzdVaFl/MLcgShy1gd0BQsHdMLoWCftcDuc bv47yDQQN/vgxit8CP6OoqtdTJTI8C+SMjAa++U3PE8pnFQw4eQeccl6osT1TcYoOZCN 3fiBGdp3grow81cAp1Zzt/hq+QFsZdUB8SwJ/82a1kvIFJx4W0minOMc5N49NILTVn21 Lzz5aBD0OlupQurKdCrltAVxUBFlcFkCEwSUlhHV/ax6vEB7IgJ5opYdtusS+GwRG4Ot trSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LQoaNx5tAGjunmfJNoYC07QY3HqXDClsG7X/kjDcaHM=; b=ipuQm1kJzaauJUxvhdeoyBe6iG+hgnEQQAAbO/PYYwYFVFkq6oVb76g5r0urkx79to KxVeuf6Ow0hmVRHBreKSaZQOgD7sI15+fuTQiq/I477wglqGOBME3/v01X9JIXi45Da/ o1f/lWiifX88lew6QU7wDpBG54Lwsh1KZ5bngf/8dSQlBF2CwFH7LwvyyhjIacfpyJeb wI0ygp56dh+PfQsluM9lAp+ivJIt5sJqwOuKBvup+bMs9fXA37izDt62jYLhzd0Swu6e iwr9pxnXHMIC7Yd2XNsvvxqdWMsCNxa9o2Mn4SL5b7gMiG+faeSSnMK4qY77LIyYNtG+ PpRQ== X-Gm-Message-State: AOAM533GqeF6Ni8Ie1DtA3QbMKawgjJcB1OGIHeEffd2ChGfemzOPHOt OPHW4fvQ+y9bZUfFbnlnrcx7jhhLb7e7YS2MvDM= X-Received: by 2002:a62:407:0:b0:447:c104:2529 with SMTP id 7-20020a620407000000b00447c1042529mr2323985pfe.8.1632780789705; Mon, 27 Sep 2021 15:13:09 -0700 (PDT) MIME-Version: 1.0 References: <20210926023028.2338342-1-jinshan.xiong@gmail.com> In-Reply-To: From: Jinshan Xiong Date: Mon, 27 Sep 2021 15:12:33 -0700 Message-ID: Subject: Re: [PATCH] tools/lib/perf: make the static libperf complete To: Arnaldo Carvalho de Melo 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for pointing it out. I will make the static library a separate target for installation. Patch is coming soon. Jinshan On Sun, Sep 26, 2021 at 5:14 AM Arnaldo Carvalho de Melo wrote: > > 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