From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Cc: "linux-perf-use." <linux-perf-users@vger.kernel.org>
Subject: Re: perf build failure on Fedora 27 and linux kernel 4.15.0-rc2
Date: Thu, 7 Dec 2017 11:43:22 -0300 [thread overview]
Message-ID: <20171207144322.GA6458@kernel.org> (raw)
In-Reply-To: <a15a874d-429f-7d8b-1376-54fa0d01e2b8@linux.vnet.ibm.com>
Em Thu, Dec 07, 2017 at 02:27:42PM +0100, Thomas-Mich Richter escreveu:
> On 12/07/2017 02:03 PM, Thomas-Mich Richter wrote:
> > Maybe its me doing something wrong.
> > I just installed a KVM virtual machine on my x86 notebook (lenovo P50) with Fedora 27 workstation.
> > I then downloaded latest 4.15.0rc2 linux kernel and compiled and installed it.
> > This went fine, then I decided to build the perf tool and got this error:
> >
> >
> > GEN python/perf.so
> > /usr/bin/ld: perf-in.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
> > /usr/bin/ld: libperf.a(libperf-in.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
> > /usr/bin/ld: final link failed: Nonrepresentable section on output
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [Makefile.perf:507: perf] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [Makefile.perf:210: sub-make] Error 2
> > make: *** [Makefile:70: all] Error 2
> > [root@localhost-live perf]#
> >
> >
> > Any ideas? Is this just on a KVM guest? Thanks for any help.
> >
>
> To remedy above build issue, here is the fix:
>
> root@localhost-live perf]# git diff
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index ed65e82f034e..263611caaf7b 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -41,6 +41,7 @@ ifeq ($(SRCARCH),x86)
> LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
> endif
> NO_PERF_REGS := 0
> + CFLAGS += -fPIC
> endif
>
> ifeq ($(SRCARCH),arm)
> [root@localhost-live perf]#
This is what is in perf/core:
https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=c6707fdef7e2c1eb5458988b49c33497affdebbf
[acme@jouet linux]$ git log --oneline -1 c6707f
c6707fdef7e2 perf tools: Fix up build in hardnened environments
I'll put it into perf/urgent
- Arnaldo
prev parent reply other threads:[~2017-12-07 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 13:03 perf build failure on Fedora 27 and linux kernel 4.15.0-rc2 Thomas-Mich Richter
2017-12-07 13:27 ` Thomas-Mich Richter
2017-12-07 14:43 ` Arnaldo Carvalho de Melo [this message]
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=20171207144322.GA6458@kernel.org \
--to=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tmricht@linux.vnet.ibm.com \
/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 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.