guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: qt-4: Do not set $LDFLAGS since that triggerred a build fail


From: Ludovic Courtès
Subject: 01/02: gnu: qt-4: Do not set $LDFLAGS since that triggerred a build failure.
Date: Wed, 15 Apr 2015 16:14:02 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit d29843466abcd3e3a6e638c7c2b3511b82f70646
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 15 13:30:25 2015 +0200

    gnu: qt-4: Do not set $LDFLAGS since that triggerred a build failure.
    
    Fixes the build failure at <http://hydra.gnu.org/build/379884/log/raw>:
    
      g++ -licui18n -Wl,-O1 [...] -o ../../../../bin/assistant [...]
      ld: warning: libQtCLucene.so.4, needed by 
/tmp/nix-build-qt-4.8.6.drv-0/qt-everywhere-opensource-src-4.8.6/lib/libQtHelp.so,
 not found (try using -rpath or -rpath-link)
      
/tmp/nix-build-qt-4.8.6.drv-0/qt-everywhere-opensource-src-4.8.6/lib/libQtHelp.so:
 undefined reference to `QCLucenePhraseQuery::getTerms() const'
      [...]
    
    * gnu/packages/patches/qt4-ldflags.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/qt.scm (qt-4)[source]: Use it.
      [arguments]: Remove 'setenv' call in 'configure' phase.
---
 gnu-system.am                          |    1 +
 gnu/packages/patches/qt4-ldflags.patch |   18 ++++++++++++++++++
 gnu/packages/qt.scm                    |   14 ++++----------
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 1d3496f..d92aaaf 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -520,6 +520,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
   gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch     \
   gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
+  gnu/packages/patches/qt4-ldflags.patch                       \
   gnu/packages/patches/qt4-tests.patch                         \
   gnu/packages/patches/qt5-runpath.patch                       \
   gnu/packages/patches/ratpoison-shell.patch                   \
diff --git a/gnu/packages/patches/qt4-ldflags.patch 
b/gnu/packages/patches/qt4-ldflags.patch
new file mode 100644
index 0000000..0d63980
--- /dev/null
+++ b/gnu/packages/patches/qt4-ldflags.patch
@@ -0,0 +1,18 @@
+Explicitly link against libicui18n so that libQtCore.so always finds it.
+
+--- qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 
12:01:41.661862663 +0200
++++ qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 
12:03:57.954586336 +0200
+@@ -19,6 +19,13 @@ include(codecs/codecs.pri)
+ include(statemachine/statemachine.pri)
+ include(xml/xml.pri)
+ 
++# Explicitly link with icui18n, which is dlopened by libQtCore.so.
++# We cannot do this by setting LDFLAGS because that then overrides
++# other LDFLAGS: <https://bugreports.qt.io/browse/QTBUG-5471>.
++# XXX: According to the Nixpkgs recipe, this may be necessary for
++# further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0).
++LIBS_PRIVATE += -licui18n
++
+ !qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+ qpa:mac {
+     !ios {
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 911de16..1787059 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -230,7 +230,8 @@ developers using C++ or QML, a CSS & JavaScript like 
language.")
              (sha256
               (base32
                "0b036iqgmbbv37dgwwfihw3mihjbnw3kb5kaisdy0qi8nn8xs54b"))
-             (patches (list (search-patch "qt4-tests.patch")))))
+             (patches (map search-patch
+                           '("qt4-ldflags.patch" "qt4-tests.patch")))))
     (inputs `(,@(alist-delete "libjpeg" (package-inputs qt))
               ("libjepg" ,libjpeg-8)
               ("libsm" ,libsm)))
@@ -241,15 +242,8 @@ developers using C++ or QML, a CSS & JavaScript like 
language.")
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (substitute* '("configure")
-                           (("/bin/pwd") (which "pwd")))
-              ;; Explicitly link with icui18n, which is dlopened by
-              ;; QtCore.so. The LDFLAGS are in fact added to other flags
-              ;; determined by the configure phase.
-              ;; According to the nix recipe, this may be necessary for
-              ;; further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0).
-              (setenv "LDFLAGS" "-licui18n")
-              ;; do not pass "--enable-fast-install", which makes the
-              ;; configure process fail
+                (("/bin/pwd") (which "pwd")))
+
               (zero? (system*
                       "./configure"
                       "-verbose"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]