From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] mpv: disable static build with qt-zlib
Date: Sat, 3 Nov 2018 14:26:07 +0100 [thread overview]
Message-ID: <20181103142607.59465b91@windsurf> (raw)
In-Reply-To: <20181102182416.27015-1-fontaine.fabrice@gmail.com>
Hello Fabrice,
On Fri, 2 Nov 2018 19:24:16 +0100, Fabrice Fontaine wrote:
> Static build of mpv with qt-zlib will fail because zlib and qt-zlib
> defines the same functions (inflateReset, inflatePrime ...)
>
> So add a dependency on !(BR2_STATIC_LIBS && BR2_PACKAGE_QT_QTZLIB)
>
> Theoretically, this dependency should be put on zlib package on all its
> reverse dependencies but this make a lot of packages
Why? zlib doesn't have any problem at all.
I don't think this patch is the right solution. First, because the
problem is in Qt, not in MPV. Fixing it at the MPV level means that all
other packages that use Qt may still be affected by the same issue.
I believe the problem comes the fact that Qt can use Zlib in two modes:
with a built-in zlib copy (BR2_PACKAGE_QT_QTZLIB) and with the system
zlib (BR2_PACKAGE_QT_SYSTEMZLIB). Because those options are part of a
choice, and choices are not randomized by the autobuilder
infrastructure, only BR2_PACKAGE_QT_QTZLIB gets tested and
BR2_PACKAGE_QT_SYSTEMZLIB is never tested.
I believe that with BR2_PACKAGE_QT_SYSTEMZLIB, the static build should
work, because there is only one copy of the zlib functions, in libz.a.
The problem with BR2_PACKAGE_QT_QTZLIB is that you end up with two
copies of all zlib functions: one in libz.a and one in libQtCore.a.
It would be great if you could confirm that the same configuration
builds properly when BR2_PACKAGE_QT_SYSTEMZLIB is used instead of
BR2_PACKAGE_QT_QTZLIB. If that is the case, then I believe the right
fix is to add a depends on !BR2_STATIC_LIBS to the
BR2_PACKAGE_QT_QTZLIB option.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-11-03 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 18:24 [Buildroot] [PATCH 1/1] mpv: disable static build with qt-zlib Fabrice Fontaine
2018-11-03 13:26 ` Thomas Petazzoni [this message]
2018-11-03 22:15 ` Arnout Vandecappelle
2018-11-04 10:20 ` Thomas Petazzoni
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=20181103142607.59465b91@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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