diff mbox series

[1/1] package/pixman: fix powerpc64le build

Message ID 20220708142150.234611-1-bernd.kuhls@t-online.de
State Handled Elsewhere
Headers show
Series [1/1] package/pixman: fix powerpc64le build | expand

Commit Message

Bernd Kuhls July 8, 2022, 2:21 p.m. UTC
Disable vmx support to fix build error:

pixman-vmx.c:268:5: note: in expansion of macro 'LOAD_VECTOR'
  268 |     LOAD_VECTOR (src);
      |     ^~~~~~~~~~~
pixman-vmx.c:268:5: error: cannot convert a value of type 'int' to
 vector type '__vector(4) unsigned int' which has different size

Fixes:
http://autobuild.buildroot.net/results/fda886768fce25ccd9b52b635ff5b13da7ba2d0c/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/pixman/pixman.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni July 18, 2022, 12:14 p.m. UTC | #1
Hello,

Let's add some PowerPC folks into the loop. Joel, Cédric, could you
have a look at the below patch, and how to handle VMX support in the
pixman package?

It feels a bit unfortunate to unconditionally disable VMX support:
there is some logic in the pixman configure script to detect the
availability of VMX, but apparently this logic assumes it works on
powerpc64le, even though at build time it breaks.

Could you have a look and give us your advice?

Thanks a lot!

Thomas Petazzoni

On Fri,  8 Jul 2022 16:21:50 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:

> Disable vmx support to fix build error:
> 
> pixman-vmx.c:268:5: note: in expansion of macro 'LOAD_VECTOR'
>   268 |     LOAD_VECTOR (src);
>       |     ^~~~~~~~~~~
> pixman-vmx.c:268:5: error: cannot convert a value of type 'int' to
>  vector type '__vector(4) unsigned int' which has different size
> 
> Fixes:
> http://autobuild.buildroot.net/results/fda886768fce25ccd9b52b635ff5b13da7ba2d0c/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/pixman/pixman.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk
> index 64302fa49a..0f00a20cd8 100644
> --- a/package/pixman/pixman.mk
> +++ b/package/pixman/pixman.mk
> @@ -21,7 +21,8 @@ PIXMAN_AUTORECONF = YES
>  # don't build gtk based demos
>  PIXMAN_CONF_OPTS = \
>  	--disable-gtk \
> -	--disable-loongson-mmi
> +	--disable-loongson-mmi \
> +	--disable-vmx
>  
>  # The ARM SIMD code from pixman requires a recent enough ARM core, but
>  # there is a runtime CPU check that makes sure it doesn't get used if
Joel Stanley July 19, 2022, 7:46 a.m. UTC | #2
On Mon, 18 Jul 2022 at 12:14, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> Let's add some PowerPC folks into the loop. Joel, Cédric, could you
> have a look at the below patch, and how to handle VMX support in the
> pixman package?
>
> It feels a bit unfortunate to unconditionally disable VMX support:
> there is some logic in the pixman configure script to detect the
> availability of VMX, but apparently this logic assumes it works on
> powerpc64le, even though at build time it breaks.

Thanks!

There's a few build failures going around due to nonsense
configurations. In most cases the config has BR2_powerpc64le=y without
selecting a CPU. This defaults us to BR2_powerpc_970=y, which is a CPU
that isn't supported to run ppc64le.

The fix is to only allow CPUs that support ppc64le to be configured
for that platform. I've prepared some patches that I'm running though
CI now, and I'll send them out once they're tested.

If my changes don't fix this pixman issue then we can use the
BR2_POWERPC_CPU_HAS_ALTIVEC to force AltiVec/VMX off when we know the
CPU does not support it.

Cheers,

Joel





