diff mbox

Build failure with Vivante and QT5 w/ eglfs

Message ID CAAMH-yu=iTaYySHSDDzK1kGeQR5WJNYNLdZ3E_OYagLv48o9YQ@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Gary Bisson March 4, 2016, 1:10 p.m. UTC
Thomas, All,

On Fri, Mar 4, 2016 at 12:13 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Gary,
>
> On Fri, 4 Mar 2016 12:02:31 +0100, Gary Bisson wrote:
>
>> > I understand this configuration can't work, but as this leads to a
>> > build issue we might need to think about a solution. We could disallow
>> > such a configuration tuple, or fix the build.
>> >
>> > Any idea?
>>
>> I'm afraid forcing the imx-gpu-viv package output format depending on
>> qt5 graphical back end would bring many "recursive dependency" issues.
>
> I don't see why it would create recursive dependency issues.

Well my thought process was that it was kind of forbidden to modify
the qtbase package for a i.MX-specific corner case.

So I tried to force it in imx-gpu-viv to use fb depending on
BR2_PACKAGE_QT5BASE_EGLFS but it only brought those recursive issues.

> However, it would violate the principle of virtual packages, since Qt5
> is not supposed to have some dependencies that are specific to certain
> OpenGL implementations. It should normally just use dependencies on the
> OpenGL ES / EGL packages, and nothing else.
>
> However, we could probably add some exceptions to this rule. Or rework
> the virtual package logic so that consumers of OpenGL can now whether
> the FB or X11 support is available.

Well if we are allowed to modify qtbase I guess it would be way
easier. Would something like this be acceptable?
index 64a7f65..aa54b3e 100644

Regards,
Gary

Comments

Thomas Petazzoni March 4, 2016, 1:19 p.m. UTC | #1
Hello,

On Fri, 4 Mar 2016 14:10:58 +0100, Gary Bisson wrote:

> Well my thought process was that it was kind of forbidden to modify
> the qtbase package for a i.MX-specific corner case.
> 
> So I tried to force it in imx-gpu-viv to use fb depending on
> BR2_PACKAGE_QT5BASE_EGLFS but it only brought those recursive issues.

You indeed can't do this, as it creates a circular dependency.

> Well if we are allowed to modify qtbase I guess it would be way
> easier. Would something like this be acceptable?
> index 64a7f65..aa54b3e 100644
> --- a/package/qt5/qt5base/Config.in
> +++ b/package/qt5/qt5base/Config.in
> @@ -201,10 +201,14 @@ config BR2_PACKAGE_QT5BASE_EGLFS
>         select BR2_PACKAGE_QT5BASE_OPENGL
>         depends on BR2_PACKAGE_HAS_LIBEGL
>         depends on BR2_PACKAGE_QT5_GL_AVAILABLE
> +       depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
> 
>  comment "eglfs backend available if OpenGL and EGL are enabled"
>         depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT5_GL_AVAILABLE
> 
> +comment "eglfs backend not available for X11 version of i.MX 3D libraries"
> +       depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
> +

No this is not good, because there are other OpenGL implementations
than imx-gpu-viv. So at the very least, you would need something like
the below. I also believe it makes more sense to use positive
condition, i.e express a dependency on the FB output, rather than a
dependency on not having the X11 output.

	# If the imx-gpu-viv implementation is used, we need its FB variant
	depends on !BR2_PACKAGE_IMX_GPU_VIV || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB

comment "eglfs backend needs the FB output of i.MX GPU libraries"
	depends on BR2_PACKAGE_IMX_GPU_VIV && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB

Best regards,

Thomas
Gary Bisson March 4, 2016, 1:35 p.m. UTC | #2
Thomas, All,

