linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] perf tools: Fix bfd dependency libraries detection
Date: Mon, 28 Apr 2014 09:23:04 -0600	[thread overview]
Message-ID: <535E7258.4000408@gmail.com> (raw)
In-Reply-To: <20140428151740.GF18628@krava.brq.redhat.com>

On 4/28/14, 9:17 AM, Jiri Olsa wrote:
> On Mon, Apr 28, 2014 at 09:01:57AM -0600, David Ahern wrote:
>> On 4/28/14, 3:22 AM, Jiri Olsa wrote:
>>> From: Jiri Olsa <jolsa@redhat.com>
>>>
>>> There's false assumption in the library detection code
>>> assuming -liberty and -lz are always present once bfd
>>> is detected. The fails on Ubuntu (14.04) as reported
>>> by Ingo.
>>>
>>> Forcing the bdf dependency libraries detection any
>>> time bfd library is detected.
>>
>> Have you tried static builds? I need to do those occasionally and I
>> always have to muck around with the Makefiles to get it to succeed
>> -- something with the -liberty and bfd checks.
>
> hm, I just tried and even without of the fix I wasn't able
> to do static build.. so far I ended up with:
>
> ---
>    $ make LDFLAGS=-static NO_LIBUNWIND=1 NO_GTK2=1 JOBS=1
>    ...
>
>    SUBDIR   /home/jolsa/kernel.org/linux-perf/tools/lib/traceevent/
>    LINK     perf
> /bin/ld: cannot find -lelf
> /home/jolsa/kernel.org/linux-perf/tools/lib/traceevent/libtraceevent.a(event-plugin.o): In function `load_plugin':
> /home/jolsa/kernel.org/linux-perf/tools/lib/traceevent/event-plugin.c:60: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /bin/ld: cannot find -lelf
> /bin/ld: cannot find -ldw
> /bin/ld: cannot find -laudit
> /bin/ld: cannot find -lslang
> /bin/ld: cannot find -lperl
> libperf.a(target.o): In function `target__parse_uid':
> /home/jolsa/kernel.org/linux-perf/tools/perf/util/target.c:79: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /home/jolsa/kernel.org/linux-perf/tools/perf/util/target.c:91: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open':
> (.text+0x67eb): warning: the use of `mktemp' is dangerous, better use `mkstemp'
> /bin/ld: cannot find -lpython2.7
> /bin/ld: cannot find -lz
> /bin/ld: cannot find -lnuma
> collect2: error: ld returned 1 exit status
> make[1]: *** [perf] Error 1
> make: *** [all] Error 2
> ---
>
> Any hints what you did to make it pass?
> Let's fix it and put test for this in tests/make suite ;-)

# rpm -qa | grep static
glibc-static-2.14.90-24.fc16.9.x86_64
audit-libs-static-2.2.1-1.fc16.x86_64
elfutils-libelf-devel-static-0.154-2.fc16.x86_64
zlib-static-1.2.5-7.fc16.x86_64

# make O=/tmp/junk LDFLAGS=-static

David




  reply	other threads:[~2014-04-28 15:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  9:22 [PATCH] perf tools: Fix bfd dependency libraries detection Jiri Olsa
2014-04-28 15:01 ` David Ahern
2014-04-28 15:17   ` Jiri Olsa
2014-04-28 15:23     ` David Ahern [this message]
2014-04-29  8:12       ` Jiri Olsa
2014-04-29  6:44     ` Ingo Molnar
2014-05-01  6:32 ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=535E7258.4000408@gmail.com \
    --to=dsahern@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).