Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Ben Hutchings via buildroot <buildroot@buildroot.org>
Cc: Jesse Van Gavere <jesseevg@gmail.com>,
	Ben Hutchings <ben.hutchings@mind.be>,
	Roy Kollen Svendsen <roykollensvendsen@gmail.com>,
	Angelo Compagnucci <angelo@amarulasolutions.com>
Subject: Re: [Buildroot] [PATCH] package/qt6/qt6base: Make qmake work
Date: Sat, 14 Sep 2024 18:16:13 +0200	[thread overview]
Message-ID: <20240914181613.4730aff3@windsurf> (raw)
In-Reply-To: <20240411145559.1183064-1-ben.hutchings@mind.be>

Hello Ben,

Adding in Cc: Angelo and Jesse who already tried to fix this in the
past, and also adding Roy who is looking after Qt6 packaging.

Some comments/questions below.

On Thu, 11 Apr 2024 16:55:58 +0200
Ben Hutchings via buildroot <buildroot@buildroot.org> wrote:

> Currently the qt6base package does not install a working qmake
> program, so applications can only be built with CMake.
> 
> To ease upgrades from Qt 5, make qmake work as well:
> 
> - Create a linux-buildroot-g++ device spec, like we do for Qt 5.
> 
> - Fix the generated target_qt.conf file.  The Qt build system
>   currently generates this with the sysroot directory wrongly added in
>   various places.
> 
> - Fix the qmake wrapper script in the sysroot to set the QMAKEPATH
>   environment variable.
> 
> Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>

This generally looks good, but I have two concerns.

The first one: there is nothing in Buildroot that exercises this. I
would like to have either a real package that uses this qmake support,
or a dummy package as a test case in support/testing/.

> +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
> +define QT6BASE_MKSPEC_ARCH_CONFIG
> +# Qt 6 needs atomics, which on various architectures are in -latomic
> +	printf '!host_build { \n LIBS += -latomic\n }' > \
> +		$(STAGING_DIR)/usr/mkspecs/devices/linux-buildroot-g++/arch.conf
> +endef
> +endif
> +
> +define QT6BASE_INSTALL_MKSPEC
> +	mkdir -p $(STAGING_DIR)/usr/mkspecs/devices/linux-buildroot-g++
> +	$(INSTALL) -m 0644 $(QT6BASE_PKGDIR)/qplatformdefs.h \
> +		$(STAGING_DIR)/usr/mkspecs/devices/linux-buildroot-g++/
> +	sed 's%@CROSS_COMPILE@%$(TARGET_CROSS)%' \
> +		< $(QT6BASE_PKGDIR)/qmake.conf.in \
> +		> $(STAGING_DIR)/usr/mkspecs/devices/linux-buildroot-g++/qmake.conf
> +	touch $(STAGING_DIR)/usr/mkspecs/devices/linux-buildroot-g++/arch.conf
> +	$(QT6BASE_MKSPEC_ARCH_CONFIG)
> +endef
> +
> +# The generated broken target_qt.conf is broken, so replace it
> +define QT6BASE_INSTALL_TARGET_QT_CONF
> +	sed 's%@HOST_DIR@%$(HOST_DIR)%; s%@SYSROOT@%$(STAGING_DIR)%' \
> +		< $(QT6BASE_PKGDIR)/target_qt.conf.in \
> +		> $(STAGING_DIR)/usr/bin/target_qt.conf
> +endef

All these I'm reasonably happy with, it's very similar to what we have
for qt5. Quite puzzling that the config file is in
$(STAGING_DIR)/usr/bin/, but oh well.

> +# The qmake wrapper script doesn't set QMAKEPATH, so qmake doesn't
> +# find specs and modules installed for the target
> +define QT6BASE_FIX_QMAKE_SCRIPT
> +	sed -i '1a\
> +export QMAKEPATH=$(STAGING_DIR)/usr' \
> +		$(STAGING_DIR)/usr/bin/qmake
> +endef

This is what bothers me. Why do you fix $(STAGING_DIR)/usr/bin/qmake?
The one we care about and that will be used to build packages is
$(HOST_DIR)/usr/bin/qmake. And this one is not a script that can be
patched, but directly an ELF binary. So here we have something that
isn't good.

Do you think you could have a look into this, perhaps looping back with
Angelo, Jesse and Roy?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-09-14 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 14:55 [Buildroot] [PATCH] package/qt6/qt6base: Make qmake work Ben Hutchings via buildroot
2024-04-11 14:55 ` [Buildroot] [PATCH] package/qt6/qt6base: Restore DirectFB support Ben Hutchings via buildroot
2024-04-11 18:48   ` Yann E. MORIN
2024-04-12 21:18     ` Ben Hutchings via buildroot
2024-09-14 16:44   ` Thomas Petazzoni via buildroot
2024-09-14 16:16 ` Thomas Petazzoni via buildroot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-12 13:37 [Buildroot] [PATCH] package/qt6/qt6base: Make qmake work Richard Genoud via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240914181613.4730aff3@windsurf \
    --to=buildroot@buildroot.org \
    --cc=angelo@amarulasolutions.com \
    --cc=ben.hutchings@mind.be \
    --cc=jesseevg@gmail.com \
    --cc=roykollensvendsen@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox