mbox series

[0/2] ppsh compatible Qt5 configuration

Message ID 20190309141022.13140-1-anaumann@ultratronik.de
Headers show
Series ppsh compatible Qt5 configuration | expand

Message

Andreas Naumann March 9, 2019, 2:10 p.m. UTC
Hi Thomas,

you were asking for ideas on "Making the Qt5 packaging compatible with
per-package folder". Lately I had some time to look into it and came up
with the following patches. Basically they use a custom qt.conf to manipulate
qmakes builtin pathes. Details are in the commit-messages.

I did a compile test with almost all qt5 modules available, as well as other
buildroot provided qt5 applications. At the moment I dont have equipment for
runtime tests. As far as I could see the install procedure now works as
expected, no more failures.
Unfortunately webengine and webkit-example failed sometime during the build
but it seems that these were unrelated issues.

In pyqt5, where I did not integrate the qt.conf fixup because the path to 
qmake is just a configure option, the install pathes were correct  nonetheless.
Maybe their .pro files detect/set/fix them some other way. However, the pyqt5
configure step did not pickup most of the qt5-modules because they are not set
as a dependency. But this is another story.


regards,
Andreas



Andreas Naumann (2):
  qt5base: Fix inconsistencies when overriding qmake properties
  qt5: Prepare qmake for per-package infrastructure

 package/python-sip/python-sip.mk                |  3 ++-
 package/qt5/qt5.mk                              |  9 ++++++++-
 package/qt5/qt53d/qt53d.mk                      |  3 ++-
 package/qt5/qt5base/qt.conf.in                  | 17 +++--------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk          |  3 ++-
 package/qt5/qt5charts/qt5charts.mk              |  3 ++-
 package/qt5/qt5connectivity/qt5connectivity.mk  |  3 ++-
 package/qt5/qt5declarative/qt5declarative.mk    |  3 ++-
 package/qt5/qt5enginio/qt5enginio.mk            |  3 ++-
 .../qt5graphicaleffects/qt5graphicaleffects.mk  |  3 ++-
 package/qt5/qt5imageformats/qt5imageformats.mk  |  3 ++-
 package/qt5/qt5location/qt5location.mk          |  3 ++-
 package/qt5/qt5multimedia/qt5multimedia.mk      |  3 ++-
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk    |  3 ++-
 .../qt5/qt5quickcontrols2/qt5quickcontrols2.mk  |  3 ++-
 package/qt5/qt5script/qt5script.mk              |  3 ++-
 package/qt5/qt5scxml/qt5scxml.mk                |  3 ++-
 package/qt5/qt5sensors/qt5sensors.mk            |  3 ++-
 package/qt5/qt5serialbus/qt5serialbus.mk        |  3 ++-
 package/qt5/qt5serialport/qt5serialport.mk      |  3 ++-
 package/qt5/qt5svg/qt5svg.mk                    |  3 ++-
 package/qt5/qt5tools/qt5tools.mk                |  3 ++-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk    |  3 ++-
 package/qt5/qt5wayland/qt5wayland.mk            |  3 ++-
 package/qt5/qt5webchannel/qt5webchannel.mk      |  3 ++-
 package/qt5/qt5webengine/qt5webengine.mk        |  3 ++-
 .../qt5webkit-examples/qt5webkit-examples.mk    |  3 ++-
 package/qt5/qt5webkit/qt5webkit.mk              |  3 ++-
 package/qt5/qt5websockets/qt5websockets.mk      |  3 ++-
 package/qt5/qt5x11extras/qt5x11extras.mk        |  3 ++-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk    |  3 ++-
 package/qt5cinex/qt5cinex.mk                    |  3 ++-
 package/qwt/qwt.mk                              |  1 +
 33 files changed, 72 insertions(+), 45 deletions(-)

Comments

Thomas Petazzoni March 9, 2019, 2:22 p.m. UTC | #1
Hello Andreas,

