Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244617 > unrolled thread

Re: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling

Started byJiri Olsa <jolsa@redhat.com>
First post2015-10-12 13:50 +0200
Last post2015-10-13 14:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling Jiri Olsa <jolsa@redhat.com> - 2015-10-12 13:50 +0200
    Re: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling Rabin Vincent <rabin.vincent@axis.com> - 2015-10-13 13:00 +0200
      Re: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling Jiri Olsa <jolsa@redhat.com> - 2015-10-13 14:00 +0200

#1244617 — Re: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling

FromJiri Olsa <jolsa@redhat.com>
Date2015-10-12 13:50 +0200
SubjectRe: [PATCH 5/5] perf: add Makefile.deps for easier cross compiling
Message-ID<qiJM6-6go-1@gated-at.bofh.it>
On Sun, Sep 27, 2015 at 08:37:59PM +0200, Rabin Vincent wrote:
> It's easy to cross-compile a minimal perf binary without any external
> libraries (other than a C library of course) but if you want more of the
> juicy features it quickly becomes harder.  You need to either
> cross-compile a bunch of libraries manually and send in the correct
> paths or integrate the perf build into some external build system.
> 
> In order to make it easier for people to qucikly get up and running with
> a fairly full featured cross-compiled mainline perf, provide a
> Makefile.deps which will download and build the required libraries,
> which can then be used in a static build of perf:
> 
>  $ make ARCH=arm CROSS_COMPILE=arm-linux- -f Makefile.deps

Makefile.cross_compile or Makefile.cross might suit better

Could you provide more details help/doc on how to use it
and what it's actualy doing?

>  $ make ARCH=arm CROSS_COMPILE=arm-linux- LDFLAGS="-static"
> 
>   Auto-detecting system features:
>   ...                         dwarf: [ on  ]
>   ...                         glibc: [ on  ]
>   ...                          gtk2: [ OFF ]
>   ...                      libaudit: [ on  ]
>   ...                        libbfd: [ on  ]
>   ...                        libelf: [ on  ]
>   ...                       libnuma: [ OFF ]
>   ...                       libperl: [ OFF ]
>   ...                     libpython: [ OFF ]
>   ...                      libslang: [ on  ]
>   ...                     libunwind: [ on  ]
>   ...            libdw-dwarf-unwind: [ OFF ]
>   ...                          zlib: [ on  ]
>   ...                          lzma: [ on  ]
> 
> Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>

running the command from changelog failed on my setup,
please check attached log

jirka


---
[jolsa@krava perf]$ make ARCH=arm CROSS_COMPILE=arm-linux- -f Makefile.deps
mkdir -p dl && cd dl && wget -N https://people.redhat.com/sgrubb/audit/audit-2.4.4.tar.gz
--2015-10-12 13:36:45--  https://people.redhat.com/sgrubb/audit/audit-2.4.4.tar.gz
Resolving people.redhat.com (people.redhat.com)... 10.5.19.28
Connecting to people.redhat.com (people.redhat.com)|10.5.19.28|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1004024 (980K) [application/x-gzip]
Saving to: ‘audit-2.4.4.tar.gz’

audit-2.4.4.tar.gz                 100%[=================================================================>] 980.49K   298KB/s   in 3.3s   

2015-10-12 13:36:50 (298 KB/s) - ‘audit-2.4.4.tar.gz’ saved [1004024/1004024]

mkdir -p build-arm && tar xf dl/audit-2.4.4.tar.gz -C build-arm
touch build-arm/audit-2.4.4/.extract
cd build-arm/audit-2.4.4 && ./configure --host=arm-linux --prefix=/home/jolsa/kernel/linux-perf/tools/perf/deps-arm
Configuring auditd
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to print strings... printf
checking for style of include used by make... GNU
checking for arm-linux-gcc... arm-linux-gcc
checking whether the C compiler works... no
configure: error: in `/home/jolsa/kernel/linux-perf/tools/perf/build-arm/audit-2.4.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
Makefile.deps:77: recipe for target 'deps-arm/lib/.audit.install' failed
make: *** [deps-arm/lib/.audit.install] Error 77




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1245583

FromRabin Vincent <rabin.vincent@axis.com>
Date2015-10-13 13:00 +0200
Message-ID<qj5tg-4gD-17@gated-at.bofh.it>
In reply to#1244617
On Mon, Oct 12, 2015 at 01:42:29PM +0200, Jiri Olsa wrote:
> On Sun, Sep 27, 2015 at 08:37:59PM +0200, Rabin Vincent wrote:
> > In order to make it easier for people to qucikly get up and running with
> > a fairly full featured cross-compiled mainline perf, provide a
> > Makefile.deps which will download and build the required libraries,
> > which can then be used in a static build of perf:
> > 
> >  $ make ARCH=arm CROSS_COMPILE=arm-linux- -f Makefile.deps
> 
> Makefile.cross_compile or Makefile.cross might suit better

OK, I will change it to Makefile.cross.

> Could you provide more details help/doc on how to use it
> and what it's actualy doing?

I will add comments to the file with this information.

> running the command from changelog failed on my setup,
> please check attached log

Looks like you don't have a compiler with the name arm-linux-gcc in your
PATH?  The CROSS_COMPILE flag has the same meaning as in the perf and
kernel builds: it's the prefix for a cross-toolchain which is available
on the host.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1245633

FromJiri Olsa <jolsa@redhat.com>
Date2015-10-13 14:00 +0200
Message-ID<qj6pk-5Fz-21@gated-at.bofh.it>
In reply to#1245583
On Tue, Oct 13, 2015 at 12:50:29PM +0200, Rabin Vincent wrote:
> On Mon, Oct 12, 2015 at 01:42:29PM +0200, Jiri Olsa wrote:
> > On Sun, Sep 27, 2015 at 08:37:59PM +0200, Rabin Vincent wrote:
> > > In order to make it easier for people to qucikly get up and running with
> > > a fairly full featured cross-compiled mainline perf, provide a
> > > Makefile.deps which will download and build the required libraries,
> > > which can then be used in a static build of perf:
> > > 
> > >  $ make ARCH=arm CROSS_COMPILE=arm-linux- -f Makefile.deps
> > 
> > Makefile.cross_compile or Makefile.cross might suit better
> 
> OK, I will change it to Makefile.cross.
> 
> > Could you provide more details help/doc on how to use it
> > and what it's actualy doing?
> 
> I will add comments to the file with this information.
> 
> > running the command from changelog failed on my setup,
> > please check attached log
> 
> Looks like you don't have a compiler with the name arm-linux-gcc in your
> PATH?  The CROSS_COMPILE flag has the same meaning as in the perf and
> kernel builds: it's the prefix for a cross-toolchain which is available
> on the host.

could the doc have this description as well? to have
complete info on how to make it cross compile

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web