From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: buildroot@busybox.net
Subject: [Buildroot] elfutils and the perf userspace tool
Date: Tue, 04 Dec 2012 21:21:00 +0200 [thread overview]
Message-ID: <50BE4D1C.3020702@petroprogram.com> (raw)
In-Reply-To: <1354608794.90144.YahooMailNeo@web120304.mail.ne1.yahoo.com>
Hi Bogdan
4.12.2012 10:13, Bogdan Radulescu kirjoitti:
>
>
>
> ----- Original Message -----
> From: Bryan Hundven <bryanhundven@gmail.com>
> To: Bogdan Radulescu <bogdan_radulescu99@yahoo.com>
> Cc: "buildroot at busybox.net" <buildroot@busybox.net>
> Sent: Tuesday, December 4, 2012 5:33 AM
> Subject: Re: [Buildroot] elfutils and the perf userspace tool
>
> On Mon, Dec 3, 2012 at 2:20 PM, Bogdan Radulescu
> <bogdan_radulescu99@yahoo.com> wrote:
>>
>> Hello everybody,
>>
>> I am using buildroot for generating a distro for ARM. I am able to add additional packages to buildroot or to use arm-linux-gcc directly to compile simple C programs.
>>
>> Still I haven't yet understood how to cross compile the perf userspace tool and I think it would be a very nice addition to buildroot.
>>
>> The perf tool requires elfutils and the kernel sources it comes with.
>>
>> My first problem is that elfutils will not successfully compile, as you can see here:
>> http://pastie.org/pastes/5474687/text
>>
>> My elfutils.mk file looks like this http://pastie.org/pastes/5474697/text
>>
>> Please tell me how do I move further from this.
>>
>> Thanks,
>> Bogdan
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> I forgot to cc buildroot at ... eh.
>
> Original response:
>
> I think you need the argp-standalone, as I don't think uclibc provides libargp.
>
> -Bryan
>
>
>
> Hi Bryan,
>
> As you can see in the elfutils.mk file I already added argp-standalone as a dependency. It compiles OK.
> I am also linking against it, still something goes wrong at some point.
>
> Bogdan
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
It's not enough to give -largp in LDFLAGS.
elfutils doesn't give a damn about LDFLAGS and goes it own way.
What you need is to add -largp explicitly into a line that links libdw
You could try saving the following and also remember to add
ELFUTILS_AUTORECONF = YES
line to your elfutils.mk
diff -Naur elfutils-0.155.org/libdw/Makefile.am
elfutils-0.155/libdw/Makefile.am
--- elfutils-0.155.org/libdw/Makefile.am 2012-12-04
21:02:32.309083801 +0200
+++ elfutils-0.155/libdw/Makefile.am 2012-12-04 21:06:41.205098676 +0200
@@ -111,7 +111,7 @@
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
- -ldl $(zip_LIBS)
+ -ldl $(zip_LIBS) -largp
if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
ln -fs $@ $@.$(VERSION)
There might other places too where you have to add that -largp
You probably(if you are using uClibc) need to explicitly add also -lintl
to the same line with -largp.
At least that was what I had to do to make it compile even tought I had
gived configure script the option "--disable-nls".
Also you will need to probably (again if using uClibc) have fts.h with
your uClibc-installation
and sometime later you will probably hit into a obstack missing problem.
That can only be solved by including gnulib stuff into your source.
And there was some other (uClibc related) stuff that needed patching too
that I can't now
remember
All in all, elfutils belongs sadly to the software category:
"Im doing things my own way, Im using non-portable glibc stuff and
I don't give a crab about portability. Nah-nah-naaa"
:-(
It's hard but doeable. And the end result might be that only the libelf
part of elfutils will work
(I only needed that so it did not matter in my case) and not the programs.
Regards
Stefan
next prev parent reply other threads:[~2012-12-04 19:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 22:20 [Buildroot] elfutils and the perf userspace tool Bogdan Radulescu
2012-12-04 5:33 ` Bryan Hundven
2012-12-04 8:13 ` Bogdan Radulescu
2012-12-04 19:21 ` Stefan Fröberg [this message]
2012-12-04 19:42 ` Thomas Petazzoni
2012-12-04 22:23 ` Stefan Fröberg
2012-12-04 22:29 ` Stefan Fröberg
2012-12-04 22:34 ` Thomas Petazzoni
2012-12-04 22:51 ` Stefan Fröberg
2012-12-04 23:00 ` Stefan Fröberg
2012-12-05 15:07 ` Bogdan Radulescu
2012-12-05 15:31 ` Thomas Petazzoni
2012-12-06 16:10 ` Bogdan Radulescu
2012-12-06 16:11 ` Thomas Petazzoni
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=50BE4D1C.3020702@petroprogram.com \
--to=stefan.froberg@petroprogram.com \
--cc=buildroot@busybox.net \
/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