Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] qt5-build.eclass: support sysroot builds
Date: Fri, 27 Mar 2020 20:49:38
Message-Id: 20200327204911.3f41a576@symphony.aura-online.co.uk
In Reply to: [gentoo-dev] [PATCH] qt5-build.eclass: support sysroot builds by David Michael
1 On Fri, 27 Mar 2020 13:10:34 -0400
2 David Michael <fedora.dm0@×××××.com> wrote:
3
4 > I'd like to be able to install qt5 packages in a sysroot for staging,
5 > and this is an initial patch for it. The pkg-config variables might not
6 > be required, but it seemed appropriate to pass the sysroot-configured
7 > versions through the build. There are a few caveats:
8 >
9 > - The upstream configure scripts do some bad things like this:
10 > https://code.qt.io/cgit/qt/qtbase.git/tree/configure.pri#n363
11 > That makes the build fail for systems using lib64 (e.g. amd64). I'm
12 > able to work around this by defining PKG_CONFIG_LIBDIR for dev-qt/*.
13
14 Indeed, that sucks. We should probably patch that out. I don't know
15 what it means where it says "or use -pkg-config to override this test",
16 do you? I suspect you could define PKG_CONFIG_LIBDIR=/ or anywhere that
17 simply exists and it will still work because our wrapper redefines that
18 variable anyway.
19
20 > - This isn't for real cross-compiling. There are places where it
21 > tries to execute cross-compiled programs that I haven't investigated
22 > yet, so this is only for building a sysroot for an architecture
23 > compatible with the build system for now.
24
25 Understood. I did try to do cross-compiling with Qt4 once upon a time
26 and I did make a little headway but it wasn't fun.
27
28 > - The qt packages depend on each other being installed in / as well as
29 > the sysroot, so their ebuilds will need BDEPENDs added.
30
31 I imagine you'd at least need qtcore for qmake and moc. Probably not
32 the rest though?
33
34 > - I've only gotten to testing a few packages that are dependencies of
35 > other applications (like VLC), so I may be missing breakages.
36 >
37 > The patch basically just sets -sysroot when $SYSROOT is defined. It
38 > also needs to set -extprefix to the normal prefix, since otherwise it
39 > would default to installing into /sysroot/prefix. Is anyone involved in
40 > qt maintenance more experienced with this and able to comment?
41
42 I'm not the Qt guy but I am the cross guy. I'm not in a position to
43 test this right now but it looks good and I love the simplicity of it.
44 It's a hell of a lot simpler than Qt4 was. To be honest, we should be
45 setting QMAKE_PKG_CONFIG regardless.
46
47 --
48 James Le Cuirot (chewi)
49 Gentoo Linux Developer

Replies

Subject Author
Re: [gentoo-dev] [PATCH] qt5-build.eclass: support sysroot builds David Michael <fedora.dm0@×××××.com>