On Sat,  9 Mar 2019 15:10:20 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> you were asking for ideas on "Making the Qt5 packaging compatible with
> per-package folder". Lately I had some time to look into it and came up
> with the following patches. Basically they use a custom qt.conf to manipulate
> qmakes builtin pathes. Details are in the commit-messages.
> 
> I did a compile test with almost all qt5 modules available, as well as other
> buildroot provided qt5 applications. At the moment I dont have equipment for
> runtime tests. As far as I could see the install procedure now works as
> expected, no more failures.
> Unfortunately webengine and webkit-example failed sometime during the build
> but it seems that these were unrelated issues.

Thanks a lot for looking into this!

However, there is one thing that this doesn't seem to address: the
installation part.

Currently, the staging installation is just:

	make install

with no DESTDIR/INSTALL_ROOT, and therefore for the target
installation, we have to manually install libraries, QML files and
other stuff, which is really annoying to maintain. Ideally, we would
like Qt5 to behave like most other packages, and do:

	make INSTALL_ROOT=$(STAGING_DIR) install

for the staging installation, and:

	make INSTALL_ROOT=$(TARGET_DIR) install

for the target installation. This change is not strictly needed for
per-package host/target directories, but I really would like to take
the opportunity of changing all this Qt5 logic to also address this
related problem.

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
but I don't remember if it was working completely or not.

Thanks,

Thomas
Arnout Vandecappelle March 10, 2019, 2:57 p.m. UTC | #2
On 09/03/2019 15:22, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Sat,  9 Mar 2019 15:10:20 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> you were asking for ideas on "Making the Qt5 packaging compatible with
>> per-package folder". Lately I had some time to look into it and came up
>> with the following patches. Basically they use a custom qt.conf to manipulate
>> qmakes builtin pathes. Details are in the commit-messages.
>>
>> I did a compile test with almost all qt5 modules available, as well as other
>> buildroot provided qt5 applications. At the moment I dont have equipment for
>> runtime tests. As far as I could see the install procedure now works as
>> expected, no more failures.
>> Unfortunately webengine and webkit-example failed sometime during the build
>> but it seems that these were unrelated issues.
> 
> Thanks a lot for looking into this!
> 
> However, there is one thing that this doesn't seem to address: the
> installation part.
> 
> Currently, the staging installation is just:
> 
> 	make install
> 
> with no DESTDIR/INSTALL_ROOT, and therefore for the target
> installation, we have to manually install libraries, QML files and
> other stuff, which is really annoying to maintain. Ideally, we would
> like Qt5 to behave like most other packages, and do:
> 
> 	make INSTALL_ROOT=$(STAGING_DIR) install
> 
> for the staging installation, and:
> 
> 	make INSTALL_ROOT=$(TARGET_DIR) install
> 
> for the target installation. This change is not strictly needed for
> per-package host/target directories, but I really would like to take
> the opportunity of changing all this Qt5 logic to also address this
> related problem.

 And maybe also take the opportunity to add qmake infra. That would make changes
like this patch a lot easier.

 Regards,
 Arnout


> 
> I had prepared something like this:
> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
> but I don't remember if it was working completely or not.
> 
> Thanks,
> 
> Thomas
>
Yann E. MORIN March 10, 2019, 4:06 p.m. UTC | #3
Thomas, All,

On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:
> On Sat,  9 Mar 2019 15:10:20 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
> > you were asking for ideas on "Making the Qt5 packaging compatible with
> > per-package folder". Lately I had some time to look into it and came up
> > with the following patches. Basically they use a custom qt.conf to manipulate
> > qmakes builtin pathes. Details are in the commit-messages.
> > 
> > I did a compile test with almost all qt5 modules available, as well as other
> > buildroot provided qt5 applications. At the moment I dont have equipment for
> > runtime tests. As far as I could see the install procedure now works as
> > expected, no more failures.
> > Unfortunately webengine and webkit-example failed sometime during the build
> > but it seems that these were unrelated issues.
> 
> Thanks a lot for looking into this!
> 
> However, there is one thing that this doesn't seem to address: the
> installation part.
> 
> Currently, the staging installation is just:
> 
> 	make install
> 
> with no DESTDIR/INSTALL_ROOT, and therefore for the target
> installation, we have to manually install libraries, QML files and
> other stuff, which is really annoying to maintain. Ideally, we would
> like Qt5 to behave like most other packages, and do:
> 
> 	make INSTALL_ROOT=$(STAGING_DIR) install
> 
> for the staging installation, and:
> 
> 	make INSTALL_ROOT=$(TARGET_DIR) install
> 
> for the target installation. This change is not strictly needed for
> per-package host/target directories, but I really would like to take
> the opportunity of changing all this Qt5 logic to also address this
> related problem.

I still believe a long-term goal would be to actually only ever install
everything in staging, and generate target right at the end as a copy
from staging as a starting point for all the cleaning we already do in
target-finalize.

This would have nicely worked-around this issue.

Regards,
Yann E. MORIN.

> I had prepared something like this:
> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
> but I don't remember if it was working completely or not.
> 
> Thanks,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Andreas Naumann March 11, 2019, 11:16 a.m. UTC | #4
Hi Thomas, Yann,...

Am 10.03.19 um 17:06 schrieb Yann E. MORIN:
> Thomas, All,
> 
> On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:
>> On Sat,  9 Mar 2019 15:10:20 +0100 Andreas Naumann
>> <anaumann@ultratronik.de> wrote:
>> 
>>> you were asking for ideas on "Making the Qt5 packaging compatible
>>> with per-package folder". Lately I had some time to look into it
>>> and came up with the following patches. Basically they use a
>>> custom qt.conf to manipulate qmakes builtin pathes. Details are
>>> in the commit-messages.
>>> 
>>> I did a compile test with almost all qt5 modules available, as
>>> well as other buildroot provided qt5 applications. At the moment
>>> I dont have equipment for runtime tests. As far as I could see
>>> the install procedure now works as expected, no more failures. 
>>> Unfortunately webengine and webkit-example failed sometime during
>>> the build but it seems that these were unrelated issues.
>> 
>> Thanks a lot for looking into this!
>> 
>> However, there is one thing that this doesn't seem to address: the 
>> installation part.
>> 
>> Currently, the staging installation is just:
>> 
>> make install
>> 
>> with no DESTDIR/INSTALL_ROOT, and therefore for the target 
>> installation, we have to manually install libraries, QML files and 
>> other stuff, which is really annoying to maintain. Ideally, we
>> would like Qt5 to behave like most other packages, and do:
>> 
>> make INSTALL_ROOT=$(STAGING_DIR) install
>> 
>> for the staging installation, and:
>> 
>> make INSTALL_ROOT=$(TARGET_DIR) install
>> 
>> for the target installation. This change is not strictly needed
>> for per-package host/target directories, but I really would like to
>> take the opportunity of changing all this Qt5 logic to also address
>> this related problem.

thank you for your feedback. I totally understand the issue and would of
course also like to reduce the maintenance burden.
Now, I have also fiddled with extprefix and found out, just like you,
that we can't really use INSTALL_ROOT without additional, more or less
hacky, fixups.

Looking for a simpler solution, I had one more idea with extprefix, that
is to set it to e.g. .../sysroot_qtonly/usr and install everthing there
as part of the build step. The staging-/target-install steps would then
just copy everything from the extprefix path to their respective
locations. This should avoid littering staging/target with host files.

Some local tests indicate that this could be implemented even without
explicitely setting extprefix but using the SysrootifyPrefix=false
setting in our custom qt.conf. That would allow to apply the solution
for the per-package use case (without reworking the Makefiles).
However...

> 
> I still believe a long-term goal would be to actually only ever
> install everything in staging, and generate target right at the end
> as a copy from staging as a starting point for all the cleaning we
> already do in target-finalize.

