From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964829AbbHHP3S (ORCPT ); Sat, 8 Aug 2015 11:29:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53269 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964799AbbHHP3Q (ORCPT ); Sat, 8 Aug 2015 11:29:16 -0400 Date: Sat, 8 Aug 2015 17:29:13 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools: Support static linking with libdw Message-ID: <20150808152913.GH8624@krava.brq.redhat.com> References: <1438985928-14457-1-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438985928-14457-1-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 07, 2015 at 03:18:48PM -0700, Andi Kleen wrote: > From: Andi Kleen > > The Fedora 22 version of libdw requires a couple of extra libraries > to link. With a dynamic link the dependencies are pulled in automatically, > but this doesn't work for static linking. Add the needed libraries > explicitely to the feature probe and the Makefile. > > Signed-off-by: Andi Kleen > --- > tools/build/feature/Makefile | 2 +- > tools/perf/config/Makefile | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile > index 463ed8f..179fc1a 100644 > --- a/tools/build/feature/Makefile > +++ b/tools/build/feature/Makefile > @@ -70,7 +70,7 @@ test-glibc.bin: > $(BUILD) > > test-dwarf.bin: > - $(BUILD) -ldw > + $(BUILD) -ldw -lelf -lebl -lz -llzma -lbz2 > > test-libelf-mmap.bin: > $(BUILD) -lelf > diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile > index 094ddae..384e0a6 100644 > --- a/tools/perf/config/Makefile > +++ b/tools/perf/config/Makefile > @@ -297,7 +297,7 @@ ifndef NO_LIBELF > else > CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) > LDFLAGS += $(LIBDW_LDFLAGS) > - EXTLIBS += -ldw > + EXTLIBS += -ldw -lelf -lebl -lz -lbz2 -llzma > $(call detected,CONFIG_DWARF) > endif # PERF_HAVE_DWARF_REGS > endif # NO_DWARF > -- > 2.4.3 > please also update the warning, as now it's not obvious you need to install also bz2 libs (bzip2-devel on Fedora) for dwarf support.. we already have check for lzma thanks, jirka [jolsa@krava perf]$ make BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ OFF ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] config/Makefile:267: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev