diff mbox series

[4/4] scripts/check-bin-arch: fix failure with bpf

Message ID 20181103122758.10578-4-fontaine.fabrice@gmail.com
State Changes Requested
Headers show
Series [1/4] llvm: fix build of host-llvm | expand

Commit Message

Fabrice Fontaine Nov. 3, 2018, 12:27 p.m. UTC
Do not return an error if architecture is "Linux BPF" (in-kernel
bytecode machine)

Fixes:
 - http://autobuild.buildroot.org/results/c18fb7f1ac81496db9c3a4e91ea028a26ca600b0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 support/scripts/check-bin-arch | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Petazzoni Nov. 3, 2018, 1:20 p.m. UTC | #1
Hello,

On Sat,  3 Nov 2018 13:27:58 +0100, Fabrice Fontaine wrote:
> Do not return an error if architecture is "Linux BPF" (in-kernel
> bytecode machine)
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/c18fb7f1ac81496db9c3a4e91ea028a26ca600b0
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  support/scripts/check-bin-arch | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch
> index 7f97696735..a0de7a6ac4 100755
> --- a/support/scripts/check-bin-arch
> +++ b/support/scripts/check-bin-arch
> @@ -74,6 +74,11 @@ while read f; do
>  		continue
>  	fi
>  
> +	# If architecture is Linux BPF (in-kernel bytecode machine), continue
> +	if test "${arch}" = "Linux BPF" ; then
> +		continue
> +	fi

In the build failure
http://autobuild.buildroot.org/results/c18fb7f1ac81496db9c3a4e91ea028a26ca600b0/build-end.log
that you point, the architecture is reported as "None", not as "Linux
BPF". Am I misunderstanding something here ?

As a first step, could we explicitly disable building BPF protocols,
before we merge the necessary LLVM/V4L logic to build these properly ?

Thanks,

Thomas
Fabrice Fontaine Nov. 3, 2018, 1:53 p.m. UTC | #2
Dear Thomas,
Le sam. 3 nov. 2018 à 14:20, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> Hello,
>
> On Sat,  3 Nov 2018 13:27:58 +0100, Fabrice Fontaine wrote:
> > Do not return an error if architecture is "Linux BPF" (in-kernel
> > bytecode machine)
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/c18fb7f1ac81496db9c3a4e91ea028a26ca600b0
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  support/scripts/check-bin-arch | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch
> > index 7f97696735..a0de7a6ac4 100755
> > --- a/support/scripts/check-bin-arch
> > +++ b/support/scripts/check-bin-arch
> > @@ -74,6 +74,11 @@ while read f; do
> >               continue
> >       fi
> >
> > +     # If architecture is Linux BPF (in-kernel bytecode machine), continue
> > +     if test "${arch}" = "Linux BPF" ; then
> > +             continue
> > +     fi
>
> In the build failure
> http://autobuild.buildroot.org/results/c18fb7f1ac81496db9c3a4e91ea028a26ca600b0/build-end.log
> that you point, the architecture is reported as "None", not as "Linux
> BPF". Am I misunderstanding something here ?
I wasn't able to reproduce this "None" architecture issue.
But I think it was "None" because the llvm/clang found on Peter's
machine was very old (3.8):
clang -idirafter /usr/local/include -idirafter
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include -idirafter
/usr/include/x86_64-linux-gnu -idirafter /usr/include
-I../../../include -target bpf -O2 -c grundig.c

With my patch's serie, I'm building a host-clang in version 7.0 that
supports BPF and in this case the architecture is correctly set to
"Linux BPF".
I tested with a clang in version 6.0 installed from Ubuntu 18.04
repositories on my host machine and it was also "Linux BPF".
>
> As a first step, could we explicitly disable building BPF protocols,
> before we merge the necessary LLVM/V4L logic to build these properly ?
Ok, I will do that.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice
Thomas Petazzoni Nov. 3, 2018, 2 p.m. UTC | #3
Hello,

On Sat, 3 Nov 2018 14:53:48 +0100, Fabrice Fontaine wrote:

> I wasn't able to reproduce this "None" architecture issue.
> But I think it was "None" because the llvm/clang found on Peter's
> machine was very old (3.8):
> clang -idirafter /usr/local/include -idirafter
> /usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include -idirafter
> /usr/include/x86_64-linux-gnu -idirafter /usr/include
> -I../../../include -target bpf -O2 -c grundig.c
> 
> With my patch's serie, I'm building a host-clang in version 7.0 that
> supports BPF and in this case the architecture is correctly set to
> "Linux BPF".
> I tested with a clang in version 6.0 installed from Ubuntu 18.04
> repositories on my host machine and it was also "Linux BPF".

OK, but then you're not fixing the problem on Peter's machine: with
your patch series, if he doesn't enable BR2_PACKAGE_ELFUTILS, libv4l
configure script will still detect the system-wide clang/llvm
installed, which will produce those bogus "None" binaries.

Which is why there is a need to explicitly disable building the BPF
protocol support, except if we know that Buildroot is providing all the
necessary dependencies.

Thanks!

Thomas
diff mbox series

Patch

diff --git a/support/scripts/check-bin-arch b/support/scripts/check-bin-arch
index 7f97696735..a0de7a6ac4 100755
--- a/support/scripts/check-bin-arch
+++ b/support/scripts/check-bin-arch
@@ -74,6 +74,11 @@  while read f; do
 		continue
 	fi
 
+	# If architecture is Linux BPF (in-kernel bytecode machine), continue
+	if test "${arch}" = "Linux BPF" ; then
+		continue
+	fi
+
 	# Architecture is correct
 	if test "${arch}" = "${arch_name}" ; then
 		continue