unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: 38405@debbugs.gnu.org
Subject: bug#38405: [staging] Some Qt plugins fail to build
Date: Wed, 27 Nov 2019 19:06:11 +0100	[thread overview]
Message-ID: <87r21t6vos.fsf@devup.no> (raw)

[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]

Hello Guix,

The 'staging' branch has been idle for a while because some Qt packages
fail to build (as of commit b60d2bfff95c0859d7814c1fe9d0940c87edc2b4):

* qtwayland: https://ci.guix.gnu.org/build/1851111/details
* qtgamepad: https://ci.guix.gnu.org/build/1946382/details
* qtwebglplugin: https://ci.guix.gnu.org/build/1830705/details

Unfortunately none of the above log files show the real issue because of
truncation: <https://bugs.gnu.org/37246>.

The problem is that for these packages specifically, the Makefile
generated by qmake references $out/lib/libQt5Core.so in LIBS (in
_addition_ to $qtbase/lib/libQt5Core.so), which in turn breaks the GCC
command line because $out/lib/libQt5Core.so obviously does not exist.

Prior to Qt 5.12, qmake generated LIBS by adding appropriate -L and -l
arguments to GCC such as "-L /gnu/store/abc123-foo/lib -l foo", whereas Qt
5.12 inserts absolute library references, i.e.
"/gnu/store/abc123-foo/lib/libfoo.so".  The former case worked because
GCC gracefully handles duplicate -L and -l arguments as long as at least
one of the '-L's are sane.

The references comes from the .prl files shipped with qtbase, which
contains entries such as:

  QMAKE_PRL_LIBS = $$[QT_INSTALL_LIBS]/libQt5Gui.so $$[QT_INSTALL_LIBS]/libQt5Core.so -lpthread /gnu/store/hhpkqcz4i8rsv3lk1iv694q0bkg2vij9-mesa-19.2.1/lib/libGL.so

QT_INSTALL_LIBS behaves differently in Guix at "configure time" (qmake)
and "build time" (when running "make", which creates other Makefiles).
At configure time it correctly resolves to the qtbase output (because we
patch qt_configure.prf to make it so).  At build time, it is repurposed
to be the installation prefix (i.e. $out/lib).

It's not clear to me why only the three mentioned packages are
affected.  My current best guess is that they fail to probe for some
(transitive?) dependency at "configure time", so no qmake cache entry is
created.  When these dependencies are resolved at "build time",
QT_INSTALL_LIBS points to the wrong location, and the build fails.

A workaround for this issue will be submitted shortly.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2019-11-27 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 18:06 Marius Bakke [this message]
2019-11-27 18:11 ` bug#38405: [PATCH] gnu: qtbase: Use absolute references in .prl files Marius Bakke
2019-11-27 23:18   ` Marius Bakke
2019-11-28 10:26   ` Efraim Flashner

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87r21t6vos.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=38405@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).