>
> Could you have a look and give us your advice?
>
> Thanks a lot!
>
> Thomas Petazzoni
>
> On Fri,  8 Jul 2022 16:21:50 +0200
> Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
>
> > Disable vmx support to fix build error:
> >
> > pixman-vmx.c:268:5: note: in expansion of macro 'LOAD_VECTOR'
> >   268 |     LOAD_VECTOR (src);
> >       |     ^~~~~~~~~~~
> > pixman-vmx.c:268:5: error: cannot convert a value of type 'int' to
> >  vector type '__vector(4) unsigned int' which has different size
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/fda886768fce25ccd9b52b635ff5b13da7ba2d0c/
> >
> > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> > ---
> >  package/pixman/pixman.mk | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk
> > index 64302fa49a..0f00a20cd8 100644
> > --- a/package/pixman/pixman.mk
> > +++ b/package/pixman/pixman.mk
> > @@ -21,7 +21,8 @@ PIXMAN_AUTORECONF = YES
> >  # don't build gtk based demos
> >  PIXMAN_CONF_OPTS = \
> >       --disable-gtk \
> > -     --disable-loongson-mmi
> > +     --disable-loongson-mmi \
> > +     --disable-vmx
> >
> >  # The ARM SIMD code from pixman requires a recent enough ARM core, but
> >  # there is a runtime CPU check that makes sure it doesn't get used if
>
>
>
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
Thomas Petazzoni July 19, 2022, 8:27 a.m. UTC | #3
Hello Joel,

On Tue, 19 Jul 2022 07:46:03 +0000
Joel Stanley <joel@jms.id.au> wrote:

> There's a few build failures going around due to nonsense
> configurations. In most cases the config has BR2_powerpc64le=y without
> selecting a CPU.

"Not selecting a CPU" is not possible. There is always a CPU within the:

choice
        prompt "Target Architecture Variant"
        default BR2_generic_powerpc
        help
          Specific CPU variant to use

...
endchoice

that will be selected. However...

> This defaults us to BR2_powerpc_970=y, which is a CPU
> that isn't supported to run ppc64le.

... it seems like some of them are selectable on ppc64le, even though
they do not make sense.

> The fix is to only allow CPUs that support ppc64le to be configured
> for that platform. I've prepared some patches that I'm running though
> CI now, and I'll send them out once they're tested.

Excellent! Looking forward to it!

> If my changes don't fix this pixman issue then we can use the
> BR2_POWERPC_CPU_HAS_ALTIVEC to force AltiVec/VMX off when we know the
> CPU does not support it.

But there's still a weird thing going on: pixman has a configure.ac
check that compiles a small test program to verify if VMX support is
available... and it concludes it is, but the actual pixman code then
fails to build.

Thanks for your feedback!

Thomas
Thomas Petazzoni July 26, 2022, 8:19 p.m. UTC | #4
Hello Joel,

Do you have some updates on this pixman issue?

Thanks a lot!

Thomas Petazzoni

On Tue, 19 Jul 2022 10:27:24 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> Hello Joel,
> 
> On Tue, 19 Jul 2022 07:46:03 +0000
> Joel Stanley <joel@jms.id.au> wrote:
> 
> > There's a few build failures going around due to nonsense
> > configurations. In most cases the config has BR2_powerpc64le=y without
> > selecting a CPU.  
> 
> "Not selecting a CPU" is not possible. There is always a CPU within the:
> 
> choice
>         prompt "Target Architecture Variant"
>         default BR2_generic_powerpc
>         help
>           Specific CPU variant to use
> 
> ...
> endchoice
> 
> that will be selected. However...
> 
> > This defaults us to BR2_powerpc_970=y, which is a CPU
> > that isn't supported to run ppc64le.  
> 
> ... it seems like some of them are selectable on ppc64le, even though
> they do not make sense.
> 
> > The fix is to only allow CPUs that support ppc64le to be configured
> > for that platform. I've prepared some patches that I'm running though
> > CI now, and I'll send them out once they're tested.  
> 
> Excellent! Looking forward to it!
> 
> > If my changes don't fix this pixman issue then we can use the
> > BR2_POWERPC_CPU_HAS_ALTIVEC to force AltiVec/VMX off when we know the
> > CPU does not support it.  
> 
> But there's still a weird thing going on: pixman has a configure.ac
> check that compiles a small test program to verify if VMX support is
> available... and it concludes it is, but the actual pixman code then
> fails to build.
> 
> Thanks for your feedback!
> 
> Thomas
diff mbox series

Patch

diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk
index 64302fa49a..0f00a20cd8 100644
--- a/package/pixman/pixman.mk
+++ b/package/pixman/pixman.mk
@@ -21,7 +21,8 @@  PIXMAN_AUTORECONF = YES
 # don't build gtk based demos
 PIXMAN_CONF_OPTS = \
 	--disable-gtk \
-	--disable-loongson-mmi
+	--disable-loongson-mmi \
+	--disable-vmx
 
 # The ARM SIMD code from pixman requires a recent enough ARM core, but
 # there is a runtime CPU check that makes sure it doesn't get used if