On Fri, Mar 4, 2016 at 2:19 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 4 Mar 2016 14:10:58 +0100, Gary Bisson wrote:
>
>> Well my thought process was that it was kind of forbidden to modify
>> the qtbase package for a i.MX-specific corner case.
>>
>> So I tried to force it in imx-gpu-viv to use fb depending on
>> BR2_PACKAGE_QT5BASE_EGLFS but it only brought those recursive issues.
>
> You indeed can't do this, as it creates a circular dependency.
>
>> Well if we are allowed to modify qtbase I guess it would be way
>> easier. Would something like this be acceptable?
>> index 64a7f65..aa54b3e 100644
>> --- a/package/qt5/qt5base/Config.in
>> +++ b/package/qt5/qt5base/Config.in
>> @@ -201,10 +201,14 @@ config BR2_PACKAGE_QT5BASE_EGLFS
>>         select BR2_PACKAGE_QT5BASE_OPENGL
>>         depends on BR2_PACKAGE_HAS_LIBEGL
>>         depends on BR2_PACKAGE_QT5_GL_AVAILABLE
>> +       depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
>>
>>  comment "eglfs backend available if OpenGL and EGL are enabled"
>>         depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT5_GL_AVAILABLE
>>
>> +comment "eglfs backend not available for X11 version of i.MX 3D libraries"
>> +       depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
>> +
>
> No this is not good, because there are other OpenGL implementations
> than imx-gpu-viv. So at the very least, you would need something like
> the below. I also believe it makes more sense to use positive
> condition, i.e express a dependency on the FB output, rather than a
> dependency on not having the X11 output.
>
>         # If the imx-gpu-viv implementation is used, we need its FB variant
>         depends on !BR2_PACKAGE_IMX_GPU_VIV || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
>
> comment "eglfs backend needs the FB output of i.MX GPU libraries"
>         depends on BR2_PACKAGE_IMX_GPU_VIV && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB

I agree using the positive condition is better. However I'm not sure
to understand why !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 wouldn't work
with other OpenGL implementations. This variable is only set when
selecting the vivante package + x11 output. So for any other
implementation it wouldn't be set. It's just out of curiosity that I'd
like to understand the difference.

Regards,
Gary
Thomas Petazzoni March 4, 2016, 1:43 p.m. UTC | #3
Gary,

On Fri, 4 Mar 2016 14:35:55 +0100, Gary Bisson wrote:

> >> Well if we are allowed to modify qtbase I guess it would be way
> >> easier. Would something like this be acceptable?
> >> index 64a7f65..aa54b3e 100644
> >> --- a/package/qt5/qt5base/Config.in
> >> +++ b/package/qt5/qt5base/Config.in
> >> @@ -201,10 +201,14 @@ config BR2_PACKAGE_QT5BASE_EGLFS
> >>         select BR2_PACKAGE_QT5BASE_OPENGL
> >>         depends on BR2_PACKAGE_HAS_LIBEGL
> >>         depends on BR2_PACKAGE_QT5_GL_AVAILABLE
> >> +       depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
> >>
> >>  comment "eglfs backend available if OpenGL and EGL are enabled"
> >>         depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT5_GL_AVAILABLE
> >>
> >> +comment "eglfs backend not available for X11 version of i.MX 3D libraries"
> >> +       depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
> >> +
> >
> > No this is not good, because there are other OpenGL implementations
> > than imx-gpu-viv. So at the very least, you would need something like
> > the below. I also believe it makes more sense to use positive
> > condition, i.e express a dependency on the FB output, rather than a
> > dependency on not having the X11 output.
> >
> >         # If the imx-gpu-viv implementation is used, we need its FB variant
> >         depends on !BR2_PACKAGE_IMX_GPU_VIV || BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
> >
> > comment "eglfs backend needs the FB output of i.MX GPU libraries"
> >         depends on BR2_PACKAGE_IMX_GPU_VIV && !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB
> 
> I agree using the positive condition is better. However I'm not sure
> to understand why !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 wouldn't work
> with other OpenGL implementations. This variable is only set when
> selecting the vivante package + x11 output. So for any other
> implementation it wouldn't be set. It's just out of curiosity that I'd
> like to understand the difference.

Aah, yes, you're right. Your version is functionally equivalent to mine.

Thomas
diff mbox

Patch

--- a/package/qt5/qt5base/Config.in
+++ b/package/qt5/qt5base/Config.in
@@ -201,10 +201,14 @@  config BR2_PACKAGE_QT5BASE_EGLFS
        select BR2_PACKAGE_QT5BASE_OPENGL
        depends on BR2_PACKAGE_HAS_LIBEGL
        depends on BR2_PACKAGE_QT5_GL_AVAILABLE
+       depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11

 comment "eglfs backend available if OpenGL and EGL are enabled"
        depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT5_GL_AVAILABLE

+comment "eglfs backend not available for X11 version of i.MX 3D libraries"
+       depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11
+
 config BR2_PACKAGE_QT5BASE_DEFAULT_QPA
        string "Default graphical platform"
        help