... the QT install step copies a lot of files  that we don't need in
target. Cleaning them and "forgetting" to maintain what to clean during
version bumps, could lead to useless stuff accumulating in target.
Personally I'm more fond of positive lists, because it creates a more
minimal-by-default policy. However, if it is decided to "shoot first and
ask questions later :-)" I'm happy to try a v2 in that way.


That is, for Qt5 only. Doing this in a generic way for all packages
sounds like a pretty demanding task.


Regards,
Andreas



> 
> This would have nicely worked-around this issue.> Regards, Yann E.
> MORIN.
> 
>> I had prepared something like this: 
>> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
>>
>> 
but I don't remember if it was working completely or not.
>> 
>> Thanks,
>> 
>> Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel
>> engineering https://bootlin.com 
>> _______________________________________________ buildroot mailing
>> list buildroot@busybox.net 
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
Andreas Naumann March 11, 2019, 11:17 a.m. UTC | #5
Hi Arnout,

Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
> 
> 
> 
>   And maybe also take the opportunity to add qmake infra. That would make changes
> like this patch a lot easier.
>

I'm not quite sure what this means. An extra qmake-package?

>   Regards,
>   Arnout
> 
> 
>>
>> I had prepared something like this:
>> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
>> but I don't remember if it was working completely or not.
>>
>> Thanks,
>>
>> Thomas
>>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Arnout Vandecappelle March 11, 2019, 1:06 p.m. UTC | #6
On 11/03/2019 12:17, Andreas Naumann wrote:
> Hi Arnout,
> 
> Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
>>
>>
>>
>>   And maybe also take the opportunity to add qmake infra. That would make changes
>> like this patch a lot easier.
>>
> 
> I'm not quite sure what this means. An extra qmake-package?

 We now have infra for several build systems: autotools, cmake, ...

 We don't have anything for qmake. Instead, qmake packages use the
generic-package instrastructure, with custom commands to call qmake and make.

 My proposal would be to add qmake-package as an infra, similar to e.g.
cmake-package.

 The qmake binary would still be provided by qt5base, and qt5base would
obviously not be a qmake-package.

 Regards,
 Arnout

> 
>>   Regards,
>>   Arnout
>>
>>
>>>
>>> I had prepared something like this:
>>> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
>>>
>>> but I don't remember if it was working completely or not.
>>>
>>> Thanks,
>>>
>>> Thomas
>>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
Andreas Naumann March 11, 2019, 1:45 p.m. UTC | #7
Am 11.03.19 um 14:06 schrieb Arnout Vandecappelle:
> 
> 
> On 11/03/2019 12:17, Andreas Naumann wrote:
>> Hi Arnout,
>>
>> Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
>>>
>>>
>>>
>>>    And maybe also take the opportunity to add qmake infra. That would make changes
>>> like this patch a lot easier.
>>>
>>
>> I'm not quite sure what this means. An extra qmake-package?
> 
>   We now have infra for several build systems: autotools, cmake, ...
> 
>   We don't have anything for qmake. Instead, qmake packages use the
> generic-package instrastructure, with custom commands to call qmake and make.
> 
>   My proposal would be to add qmake-package as an infra, similar to e.g.
> cmake-package.

aah, package/pkg-qmake.mk I see. I'll keep that in mind.

regards,
Andreas


> 
>   The qmake binary would still be provided by qt5base, and qt5base would
> obviously not be a qmake-package.
> 
>   Regards,
>   Arnout
> 
>>
>>>    Regards,
>>>    Arnout
>>>
>>>
>>>>
>>>> I had prepared something like this:
>>>> https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
>>>>
>>>> but I don't remember if it was working completely or not.
>>>>
>>>> Thanks,
>>>>
>>>> Thomas
>>>>
>>> _______________________________________________
>>> buildroot mailing list
>>> buildroot@busybox.net
>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>
>