* perf jvmti: unconditionally links against -lelf
@ 2017-04-12 9:58 ` Alexey Brodkin
0 siblings, 0 replies; 6+ messages in thread
From: Alexey Brodkin @ 2017-04-12 9:58 UTC (permalink / raw)
To: jolsa; +Cc: acme, a.p.zijlstra, linux-kernel, linux-snps-arc
Hi Jiri,
Just tried to cross-compile perf with pretty bare-minimal toolchain
which has no libelf installed for the target (for the record I used
SNPS ARC pre-built arc-2016.09 tools) like that:
--------------->8------------
make NO_LIBELF=1
--------------->8------------
And got the following build failure:
--------------->8------------
LINK libperf-jvmti.so
.../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
--------------->8------------
First I was surprised because I intentionally disabled usage of libelf
but after some grepping figured out jvmti is linked against libelf
regardless any settings, see:
--------------->8------------
$(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
endif
--------------->8------------
This comes from commit d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
I'm not really sure what could be the best solution to the problem I see.
If libelf is a real must for jvmti then probably we may force set NO_JVMTI=1
if NO_LIBELF=1 is passed on the command line.
At least the following builds perf for me without issues:
--------------->8------------
make NO_LIBELF=1 NO_JVMTI=1
--------------->8------------
Regards,
Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
* perf jvmti: unconditionally links against -lelf
@ 2017-04-12 9:58 ` Alexey Brodkin
0 siblings, 0 replies; 6+ messages in thread
From: Alexey Brodkin @ 2017-04-12 9:58 UTC (permalink / raw)
To: linux-snps-arc
Hi Jiri,
Just tried to cross-compile perf with pretty bare-minimal toolchain
which has no libelf installed for the target (for the record I used
SNPS ARC pre-built arc-2016.09 tools) like that:
--------------->8------------
make NO_LIBELF=1
--------------->8------------
And got the following build failure:
--------------->8------------
? LINK?????libperf-jvmti.so
.../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
--------------->8------------
First I was surprised because I intentionally disabled usage of libelf
but after some grepping figured out jvmti is linked against libelf
regardless any settings, see:
--------------->8------------
$(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
? ? ? ?$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
endif
--------------->8------------
This comes from commit?d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
I'm not really sure what could be the best solution to the problem I see.
If libelf is a real must for jvmti then probably we may force set?NO_JVMTI=1
if?NO_LIBELF=1 is passed on the command line.
At least the following builds perf for me without issues:
--------------->8------------
make NO_LIBELF=1 NO_JVMTI=1
--------------->8------------
Regards,
Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf jvmti: unconditionally links against -lelf
2017-04-12 9:58 ` Alexey Brodkin
@ 2017-04-12 10:19 ` Jiri Olsa
-1 siblings, 0 replies; 6+ messages in thread
From: Jiri Olsa @ 2017-04-12 10:19 UTC (permalink / raw)
To: Alexey Brodkin
Cc: jolsa, acme, a.p.zijlstra, linux-kernel, linux-snps-arc,
David Carrillo-Cisneros
On Wed, Apr 12, 2017 at 09:58:26AM +0000, Alexey Brodkin wrote:
> Hi Jiri,
>
> Just tried to cross-compile perf with pretty bare-minimal toolchain
> which has no libelf installed for the target (for the record I used
> SNPS ARC pre-built arc-2016.09 tools) like that:
> --------------->8------------
> make NO_LIBELF=1
> --------------->8------------
>
> And got the following build failure:
> --------------->8------------
> LINK libperf-jvmti.so
> .../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
> --------------->8------------
>
> First I was surprised because I intentionally disabled usage of libelf
> but after some grepping figured out jvmti is linked against libelf
> regardless any settings, see:
> --------------->8------------
> $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> $(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
> endif
> --------------->8------------
>
> This comes from commit d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
>
> I'm not really sure what could be the best solution to the problem I see.
> If libelf is a real must for jvmti then probably we may force set NO_JVMTI=1
> if NO_LIBELF=1 is passed on the command line.
>
> At least the following builds perf for me without issues:
> --------------->8------------
> make NO_LIBELF=1 NO_JVMTI=1
> --------------->8------------
hi,
incidently, David just posted patch for this ;-)
http://marc.info/?l=linux-kernel&m=149197980107421&w=2
should be merged soon
jirka
^ permalink raw reply [flat|nested] 6+ messages in thread
* perf jvmti: unconditionally links against -lelf
@ 2017-04-12 10:19 ` Jiri Olsa
0 siblings, 0 replies; 6+ messages in thread
From: Jiri Olsa @ 2017-04-12 10:19 UTC (permalink / raw)
To: linux-snps-arc
On Wed, Apr 12, 2017@09:58:26AM +0000, Alexey Brodkin wrote:
> Hi Jiri,
>
> Just tried to cross-compile perf with pretty bare-minimal toolchain
> which has no libelf installed for the target (for the record I used
> SNPS ARC pre-built arc-2016.09 tools) like that:
> --------------->8------------
> make NO_LIBELF=1
> --------------->8------------
>
> And got the following build failure:
> --------------->8------------
> ? LINK?????libperf-jvmti.so
> .../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
> --------------->8------------
>
> First I was surprised because I intentionally disabled usage of libelf
> but after some grepping figured out jvmti is linked against libelf
> regardless any settings, see:
> --------------->8------------
> $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> ? ? ? ?$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
> endif
> --------------->8------------
>
> This comes from commit?d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
>
> I'm not really sure what could be the best solution to the problem I see.
> If libelf is a real must for jvmti then probably we may force set?NO_JVMTI=1
> if?NO_LIBELF=1 is passed on the command line.
>
> At least the following builds perf for me without issues:
> --------------->8------------
> make NO_LIBELF=1 NO_JVMTI=1
> --------------->8------------
hi,
incidently, David just posted patch for this ;-)
http://marc.info/?l=linux-kernel&m=149197980107421&w=2
should be merged soon
jirka
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf jvmti: unconditionally links against -lelf
2017-04-12 10:19 ` Jiri Olsa
@ 2017-04-12 11:52 ` Alexey Brodkin
-1 siblings, 0 replies; 6+ messages in thread
From: Alexey Brodkin @ 2017-04-12 11:52 UTC (permalink / raw)
To: jolsa; +Cc: jolsa, acme, a.p.zijlstra, linux-kernel, linux-snps-arc, davidcc
Hi Jiri,
On Wed, 2017-04-12 at 12:19 +0200, Jiri Olsa wrote:
> On Wed, Apr 12, 2017 at 09:58:26AM +0000, Alexey Brodkin wrote:
> >
> > Hi Jiri,
> >
> > Just tried to cross-compile perf with pretty bare-minimal toolchain
> > which has no libelf installed for the target (for the record I used
> > SNPS ARC pre-built arc-2016.09 tools) like that:
> > --------------->8------------
> > make NO_LIBELF=1
> > --------------->8------------
> >
> > And got the following build failure:
> > --------------->8------------
> > LINK libperf-jvmti.so
> > .../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
> > --------------->8------------
> >
> > First I was surprised because I intentionally disabled usage of libelf
> > but after some grepping figured out jvmti is linked against libelf
> > regardless any settings, see:
> > --------------->8------------
> > $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> > $(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
> > endif
> > --------------->8------------
> >
> > This comes from commit d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
> >
> > I'm not really sure what could be the best solution to the problem I see.
> > If libelf is a real must for jvmti then probably we may force set NO_JVMTI=1
> > if NO_LIBELF=1 is passed on the command line.
> >
> > At least the following builds perf for me without issues:
> > --------------->8------------
> > make NO_LIBELF=1 NO_JVMTI=1
> > --------------->8------------
>
> hi,
> incidently, David just posted patch for this ;-)
So good to know somebody has already fixed my problem :)
Thanks for letting me know!
-Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
* perf jvmti: unconditionally links against -lelf
@ 2017-04-12 11:52 ` Alexey Brodkin
0 siblings, 0 replies; 6+ messages in thread
From: Alexey Brodkin @ 2017-04-12 11:52 UTC (permalink / raw)
To: linux-snps-arc
Hi Jiri,
On Wed, 2017-04-12@12:19 +0200, Jiri Olsa wrote:
> On Wed, Apr 12, 2017@09:58:26AM +0000, Alexey Brodkin wrote:
> >
> > Hi Jiri,
> >
> > Just tried to cross-compile perf with pretty bare-minimal toolchain
> > which has no libelf installed for the target (for the record I used
> > SNPS ARC pre-built arc-2016.09 tools) like that:
> > --------------->8------------
> > make NO_LIBELF=1
> > --------------->8------------
> >
> > And got the following build failure:
> > --------------->8------------
> > ? LINK?????libperf-jvmti.so
> > .../2016.09-uclibc-archs/bin/../lib/gcc/arc-snps-linux-uclibc/6.2.1/../../../../arc-snps-linux-uclibc/bin/ld: cannot find -lelf
> > --------------->8------------
> >
> > First I was surprised because I intentionally disabled usage of libelf
> > but after some grepping figured out jvmti is linked against libelf
> > regardless any settings, see:
> > --------------->8------------
> > $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> > ? ? ? ?$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
> > endif
> > --------------->8------------
> >
> > This comes from commit?d4dfdf00d43e ("perf jvmti: Plug compilation into perf build").
> >
> > I'm not really sure what could be the best solution to the problem I see.
> > If libelf is a real must for jvmti then probably we may force set?NO_JVMTI=1
> > if?NO_LIBELF=1 is passed on the command line.
> >
> > At least the following builds perf for me without issues:
> > --------------->8------------
> > make NO_LIBELF=1 NO_JVMTI=1
> > --------------->8------------
>
> hi,
> incidently, David just posted patch for this ;-)
So good to know somebody has already fixed my problem :)
Thanks for letting me know!
-Alexey
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-12 11:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-12 9:58 perf jvmti: unconditionally links against -lelf Alexey Brodkin
2017-04-12 9:58 ` Alexey Brodkin
2017-04-12 10:19 ` Jiri Olsa
2017-04-12 10:19 ` Jiri Olsa
2017-04-12 11:52 ` Alexey Brodkin
2017-04-12 11:52 ` Alexey Brodkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.