public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: support static build
Date: Sun, 22 Nov 2009 14:11:45 +0200	[thread overview]
Message-ID: <20091122121144.GA21562@redhat.com> (raw)
In-Reply-To: <20091122120243.GA6217@elte.hu>

On Sun, Nov 22, 2009 at 01:02:43PM +0100, Ingo Molnar wrote:
> 
> * Michael S. Tsirkin <mst@redhat.com> wrote:
> 
> > Seems to work fine here on a 32 bit Fedora,
> > provided that I supply NO_64BIT (my kernel
> > is 64 bit with 32 bit userspace).
> > 
> > So this worked for me:
> > [perf]$ $make -s -j LDFLAGS=-static NO_64BIT=yes 
> > Makefile:498: No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231
> > PERF_VERSION = 0.0.2.PERF
> > Makefile:498: No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231
> >     * new build flags or prefix
> > /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../libpthread.a(libpthread.o): In function `sem_open':
> > (.text+0x69ea): warning: the use of `mktemp' is dangerous, better use `mkstemp'
> > [perf]$ ldd perf
> >         not a dynamic executable
> >
> > Ingo, could you please apply my debugging patch and then run with V=2?
> 
> Still doesnt work here (on a 32-bit/32-bit system, F11) - i've applied 
> your debug patch and added V=2:
> 
>  earth4:~/tip/tools/perf> make -s -j LDFLAGS=-static NO_64BIT=yes V=2
>  /usr/bin/ld: cannot find -lpthread
>  collect2: ld returned 1 exit status
>  Makefile:493: *** No libelf.h/libelf found, please install 
>  libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.

Aha, you need to install glibc-static in fedora.
That will provide libpthread.a. Maybe add a comment
about that?

You also need zlib-static if you want libbfd to work.

Fedora does not package a static version of libdwarf,
so users will need to build that from source if they want
dwarf support in a static binary.
Fedora guidelines say:
	In general, packagers are strongly encouraged not to ship static libs
	unless a compelling reason exists. 
Do you think the ability to create a portable perf binary that
I can copy around linux systems qualify as a compelling reason?

> > Btw, why is it a good idea to force 64/32 bit mode?
> > Why not use the default gcc mode?
> 
> Sure, we could do that - mind sending a patch for that?
> 
> 	Ingo

In a minute.


  reply	other threads:[~2009-11-22 12:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 15:20 [PATCH] perf tools: support static build Michael S. Tsirkin
2009-11-04 11:06 ` Ingo Molnar
2009-11-17  9:23   ` Ingo Molnar
2009-11-22 11:27     ` Michael S. Tsirkin
2009-11-22 11:39       ` Michael S. Tsirkin
2009-11-22 12:02         ` Ingo Molnar
2009-11-22 12:11           ` Michael S. Tsirkin [this message]
2009-11-22 13:02             ` Ingo Molnar
2009-11-22 22:40         ` Paul Mackerras
2009-11-23  8:45           ` Ingo Molnar
2009-11-22 12:06       ` [tip:perf/core] perf tools: Add V=2 option to help debug config issues tip-bot for Michael S. Tsirkin
2009-11-17  9:24 ` [tip:perf/core] perf tools: Support static build tip-bot for Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2009-10-28  7:04 [PATCH] perf tools: support " Michael S. Tsirkin
2009-10-29  8:06 ` Ingo Molnar

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=20091122121144.GA21562@redhat.com \
    --to=mst@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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