[Buildroot] [PATCH 1/2] qt5connectivity: add sdpscanner tool for Qt5Bluetooth

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Apr 18 22:10:20 UTC 2016


Hello,

On Mon, 4 Apr 2016 22:26:12 +0200, Arnout Vandecappelle wrote:

>   That said, I wonder why we are doing all this manual copying for qt5, instead 
> of just running 'make install'. AFAICS the only thing that isn't already cleaned 
> up in the finalize step are the QML files, and these can easily be cleaned up as 
> a finalize hook. Thomas, do you remember why you did it this way?

I had a look at this, and I know why. If you look at the staging
installation, we do just:

	$(MAKE) -C $(@D) install

without passing any DESTDIR=$(STAGING_DIR) or anything like that.

The makefiles generated by qmake support a $(INSTALL_ROOT) variable
that prefixes all installation paths. However, due to how we configure
qmake, the fixed path (after $(INSTALL_ROOT)) already contains the full
path to our staging directory. From some random Qt5-generated Makefile:

-$(INSTALL_PROGRAM) ../../lib/$(TARGET) $(INSTALL_ROOT)/home/test/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/$(TARGET)

That's why we don't pass any DESTDIR/INSTALL_ROOT during staging
installation, and why we do the target installation manually.

So one could say that our initial qmake configuration in qt5base.mk is
broken. That's possible. But I believe that if we try to fix this (so
that the generated Makefile don't contain this hardcoded path to the
staging directory), then qmake would no longer work "automagically" as
it currently. However, it would be really interesting to have a look at
that and see if a good solution can be found. If our Qt5 folks (Julien
and Peter Seiderer) want to have a look, it'd be great.

I had a quick look at meta-qt5 in Yocto, and here is what they do:

find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"

so in essence, they fixup the generated Makefile after the fact so that
they don't contain the hardcoded sysroot path. If we can't find a clean
solution with qmake, maybe that's a possible solution to simplify the
target installation of all those qt5 packages.

One thing I wonder is how packages like qwt or quazip get properly
installed to the target/staging, since they do use INSTALL_ROOT. I had
a quick look at quazip, and its Makefiles are correct, they contain:

-$(INSTALL_FILE) /home/test/buildroot/output/build/quazip-0.7.2/quazip/crypt.h $(INSTALL_ROOT)/usr/include/quazip/

I'm puzzled. Some Qt5 person to chime in and look into this problem?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list