From cbbb11c8a00c64cb24081025239f77208661b961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2015 21:07:11 +0200 Subject: [PATCH 01/35] gnu: Rename ld-wrapper2 to ld-wrapper. * gnu/packages/ld-wrapper2.in: Rename to... * gnu/packages/ld-wrapper.in: ... this. * gnu-system.am (MISC_DISTRO_FILES): Remove ld-wrapper2.in. * gnu/packages/commencement.scm (fixed-ld-wrapper): Remove. (gcc-toolchain): Restore pre-77db91ad inputs. --- gnu-system.am | 3 +- gnu/packages/commencement.scm | 15 +-- gnu/packages/ld-wrapper.in | 46 ++++---- gnu/packages/ld-wrapper2.in | 207 ---------------------------------- 4 files changed, 24 insertions(+), 247 deletions(-) delete mode 100644 gnu/packages/ld-wrapper2.in diff --git a/gnu-system.am b/gnu-system.am index b11706cb99..06ec6e7142 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -578,8 +578,7 @@ dist_patch_DATA = \ gnu/packages/patches/zathura-plugindir-environment-variable.patch MISC_DISTRO_FILES = \ - gnu/packages/ld-wrapper.in \ - gnu/packages/ld-wrapper2.in + gnu/packages/ld-wrapper.in bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 22da2e0fb3..4342dc56d1 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -708,19 +708,6 @@ COREUTILS-FINAL vs. COREUTILS, etc." ;;; GCC toolchain. ;;; -(define (fixed-ld-wrapper) - ;; FIXME: In this cycle, a bug was introduced in ld-wrapper: it would - ;; incorrectly flag ~/.guix-profile/lib/libfoo.so as "impure", due to a bug - ;; in its symlink resolution code. To work around that while avoiding a - ;; full rebuild, use an ld-wrapper with the bug-fix for 'gcc-toolchain'. - (let ((orig (car (assoc-ref %final-inputs "ld-wrapper")))) - (package - (inherit orig) - (location (source-properties->location (current-source-location))) - (inputs `(("wrapper" ,(search-path %load-path - "gnu/packages/ld-wrapper2.in")) - ,@(package-inputs orig)))))) - (define (gcc-toolchain gcc) "Return a complete toolchain for GCC." (package @@ -759,7 +746,7 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.") ;; install everything that we need, and (2) to make sure ld-wrapper comes ;; before Binutils' ld in the user's profile. (inputs `(("gcc" ,gcc) - ("ld-wrapper" ,(fixed-ld-wrapper)) + ("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper"))) ("binutils" ,binutils-final) ("libc" ,glibc-final) ("libc-debug" ,glibc-final "debug"))))) diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index 094018de3d..f4ab17c59f 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -92,34 +92,32 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (let loop ((file file) (depth 0)) - (catch 'system-error - (lambda () - (if (>= depth %max-symlink-depth) - file - (loop (readlink file) (+ depth 1)))) - (lambda args - (if (= EINVAL (system-error-errno args)) - file - (apply throw args)))))) + (define (absolute target) + (if (absolute-file-name? target) + target + (string-append (dirname file) "/" target))) -(define (dereference-symlinks file) - ;; Same as 'readlink*' but return FILE if the symlink target is invalid or - ;; FILE does not exist. - (catch 'system-error - (lambda () - ;; When used from a user environment, FILE may refer to - ;; ~/.guix-profile/lib/libfoo.so, which is itself a symlink to the - ;; store. Check whether this is the case. - (readlink* file)) - (lambda args - (if (= ENOENT (system-error-errno args)) - file - (apply throw args))))) + (if (>= depth %max-symlink-depth) + file + (call-with-values + (lambda () + (catch 'system-error + (lambda () + (values #t (readlink file))) + (lambda args + (let ((errno (system-error-errno args))) + (if (or (= errno EINVAL) (= errno ENOENT)) + (values #f file) + (apply throw args)))))) + (lambda (success? target) + (if success? + (loop (absolute target) (+ depth 1)) + file)))))) (define (pure-file-name? file) ;; Return #t when FILE is the name of a file either within the store ;; (possibly via a symlink) or within the build directory. - (let ((file (dereference-symlinks file))) + (let ((file (readlink* file))) (or (not (string-prefix? "/" file)) (string-prefix? %store-directory file) (string-prefix? %temporary-directory file) @@ -128,7 +126,7 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (define (store-file-name? file) ;; Return #t when FILE is a store file, possibly indirectly. - (string-prefix? %store-directory (dereference-symlinks file))) + (string-prefix? %store-directory (readlink* file))) (define (shared-library? file) ;; Return #t when FILE denotes a shared library. diff --git a/gnu/packages/ld-wrapper2.in b/gnu/packages/ld-wrapper2.in deleted file mode 100644 index f4ab17c59f..0000000000 --- a/gnu/packages/ld-wrapper2.in +++ /dev/null @@ -1,207 +0,0 @@ -#!@BASH@ -# -*- mode: scheme; coding: utf-8; -*- - -# XXX: We have to go through Bash because there's no command-line switch to -# augment %load-compiled-path, and because of the silly 127-byte limit for -# the shebang line in Linux. -# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our -# .go file (see ). - -main="(@ (gnu build-support ld-wrapper) ld-wrapper)" -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@" -!# -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu build-support ld-wrapper) - #:use-module (srfi srfi-1) - #:use-module (ice-9 match) - #:export (ld-wrapper)) - -;;; Commentary: -;;; -;;; This is a wrapper for the linker. Its purpose is to inspect the -L and -;;; -l switches passed to the linker, add corresponding -rpath arguments, and -;;; invoke the actual linker with this new set of arguments. -;;; -;;; The alternatives to this hack would be: -;;; -;;; 1. Using $LD_RUN_PATH. However, that would tend to include more than -;;; needed in the RPATH; for instance, given a package with `libfoo' as -;;; an input, all its binaries would have libfoo in their RPATH, -;;; regardless of whether they actually NEED it. -;;; -;;; 2. Use a GCC "lib" spec string such as `%{L*:-rpath %*}', which adds a -;;; `-rpath LIBDIR' argument for each occurrence of `-L LIBDIR'. -;;; However, this doesn't work when $LIBRARY_PATH is used, because the -;;; additional `-L' switches are not matched by the above rule, because -;;; the rule only matches explicit user-provided switches. See -;;; for details. -;;; -;;; As a bonus, this wrapper checks for "impurities"--i.e., references to -;;; libraries outside the store. -;;; -;;; Code: - -(define %real-ld - ;; Name of the linker that we wrap. - "@LD@") - -(define %store-directory - ;; File name of the store. - (or (getenv "NIX_STORE") "/gnu/store")) - -(define %temporary-directory - ;; Temporary directory. - (or (getenv "TMPDIR") "/tmp")) - -(define %build-directory - ;; Top build directory when run from a builder. - (getenv "NIX_BUILD_TOP")) - -(define %allow-impurities? - ;; Whether to allow references to libraries outside the store. - (getenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES")) - -(define %debug? - ;; Whether to emit debugging output. - (getenv "GUIX_LD_WRAPPER_DEBUG")) - -(define %disable-rpath? - ;; Whether to disable automatic '-rpath' addition. - (getenv "GUIX_LD_WRAPPER_DISABLE_RPATH")) - -(define (readlink* file) - ;; Call 'readlink' until the result is not a symlink. - (define %max-symlink-depth 50) - - (let loop ((file file) - (depth 0)) - (define (absolute target) - (if (absolute-file-name? target) - target - (string-append (dirname file) "/" target))) - - (if (>= depth %max-symlink-depth) - file - (call-with-values - (lambda () - (catch 'system-error - (lambda () - (values #t (readlink file))) - (lambda args - (let ((errno (system-error-errno args))) - (if (or (= errno EINVAL) (= errno ENOENT)) - (values #f file) - (apply throw args)))))) - (lambda (success? target) - (if success? - (loop (absolute target) (+ depth 1)) - file)))))) - -(define (pure-file-name? file) - ;; Return #t when FILE is the name of a file either within the store - ;; (possibly via a symlink) or within the build directory. - (let ((file (readlink* file))) - (or (not (string-prefix? "/" file)) - (string-prefix? %store-directory file) - (string-prefix? %temporary-directory file) - (and %build-directory - (string-prefix? %build-directory file))))) - -(define (store-file-name? file) - ;; Return #t when FILE is a store file, possibly indirectly. - (string-prefix? %store-directory (readlink* file))) - -(define (shared-library? file) - ;; Return #t when FILE denotes a shared library. - (or (string-suffix? ".so" file) - (let ((index (string-contains file ".so."))) - ;; Since we cannot use regexps during bootstrap, roll our own. - (and index - (string-every (char-set-union (char-set #\.) char-set:digit) - (string-drop file (+ index 3))))))) - -(define (library-files-linked args) - ;; Return the file names of shared libraries explicitly linked against via - ;; `-l' or with an absolute file name in ARGS. - (define path+files - (fold (lambda (argument result) - (match result - ((library-path . library-files) - (cond ((string-prefix? "-L" argument) ;augment the search path - (cons (append library-path - (list (string-drop argument 2))) - library-files)) - ((string-prefix? "-l" argument) ;add library - (let* ((lib (string-append "lib" - (string-drop argument 2) - ".so")) - (full (search-path library-path lib))) - (if full - (cons library-path - (cons full library-files)) - result))) - ((and (string-prefix? %store-directory argument) - (shared-library? argument)) ;add library - (cons library-path - (cons argument library-files))) - (else - result))))) - (cons '() '()) - args)) - - (match path+files - ((path . files) - (reverse files)))) - -(define (rpath-arguments library-files) - ;; Return the `-rpath' argument list for each of LIBRARY-FILES, a list of - ;; absolute file names. - (fold-right (lambda (file args) - ;; Add '-rpath' if and only if FILE is in the store; we don't - ;; want to add '-rpath' for files under %BUILD-DIRECTORY or - ;; %TEMPORARY-DIRECTORY because that could leak to installed - ;; files. - (cond ((and (not %disable-rpath?) - (store-file-name? file)) - (cons* "-rpath" (dirname file) args)) - ((or %allow-impurities? - (pure-file-name? file)) - args) - (else - (begin - (format (current-error-port) - "ld-wrapper: error: attempt to use \ -impure library ~s~%" - file) - (exit 1))))) - '() - library-files)) - -(define (ld-wrapper . args) - ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches. - (let* ((libs (library-files-linked args)) - (args (append args (rpath-arguments libs)))) - (when %debug? - (format (current-error-port) - "ld-wrapper: invoking `~a' with ~s~%" - %real-ld args)) - (apply execl %real-ld (basename %real-ld) args))) - -;;; ld-wrapper.scm ends here From 4267c637d63ac7c48fe8206623ca976fc0dd742a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2015 21:08:44 +0200 Subject: [PATCH 02/35] gnu: ld-wrapper: Add debugging info. * gnu/packages/ld-wrapper.in (ld-wrapper): Add "libraries linked" debugging statement. --- gnu/packages/ld-wrapper.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index f4ab17c59f..ed2a51ea67 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -199,6 +199,8 @@ impure library ~s~%" (let* ((libs (library-files-linked args)) (args (append args (rpath-arguments libs)))) (when %debug? + (format (current-error-port) + "ld-wrapper: libraries linked: ~s~%" libs) (format (current-error-port) "ld-wrapper: invoking `~a' with ~s~%" %real-ld args)) From 4a2b74bf4ce6780bb284bbcc63d3548233b09ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2015 21:14:28 +0200 Subject: [PATCH 03/35] gnu: ld-wrapper: Ignore the .so argument following '-dynamic-linker'. Reported at . * gnu/packages/ld-wrapper.in (library-files-linked): Rename 'path+files' to 'path+files+args'. Thread the reverse list of previous arguments. Add case for when the previous argument is "-dynamic-linker". --- gnu/packages/ld-wrapper.in | 39 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index ed2a51ea67..db662e7d76 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -140,34 +140,45 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (define (library-files-linked args) ;; Return the file names of shared libraries explicitly linked against via ;; `-l' or with an absolute file name in ARGS. - (define path+files + (define path+files+args (fold (lambda (argument result) (match result - ((library-path . library-files) + ((library-path library-files ("-dynamic-linker" . rest)) + ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'. + ;; See . + (list library-path + library-files + (cons* argument "-dynamic-linker" rest))) + ((library-path library-files previous-args) (cond ((string-prefix? "-L" argument) ;augment the search path - (cons (append library-path + (list (append library-path (list (string-drop argument 2))) - library-files)) + library-files + (cons argument previous-args))) ((string-prefix? "-l" argument) ;add library (let* ((lib (string-append "lib" (string-drop argument 2) ".so")) (full (search-path library-path lib))) - (if full - (cons library-path - (cons full library-files)) - result))) + (list library-path + (if full + (cons full library-files) + library-files) + (cons argument previous-args)))) ((and (string-prefix? %store-directory argument) (shared-library? argument)) ;add library - (cons library-path - (cons argument library-files))) + (list library-path + (cons argument library-files) + (cons argument previous-args))) (else - result))))) - (cons '() '()) + (list library-path + library-files + (cons argument previous-args))))))) + (list '() '() '()) args)) - (match path+files - ((path . files) + (match path+files+args + ((path files arguments) (reverse files)))) (define (rpath-arguments library-files) From ef593a103da92410192581be7a757e5654fae327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2015 21:16:24 +0200 Subject: [PATCH 04/35] gnu: libltdl: Remove unneeded patch. * gnu/packages/autotools.scm (libltdl)[source]: Remove 'patches'. --- gnu/packages/autotools.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index bc2b20ed46..24ff90cc5c 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -303,12 +303,7 @@ complexity of working with shared libraries across platforms.") version ".tar.xz")) (sha256 (base32 - "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")) - - ;; FIXME: We don't need this patch here, we just keep it to - ;; avoid a rebuild today. - (patches - (list (search-patch "libtool-skip-tests.patch"))))) + "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-ltdl-install") ;really install it From 6162b95d21a7b75fe3753c22c7755c5d12a8302f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2015 22:53:09 +0200 Subject: [PATCH 05/35] gnu: glibc: Add dependency on Gettext, to install the message catalogs. This fixes a bug whereby the libc.mo files were not installed, and thus translations of libc's messages were not available. * gnu/packages/commencement.scm (gettext-boot0): New variable. (glibc-final)[native-inputs]: New field. * gnu/packages/base.scm (glibc)[native-inputs]: Add GNU-GETTEXT. --- gnu/packages/base.scm | 6 +++-- gnu/packages/commencement.scm | 41 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 361436157d..0c2a4a5725 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -568,9 +568,11 @@ store.") (inputs `(("static-bash" ,(static-package bash-light)))) - ;; To build the manual, we need Texinfo and Perl. + ;; To build the manual, we need Texinfo and Perl. Gettext is needed to + ;; install the message catalogs, with 'msgfmt'. (native-inputs `(("texinfo" ,texinfo) - ("perl" ,perl))) + ("perl" ,perl) + ("gettext" ,gnu-gettext))) (native-search-paths ;; Search path for packages that provide locale data. This is useful diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 4342dc56d1..9918c21fd1 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages gawk) #:use-module (gnu packages bison) #:use-module (gnu packages guile) + #:use-module (gnu packages gettext) #:use-module (gnu packages multiprecision) #:use-module (gnu packages compression) #:use-module (gnu packages perl) @@ -418,6 +419,42 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" '("gcc" "libc"))) (current-source-location))))) +(define gettext-boot0 + ;; A minimal gettext used during bootstrap. + (let ((gettext-minimal (package + (inherit gnu-gettext) + (name "gettext-boot0") + (inputs '()) ;zero dependencies + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--disable-threads") + #:tests? #f + ,@(package-arguments gnu-gettext)) + ((#:phases phases) + `(modify-phases ,phases + ;; Build only the tools. + (add-after 'unpack 'chdir + (lambda _ + (chdir "gettext-tools"))) + + ;; Some test programs require pthreads, + ;; which we don't have. + (add-before 'configure 'no-test-programs + (lambda _ + (substitute* "tests/Makefile.in" + (("^PROGRAMS =.*$") + "PROGRAMS =\n")) + #t)) + + ;; Don't try to link against libexpat. + (delete 'link-expat) + (delete 'patch-tests)))))))) + (package-with-bootstrap-guile + (package-with-explicit-inputs gettext-minimal + %boot1-inputs + (current-source-location) + #:guile %bootstrap-guile)))) + (define-public glibc-final ;; The final glibc, which embeds the statically-linked Bash built above. (package (inherit glibc-final-with-bootstrap-bash) @@ -427,6 +464,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" "static-bash" (package-inputs glibc-final-with-bootstrap-bash)))) + ;; This time we need 'msgfmt' to install all the libc.mo files. + (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash) + ("gettext" ,gettext-boot0))) + ;; The final libc only refers to itself, but the 'debug' output contains ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great ;; if 'allowed-references' were per-output. From d8d6d096be8c37076060a3bc063582c404de1205 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 21 Apr 2015 19:02:52 -0400 Subject: [PATCH 06/35] gnu: tzdata: Update to 2015c. * gnu/packages/base.scm (tzdata): Update to 2015c. --- gnu/packages/base.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 0c2a4a5725..8a92e87fdd 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -691,7 +691,7 @@ command.") (define-public tzdata (package (name "tzdata") - (version "2015b") + (version "2015c") (source (origin (method url-fetch) (uri (string-append @@ -699,7 +699,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "0qmdr1yqqn94b5a54axwszfzimyxg27i6xsfmp0sswd3nfjw2sjm")))) + "0nin48g5dmkfgckp25bngxchn3sw3yyjss5sq7gs5xspbxgsq3w6")))) (build-system gnu-build-system) (arguments '(#:tests? #f @@ -746,7 +746,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "0xjxlgzva13y8qi3vfbb3nq5pii8ax9wi4yc7vj9134rbciz2s76")))))) + "0bplibiy70dvlrhwqzkzxgmg81j6d2kklvjgi2f1g2zz1nkb3vkz")))))) (home-page "http://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) From cc8ddcb09771dff47c669a4e585f91c28d08359f Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sun, 19 Apr 2015 09:59:23 -0500 Subject: [PATCH 07/35] gnu: perl: Fix Module::Pluggable for symlink forests. * gnu/packages/patches/perl-module-pluggable-search.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/perl.scm (perl)[source]: Add patch. --- gnu-system.am | 1 + .../perl-module-pluggable-search.patch | 25 +++++++++++++++++++ gnu/packages/perl.scm | 4 ++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/perl-module-pluggable-search.patch diff --git a/gnu-system.am b/gnu-system.am index 06ec6e7142..8936b0be1f 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -503,6 +503,7 @@ dist_patch_DATA = \ gnu/packages/patches/patchutils-xfail-gendiff-tests.patch \ gnu/packages/patches/pavucontrol-sigsegv.patch \ gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \ + gnu/packages/patches/perl-module-pluggable-search.patch \ gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch \ gnu/packages/patches/perl-no-sys-dirs.patch \ gnu/packages/patches/perl-tk-x11-discover.patch \ diff --git a/gnu/packages/patches/perl-module-pluggable-search.patch b/gnu/packages/patches/perl-module-pluggable-search.patch new file mode 100644 index 0000000000..bb2a57f7e5 --- /dev/null +++ b/gnu/packages/patches/perl-module-pluggable-search.patch @@ -0,0 +1,25 @@ +Fix core Perl module Module::Pluggable such that it can find plugins that live +in symlinked directories. + +Patch borrowed/adapted from Nixpkgs. + +--- perl-5.16.1/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm 2015-04-08 23:28:48.120164135 -0500 ++++ perl-5.16.1/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm 2015-04-08 23:30:27.032166704 -0500 +@@ -164,7 +164,7 @@ + my $sp = catdir($dir, (split /::/, $searchpath)); + + # if it doesn't exist or it's not a dir then skip it +- next unless ( -e $sp && -d _ ); # Use the cached stat the second time ++ next unless ( -e $sp ); + + my @files = $self->find_files($sp); + +@@ -279,7 +279,7 @@ + (my $path = $File::Find::name) =~ s#^\\./##; + push @files, $path; + } +- }, $search_path ); ++ }, "$search_path/." ); + } + #chdir $cwd; + return @files; diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index e55eb8791d..80c476b2b1 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -44,7 +44,9 @@ (sha256 (base32 "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km")) - (patches (list (search-patch "perl-no-sys-dirs.patch"))))) + (patches (map search-patch + '("perl-no-sys-dirs.patch" + "perl-module-pluggable-search.patch"))))) (build-system gnu-build-system) (arguments '(#:tests? #f From 669b8639a229eee2493bc425d124340d6424d86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 22 Apr 2015 00:31:22 +0200 Subject: [PATCH 08/35] gnu: commencement: Remove unneeded configure flag for bootstrap gettext. * gnu/packages/commencement.scm (gettext-boot0): Remove unneeded --disable-threads. --- gnu/packages/commencement.scm | 50 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 9918c21fd1..351ef3e2c4 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -421,34 +421,32 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define gettext-boot0 ;; A minimal gettext used during bootstrap. - (let ((gettext-minimal (package - (inherit gnu-gettext) - (name "gettext-boot0") - (inputs '()) ;zero dependencies - (arguments - (substitute-keyword-arguments - `(#:configure-flags '("--disable-threads") - #:tests? #f - ,@(package-arguments gnu-gettext)) - ((#:phases phases) - `(modify-phases ,phases - ;; Build only the tools. - (add-after 'unpack 'chdir - (lambda _ - (chdir "gettext-tools"))) + (let ((gettext-minimal + (package (inherit gnu-gettext) + (name "gettext-boot0") + (inputs '()) ;zero dependencies + (arguments + (substitute-keyword-arguments + `(#:tests? #f + ,@(package-arguments gnu-gettext)) + ((#:phases phases) + `(modify-phases ,phases + ;; Build only the tools. + (add-after 'unpack 'chdir + (lambda _ + (chdir "gettext-tools"))) - ;; Some test programs require pthreads, - ;; which we don't have. - (add-before 'configure 'no-test-programs - (lambda _ - (substitute* "tests/Makefile.in" - (("^PROGRAMS =.*$") - "PROGRAMS =\n")) - #t)) + ;; Some test programs require pthreads, which we don't have. + (add-before 'configure 'no-test-programs + (lambda _ + (substitute* "tests/Makefile.in" + (("^PROGRAMS =.*$") + "PROGRAMS =\n")) + #t)) - ;; Don't try to link against libexpat. - (delete 'link-expat) - (delete 'patch-tests)))))))) + ;; Don't try to link against libexpat. + (delete 'link-expat) + (delete 'patch-tests)))))))) (package-with-bootstrap-guile (package-with-explicit-inputs gettext-minimal %boot1-inputs From 21e583def33ecf9e9bae3a18df875cd3380e14ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 00:03:34 +0200 Subject: [PATCH 09/35] gnu: gcc: Add a RUNPATH to libstdc++.so so that it finds libgcc_s.so. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by 宋文武 . * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add 'substitute*' form for "libstdc++-v3/src/Makefile.in". --- gnu/packages/gcc.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cd6fc3b2fd..442ea9874e 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -252,6 +252,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC (("static char const sed_cmd_z\\[\\] =.*;") "static char const sed_cmd_z[] = \"sed\";")) + ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s. + ;; See + ;; and . + (substitute* "libstdc++-v3/src/Makefile.in" + (("^OPT_LDFLAGS = ") + "OPT_LDFLAGS = -Wl,-rpath=$(libdir) ")) + ;; Move libstdc++*-gdb.py to the "lib" output to avoid a ;; circularity between "out" and "lib". (Note: ;; --with-python-dir is useless because it imposes $(prefix) as From d485ebba428cc4125b6b9fd282507eda3f860cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 00:01:59 +0200 Subject: [PATCH 10/35] gnu: gcc: Do not always disable RUNPATH validation. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Remove explicit #:validate-runpath? #f. * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Remove case for #:validate-runpath?. (gcc-final)[arguments]: Add literal #:validate-runpath? #f. * gnu/packages/cross-base.scm (cross-gcc-arguments): Remove case for #:validate-runpath?. --- gnu/packages/commencement.scm | 12 +++++------- gnu/packages/cross-base.scm | 2 -- gnu/packages/gcc.scm | 4 ---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 351ef3e2c4..65524091a9 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -158,8 +158,6 @@ (srfi srfi-1) (srfi srfi-26)) ,@(substitute-keyword-arguments (package-arguments gcc-4.8) - ((#:validate-runpath? _) - #t) ((#:configure-flags flags) `(append (list ,(string-append "--target=" (boot-triplet)) @@ -540,6 +538,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" #:allowed-references ("out" "lib" ,glibc-final) + ;; Things like libasan.so and libstdc++.so NEED ld.so for some + ;; reason, but it is not in their RUNPATH. This is a false + ;; positive, so turn it off. + #:validate-runpath? #f + ;; Build again GMP & co. within GCC's build process, because it's hard ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) @@ -564,11 +567,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" "/lib") flag)) ,flags))) - ((#:validate-runpath? _) - ;; Things like libasan.so and libstdc++.so NEED ld.so and/or - ;; libgcc_s.so but RUNPATH is empty. This is a false positive, so - ;; turn it off. - #f) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 01cfdf73e8..9a459400e8 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -175,8 +175,6 @@ may be either a libc package or #f.)" #t))) ,phases) phases))) - ((#:validate-runpath? _) - #t) ((#:strip-binaries? _) ;; Disable stripping as this can break binaries, with object files of ;; libgcc.a showing up as having an unknown architecture. See diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 442ea9874e..ca85073ea4 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -190,10 +190,6 @@ where the OS part is overloaded to denote a specific ABI---into GCC #:tests? #f - ;; libstdc++.so NEEDs libgcc_s.so but somehow it doesn't get - ;; $(libdir) in its RUNPATH, so turn it off. - #:validate-runpath? #f - #:phases (alist-cons-before 'configure 'pre-configure From a635ed5ccb78c8010e0368d1e82ad1f7ca1af5be Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 22 Apr 2015 21:48:20 -0400 Subject: [PATCH 11/35] gnu: Add missing (gnu packages gettext) module import. This is a followup to 6162b95d21a7b75fe3753c22c7755c5d12a8302f. * gnu/packages/base.scm: Import (gnu packages gettext). --- gnu/packages/base.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 8a92e87fdd..c6206fdce2 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -34,6 +34,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages gettext) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) From cd91504df27aa0f311735c61f3b7b7ee3fee861a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 11:23:14 +0200 Subject: [PATCH 12/35] gremlin: Add support for the expansion of $ORIGIN in RUNPATH. * guix/build/gremlin.scm (expand-variable, expand-origin): New procedures. (validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field of DYNINFO. * tests/gremlin.scm ("expand-origin"): New test. --- guix/build/gremlin.scm | 36 +++++++++++++++++++++++++++++++----- tests/gremlin.scm | 12 ++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index 30b06034dd..fed529b193 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -39,6 +39,7 @@ elf-dynamic-info-needed elf-dynamic-info-rpath elf-dynamic-info-runpath + expand-origin validate-needed-in-runpath)) @@ -236,6 +237,30 @@ value of DT_NEEDED entries is a string.)" (string-prefix? libc-lib lib)) %libc-libraries)) +(define (expand-variable str variable value) + "Replace occurrences of '$VARIABLE' or '${VARIABLE}' in STR with VALUE." + (define variables + (list (string-append "$" variable) + (string-append "${" variable "}"))) + + (let loop ((thing variables) + (str str)) + (match thing + (() + str) + ((head tail ...) + (let ((index (string-contains str head)) + (len (string-length head))) + (loop (if index variables tail) + (if index + (string-replace str value + index (+ index len)) + str))))))) + +(define (expand-origin str directory) + "Replace occurrences of '$ORIGIN' in STR with DIRECTORY." + (expand-variable str "ORIGIN" directory)) + (define* (validate-needed-in-runpath file #:key (always-found? libc-library?)) "Return #t if all the libraries listed as FILE's 'DT_NEEDED' entries are @@ -254,17 +279,18 @@ exceeds total size~%" (let* ((elf (call-with-input-file file (compose parse-elf get-bytevector-all))) + (expand (cute expand-origin <> (dirname file))) (dyninfo (elf-dynamic-info elf))) (when dyninfo - (let* ((runpath (filter store-file-name? - (elf-dynamic-info-runpath dyninfo))) - (bogus (remove store-file-name? - (elf-dynamic-info-runpath dyninfo))) + ;; XXX: In theory we should also expand $PLATFORM and $LIB, but these + ;; appear to be really unused. + (let* ((expanded (map expand (elf-dynamic-info-runpath dyninfo))) + (runpath (filter store-file-name? expanded)) + (bogus (remove store-file-name? expanded)) (needed (remove always-found? (elf-dynamic-info-needed dyninfo))) (not-found (remove (cut search-path runpath <>) needed))) - ;; XXX: $ORIGIN is not supported. (unless (null? bogus) (format (current-error-port) "~a: warning: RUNPATH contains bogus entries: ~s~%" diff --git a/tests/gremlin.scm b/tests/gremlin.scm index 225a72ff9f..dc9f78c21a 100644 --- a/tests/gremlin.scm +++ b/tests/gremlin.scm @@ -21,6 +21,7 @@ #:use-module (guix build utils) #:use-module (guix build gremlin) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) #:use-module (rnrs io ports) #:use-module (ice-9 match)) @@ -51,6 +52,17 @@ (string-take lib (string-contains lib ".so"))) (elf-dynamic-info-needed dyninfo)))))) +(test-equal "expand-origin" + '("OOO/../lib" + "OOO" + "../OOO/bar/OOO/baz" + "ORIGIN/foo") + (map (cut expand-origin <> "OOO") + '("$ORIGIN/../lib" + "${ORIGIN}" + "../${ORIGIN}/bar/$ORIGIN/baz" + "ORIGIN/foo"))) + (test-end "gremlin") From cb85eb5e6569378d444b45cf209324e38f6ec0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 11:59:35 +0200 Subject: [PATCH 13/35] build-system/gnu: Gracefully handle dangling symlinks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Tomáš Čech . * guix/build/gnu-build-system.scm (patch-source-shebangs): Remove files that don't pass 'file-exists?'. (patch-generated-file-shebangs): Likewise. --- guix/build/gnu-build-system.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index c60f8ba162..00422458ab 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -164,7 +164,10 @@ files such as `.in' templates. Most scripts honor $SHELL and $CONFIG_SHELL, but some don't, such as `mkinstalldirs' or Automake's `missing' script." (for-each patch-shebang - (remove file-is-directory? (find-files "." ".*")))) + (remove (lambda (file) + (or (not (file-exists? file)) ;dangling symlink + (file-is-directory? file))) + (find-files ".")))) (define (patch-generated-file-shebangs . rest) "Patch shebangs in generated files, including `SHELL' variables in @@ -173,9 +176,10 @@ makefiles." ;; `configure'. (for-each patch-shebang (filter (lambda (file) - (and (executable-file? file) + (and (file-exists? file) + (executable-file? file) (not (file-is-directory? file)))) - (find-files "." ".*"))) + (find-files "."))) ;; Patch `SHELL' in generated makefiles. (for-each patch-makefile-SHELL (find-files "." "^(GNU)?[mM]akefile$"))) From 0bd4377566f80e6736492ea6ecfe3fdb14310717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 18:50:37 +0200 Subject: [PATCH 14/35] build-system/gnu: #:validate-runpath? now defaults to #t. * guix/build/gnu-build-system.scm (validate-runpath): Change default value of VALIDATE-RUNPATH? to #t. --- guix/build/gnu-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 00422458ab..5062479360 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -418,7 +418,7 @@ effects, such as displaying warnings or error messages." (loop tail (and (pred head) result)))))) (define* (validate-runpath #:key - validate-runpath? + (validate-runpath? #t) (elf-directories '("lib" "lib64" "libexec" "bin" "sbin")) outputs #:allow-other-keys) From d074e2f99130782e8eb7fa44c79c01db6c86f77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 23 Apr 2015 18:51:50 +0200 Subject: [PATCH 15/35] build-system/{cmake,glib-or-gtk}: Add #:validate-runpath? parameter. * guix/build-system/cmake.scm (cmake-build): Add #:validate-runpath? parameter and pass it to BUILDER. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise. --- guix/build-system/cmake.scm | 2 ++ guix/build-system/glib-or-gtk.scm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 2e6784251e..1bc1879be5 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -84,6 +84,7 @@ (tests? #t) (test-target "test") (parallel-build? #t) (parallel-tests? #f) + (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) (strip-flags ''("--strip-debug")) @@ -121,6 +122,7 @@ provides a 'CMakeLists.txt' file as its build system." #:test-target ,test-target #:parallel-build? ,parallel-build? #:parallel-tests? ,parallel-tests? + #:validate-runpath? ,validate-runpath? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? #:strip-flags ,strip-flags diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 85d01961a5..954c716893 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -127,6 +127,7 @@ (test-target "check") (parallel-build? #t) (parallel-tests? #t) + (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) (strip-flags ''("--strip-debug")) @@ -175,6 +176,7 @@ #:test-target ,test-target #:parallel-build? ,parallel-build? #:parallel-tests? ,parallel-tests? + #:validate-runpath? ,validate-runpath? #:patch-shebangs? ,patch-shebangs? #:strip-binaries? ,strip-binaries? #:strip-flags ,strip-flags From 477a752e897c41a08f141d2af724ba817338e914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Tue, 28 Apr 2015 15:29:17 +0800 Subject: [PATCH 16/35] gnu: cmake: Update to 3.2.2. * gnu/packages/cmake.scm (cmake): Update to 3.2.2. * gnu/packages/patches/cmake-fix-tests.patch: Skip test for BundleUtilities. --- gnu/packages/cmake.scm | 9 +++-- gnu/packages/patches/cmake-fix-tests.patch | 40 ++++++++++++---------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 1fb9241596..0dbb81bfb8 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2014 Ian Denhardt +;;; Copyright © 2015 Sou Bunnbu ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,7 @@ (define-public cmake (package (name "cmake") - (version "3.1.3") + (version "3.2.2") (source (origin (method url-fetch) (uri (string-append @@ -43,7 +44,7 @@ (version-major+minor version) "/cmake-" version ".tar.gz")) (sha256 - (base32 "1l662p9lscbzx9s85y86cynb9fn1rb2alqg4584wqq9gibxd7x25")) + (base32 "0y3w83al0vh9ll7fnqm3nx7l8hsl85k8iv9abxb791q36rp4xsdd")) (patches (list (search-patch "cmake-fix-tests.patch"))))) (build-system gnu-build-system) (arguments @@ -66,7 +67,8 @@ "Utilities/cmbzip2/Makefile-libbz2_so" "Utilities/Release/release_cmake.cmake" "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c" - "Tests/CMakeLists.txt") + "Tests/CMakeLists.txt" + "Tests/RunCMake/File_Generate/RunCMakeTest.cmake") (("/bin/sh") (which "sh")))) (alist-cons-before 'configure 'set-paths @@ -83,6 +85,7 @@ "./configure" (string-append "--prefix=" out) "--system-libs" + "--no-system-jsoncpp" ; not packaged yet ;; By default, the man pages and other docs land ;; in PREFIX/man and PREFIX/doc, but we want them ;; in share/{man,doc}. Note that unlike diff --git a/gnu/packages/patches/cmake-fix-tests.patch b/gnu/packages/patches/cmake-fix-tests.patch index 5327f3749a..f59e2cd625 100644 --- a/gnu/packages/patches/cmake-fix-tests.patch +++ b/gnu/packages/patches/cmake-fix-tests.patch @@ -1,6 +1,23 @@ ---- a/Tests/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ b/Tests/CMakeLists.txt 2013-03-20 22:58:02.000000000 +0100 -@@ -1706,16 +1706,17 @@ +--- cmake-3.2.2.orig/Tests/CMakeLists.txt 2015-04-14 01:09:00.000000000 +0800 ++++ cmake-3.2.2/Tests/CMakeLists.txt 2015-04-28 15:02:34.913039742 +0800 +@@ -342,10 +342,12 @@ + endif() + + # run test for BundleUtilities on supported platforms/compilers +- if(MSVC OR +- MINGW OR +- CMAKE_SYSTEM_NAME MATCHES "Linux" OR +- CMAKE_SYSTEM_NAME MATCHES "Darwin") ++# if(MSVC OR ++# MINGW OR ++# CMAKE_SYSTEM_NAME MATCHES "Linux" OR ++# CMAKE_SYSTEM_NAME MATCHES "Darwin") ++# This test fails on Guix: skip it. ++ if(FALSE) + if(NOT "${CMAKE_GENERATOR}" STREQUAL "Watcom WMake") + + add_test(BundleUtilities ${CMAKE_CTEST_COMMAND} +@@ -2257,16 +2259,17 @@ PASS_REGULAR_EXPRESSION "Could not find executable" FAIL_REGULAR_EXPRESSION "SegFault") @@ -27,19 +44,4 @@ +# PASS_REGULAR_EXPRESSION "Upload\\.xml") configure_file( - "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in" ---- a/Utilities/cmcurl/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 -+++ b/Utilities/cmcurl/CMakeLists.txt 2013-03-20 23:08:41.000000000 +0100 -@@ -729,8 +729,9 @@ - ADD_EXECUTABLE(LIBCURL Testing/curltest.c) - TARGET_LINK_LIBRARIES(LIBCURL cmcurl ${CMAKE_DL_LIBS}) - --IF(CMAKE_CURL_TEST_URL) -- ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) --ENDIF(CMAKE_CURL_TEST_URL) -+# This test requires network connectivity: skip it. -+#IF(CMAKE_CURL_TEST_URL) -+# ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) -+#ENDIF(CMAKE_CURL_TEST_URL) - - INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmcurl) + "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in" From e32316e62f54bbda07e88f22d97fc28b84eb70b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Tue, 28 Apr 2015 17:16:18 +0800 Subject: [PATCH 17/35] gnu: cmake: Disable parallel tests. * gnu/packages/cmake.scm (cmake)[arguments]: Add #:parallel-tests?. Set 'CTEST_OUTPUT_ON_FAILURE' to 'TRUE' in 'set-paths phase. --- gnu/packages/cmake.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 0dbb81bfb8..6f8b9f67e3 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -49,6 +49,7 @@ (build-system gnu-build-system) (arguments `(#:test-target "test" + #:parallel-tests? #f ; 3 test from RunCMake fails #:phases (alist-cons-before 'configure 'patch-bin-sh (lambda _ @@ -76,7 +77,9 @@ ;; Help cmake's bootstrap process to find system libraries (begin (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) - (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))) + (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")) + ;; Get verbose output from failed tests + (setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE"))) (alist-replace 'configure (lambda* (#:key outputs #:allow-other-keys) From b416c647e934c1a086a3cb534d31968e7ea53808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Thu, 30 Apr 2015 00:03:10 +0800 Subject: [PATCH 18/35] gnu: jack2: Add $libdir to the RUNPATH of all the binaries. * gnu/packages/audio.scm (jack2)[arguments]: Add #:phases. --- gnu/packages/audio.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 06f8bbdbea..593d47d7a1 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -520,7 +520,18 @@ synchronous execution of all clients, and low latency operation.") (arguments `(#:tests? #f ; no check target #:configure-flags '("--dbus" - "--alsa"))) + "--alsa") + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-linkflags + (lambda _ + ;; Add $libdir to the RUNPATH of all the binaries. + (substitute* "wscript" + ((".*CFLAGS.*-Wall.*" m) + (string-append m + " conf.env.append_unique('LINKFLAGS'," + "'-Wl,-rpath=" %output "/lib')\n")))))))) (inputs `(("alsa-lib" ,alsa-lib) ("dbus" ,dbus) From 7e35b9dd3ddb6ec4b9bed3c01a99fe1638e96c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 30 Apr 2015 13:31:59 +0200 Subject: [PATCH 19/35] gnu: gcc: Add $libdir to the RUNPATH of libvtv.so. * gnu/packages/gcc.scm (gcc-4.9): Inherit from GCC-4.8. [source]: Add 'gcc-libvtv-runpath.patch'. (gcc-5.1): Inherit from GCC-4.9. [source]: Use patches from GCC-4.9. * gnu/packages/patches/gcc-libvtv-runpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/gcc.scm | 48 ++++++++++--------- gnu/packages/patches/gcc-libvtv-runpath.patch | 15 ++++++ 3 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/gcc-libvtv-runpath.patch diff --git a/gnu-system.am b/gnu-system.am index 820e1e1e79..b2f5bbe833 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -420,6 +420,7 @@ dist_patch_DATA = \ gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ + gnu/packages/patches/gcc-libvtv-runpath.patch \ gnu/packages/patches/geoclue-config.patch \ gnu/packages/patches/ghostscript-runpath.patch \ gnu/packages/patches/gitolite-openssh-6.8-compat.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index dbce52e2f2..8804f3b12a 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -307,37 +307,39 @@ Go. It also includes runtime support libraries for these languages.") (package (inherit gcc-4.7) (version "4.8.4") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 - (package (inherit gcc-4.7) + (package (inherit gcc-4.8) (version "4.9.2") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810")) + (patches (map search-patch + '("gcc-arm-link-spec-fix.patch" + "gcc-libvtv-runpath.patch"))))))) (define-public gcc-5.1 - (package (inherit gcc-4.7) + (package (inherit gcc-4.9) (version "5.1.0") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) - (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp")) + (patches (origin-patches (package-source gcc-4.9))))))) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES." diff --git a/gnu/packages/patches/gcc-libvtv-runpath.patch b/gnu/packages/patches/gcc-libvtv-runpath.patch new file mode 100644 index 0000000000..df74363c83 --- /dev/null +++ b/gnu/packages/patches/gcc-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-4.9.2/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-4.9.2/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++AM_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ From 9e7594027d1b876248f75c01d1c06abc3b64ac57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 30 Apr 2015 13:43:55 +0200 Subject: [PATCH 20/35] gnu: gcc: Add link to upstream bug report. * gnu/packages/gcc.scm (gcc-4.8): Add link to bug report in comment. --- gnu/packages/gcc.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 8804f3b12a..c368b7df97 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -313,6 +313,10 @@ Go. It also includes runtime support libraries for these languages.") (sha256 (base32 "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a")) + + ;; ARM 'link' spec issue reported at + ;; and + ;; . (patches (list (search-patch "gcc-arm-link-spec-fix.patch"))))))) (define-public gcc-4.9 From a0a0b7162e497bf064eb06c07efd5da4cf95dbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Thu, 30 Apr 2015 14:29:05 +0200 Subject: [PATCH 21/35] gnu: wxwidgets: Set rpath in LDFLAGS. Fixes . * gnu/packages/wxwidgets.scm (wxwidgets): Add a make flag to set rpath to $out/lib via LDFLAGS. --- gnu/packages/wxwidgets.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 1f80130198..ee270ff105 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -62,6 +62,9 @@ (arguments '(#:configure-flags '("--with-regex=sys" "--with-libmspack" "--with-sdl") + #:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) ;; No 'check' target. #:tests? #f)) (home-page "https://www.wxwidgets.org/") From 90ea9863c8daa4cc91e8a972501e19058c70b81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Thu, 30 Apr 2015 16:30:41 +0200 Subject: [PATCH 22/35] gnu: serd: Set rpath via LDFLAGS. Fixes . * gnu/packages/rdf.scm (serd): Add a pre-configure phase setting $LDFLAGS to set the rpath to $out/lib. --- gnu/packages/rdf.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index 96a52fd93a..a4acfd0834 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -243,7 +243,16 @@ and triple stores.") (base32 "1gxbzqsm212wmn8qkdd3lbl6wbv7fwmaf9qh2nxa4yxjbr7mylb4")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) (home-page "http://drobilla.net/software/serd/") (synopsis "Library for RDF syntax supporting Turtle and NTriples") (description From 7e81a761e7c4843c016818bbf1637af9047e2028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Thu, 30 Apr 2015 16:32:30 +0200 Subject: [PATCH 23/35] gnu: sord: Set rpath via LDFLAGS. Fixes . * gnu/packages/rdf.scm (sord): Add a pre-configure phase setting $LDFLAGS to set the rpath to $out/lib. --- gnu/packages/rdf.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index a4acfd0834..f26b021e50 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -277,7 +277,16 @@ ideal (e.g. in LV2 implementations or embedded applications).") (base32 "0rq7vafdv4vsxi6xk9zf5shr59w3kppdhqbj78185rz5gp9kh1dx")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) (inputs `(("serd" ,serd))) (native-inputs From d80ee44237ac14f26d785c279b73610ea9d5f2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Thu, 30 Apr 2015 16:33:06 +0200 Subject: [PATCH 24/35] gnu: lilv: Set rpath via LDFLAGS. Fixes . * gnu/packages/audio.scm (lilv): Add a pre-configure phase setting $LDFLAGS to set the rpath to $out/lib. --- gnu/packages/audio.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 593d47d7a1..c5c1a77b2f 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -713,7 +713,16 @@ implementation of the Open Sound Control (OSC) protocol.") (base32 "0aj2plkx56iar8vzjbq2l7hi7sp0ml99m0h44rgwai2x4vqkk2j2")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))))))) ;; required by lilv-0.pc (propagated-inputs `(("serd" ,serd) From 9e63a388d91f73e2b82f8c4688f131680fe5f165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Thu, 30 Apr 2015 23:25:54 +0200 Subject: [PATCH 25/35] gnu: qt: Add patch for i686 build problem. See . * gnu/packages/patches/qt5-conflicting-typedefs.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/qt.scm (qt): Add the patch. --- gnu-system.am | 1 + .../patches/qt5-conflicting-typedefs.patch | 70 +++++++++++++++++++ gnu/packages/qt.scm | 3 +- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qt5-conflicting-typedefs.patch diff --git a/gnu-system.am b/gnu-system.am index b2f5bbe833..2692394519 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -529,6 +529,7 @@ dist_patch_DATA = \ 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-conflicting-typedefs.patch \ gnu/packages/patches/qt5-runpath.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ diff --git a/gnu/packages/patches/qt5-conflicting-typedefs.patch b/gnu/packages/patches/qt5-conflicting-typedefs.patch new file mode 100644 index 0000000000..751452c2db --- /dev/null +++ b/gnu/packages/patches/qt5-conflicting-typedefs.patch @@ -0,0 +1,70 @@ +See . + +diff --git a/qtwebengine/src/core/chromium_gpu_helper.cpp b/qtwebengine/src/core/chromium_gpu_helper.cpp +index c7c97e6..ef574ec 100644 +--- a/qtwebengine/src/core/chromium_gpu_helper.cpp ++++ b/qtwebengine/src/core/chromium_gpu_helper.cpp +@@ -40,13 +40,15 @@ + + #include "chromium_gpu_helper.h" + +-#include "content/common/gpu/gpu_channel_manager.h" +-#include "content/common/gpu/sync_point_manager.h" +-#include "content/gpu/gpu_child_thread.h" ++// Including gpu/command_buffer headers before content/gpu headers makes sure that ++// guards are defined to prevent duplicate definition errors with forward declared ++// GL typedefs cascading through content header includes. + #include "gpu/command_buffer/service/mailbox_manager.h" + #include "gpu/command_buffer/service/texture_manager.h" + +-#include // We need this for the Q_OS_QNX define. ++#include "content/common/gpu/gpu_channel_manager.h" ++#include "content/common/gpu/sync_point_manager.h" ++#include "content/gpu/gpu_child_thread.h" + + #ifdef Q_OS_QNX + #include "content/common/gpu/stream_texture_qnx.h" +diff --git a/qtwebengine/src/core/gl_surface_qt.cpp b/qtwebengine/src/core/gl_surface_qt.cpp +index 4fe2f21..5a27aa9 100644 +--- a/qtwebengine/src/core/gl_surface_qt.cpp ++++ b/qtwebengine/src/core/gl_surface_qt.cpp +@@ -49,8 +49,6 @@ + #include "base/logging.h" + #include "base/memory/scoped_ptr.h" + #include "content/common/gpu/image_transport_surface.h" +-#include "content/common/gpu/gpu_channel_manager.h" +-#include "content/common/gpu/gpu_command_buffer_stub.h" + #include "ui/gl/egl_util.h" + #include "ui/gl/gl_context.h" + #include "ui/gl/gl_implementation.h" +@@ -544,7 +542,9 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) + } // namespace gfx + + namespace content { +-scoped_refptr ImageTransportSurface::CreateNativeSurface(GpuChannelManager* manager, GpuCommandBufferStub* stub, const gfx::GLSurfaceHandle& handle) ++class GpuCommandBufferStub; ++class GpuChannelManager; ++scoped_refptr ImageTransportSurface::CreateNativeSurface(GpuChannelManager*, GpuCommandBufferStub*, const gfx::GLSurfaceHandle&) + { + QT_NOT_USED + return scoped_refptr(); +diff --git a/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h b/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h +index 04a3dc3..506cf00 100644 +--- a/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h ++++ b/qtwebengine/src/3rdparty/chromium/gpu/command_buffer/common/gles2_cmd_format.h +@@ -20,6 +20,7 @@ + #include "gpu/command_buffer/common/cmd_buffer_common.h" + #include "gpu/command_buffer/common/gles2_cmd_ids.h" + ++#ifndef GL_VERSION_1_5 + // GL types are forward declared to avoid including the GL headers. The problem + // is determining which GL headers to include from code that is common to the + // client and service sides (GLES2 or one of several GL implementations). +@@ -47,6 +48,7 @@ typedef signed long long int GLsizeiptr; + typedef khronos_intptr_t GLintptr; + typedef khronos_ssize_t GLsizeiptr; + #endif ++#endif + + namespace gpu { + namespace gles2 { diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 8de1ffe398..3bc3145e8d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -104,7 +104,8 @@ X11 (yet).") (sha256 (base32 "0q6qzakq8xihw91xv310qi3vyylq7x2bzdkjgy8sqxii2lgbjzhv")) - (patches (list (search-patch "qt5-runpath.patch"))) + (patches (list (search-patch "qt5-conflicting-typedefs.patch") + (search-patch "qt5-runpath.patch"))) (snippet '(begin ;; Remove broken symlinks. From ea7f3349ba59cb56087d3ca3ab4c101f372d0eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 16:01:49 +0200 Subject: [PATCH 26/35] gnu: ganv: Set the RUNPATH of binaries to $libdir. * gnu/packages/gtk.scm (ganv)[arguments]: Add 'set-ldflags' phase. --- gnu/packages/gtk.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 0f7ba863e8..8a5a3099bf 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -230,13 +230,21 @@ functions which were removed.") (source (origin (method url-fetch) (uri (string-append "http://download.drobilla.net/ganv-" - version - ".tar.bz2")) + version ".tar.bz2")) (sha256 (base32 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l")))) (build-system waf-build-system) - (arguments `(#:tests? #f)) ; no check target + (arguments + `(#:phases (alist-cons-before + 'configure 'set-ldflags + (lambda* (#:key outputs #:allow-other-keys) + ;; Allow 'bin/ganv_bench' to find libganv-1.so. + (setenv "LDFLAGS" + (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") "/lib"))) + %standard-phases) + #:tests? #f)) ; no check target (inputs `(("gtk" ,gtk+-2) ("gtkmm" ,gtkmm-2))) From abcbda48c20da3d621e8170f8de30a575f080b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 16:05:40 +0200 Subject: [PATCH 27/35] packages: Add '%hydra-supported-systems'. * build-aux/hydra/gnu-system.scm (%hydra-supported-systems): Remove. * guix/packages.scm (%hydra-supported-systems): New variable. --- build-aux/hydra/gnu-system.scm | 4 ---- guix/packages.scm | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 9a47b4f423..c612ff1f12 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -210,10 +210,6 @@ valid." #f))))) -(define %hydra-supported-systems - ;; This is the list of system types for which build slaves are available. - '("x86_64-linux" "i686-linux" "mips64el-linux")) - ;;; ;;; Hydra entry point. ;;; diff --git a/guix/packages.scm b/guix/packages.scm index 0e4cce17e1..a979f31a32 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -95,6 +95,7 @@ package-grafts %supported-systems + %hydra-supported-systems supported-package? &package-error @@ -210,6 +211,11 @@ corresponds to the arguments expected by `set-path-environment-variable'." ;; expect all packages to build successfully here. '("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")) +(define %hydra-supported-systems + ;; This is the list of system types for which build slaves are available. + (delete "armhf-linux" %supported-systems)) + + ;; A package. (define-record-type* package make-package From 75c5475f31963a171e89d83b372a4858c8741498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 16:10:08 +0200 Subject: [PATCH 28/35] list-packages: Add status link only for systems supported on Hydra. * build-aux/list-packages.scm (package->sxml)[status]: Intersect (package-transitive-supported-systems package) with %HYDRA-SUPPORTED-SYSTEMS. --- build-aux/list-packages.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm index f3e4ac2846..c4f445291b 100755 --- a/build-aux/list-packages.scm +++ b/build-aux/list-packages.scm @@ -167,7 +167,11 @@ decreasing, is 1." ,system)) `(div "status: " - ,(list-join (map url (package-transitive-supported-systems package)) + ,(list-join (map url + (lset-intersection + string=? + %hydra-supported-systems + (package-transitive-supported-systems package))) " "))) (define (package-logo name) From e206f57e95a66d0eed51a7823ad3d14b748083e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 17:34:03 +0200 Subject: [PATCH 29/35] gnu: mariadb: Remove now unneeded workaround. This has been redundant since 21e583d. * gnu/packages/databases.scm (mariadb)[arguments]: Remove LDFLAGS definition. --- gnu/packages/databases.scm | 2 -- 1 file changed, 2 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index aa0aa0d49f..5daf7ecba1 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -191,8 +191,6 @@ Language.") 'configure 'pre-configure (lambda _ (setenv "CONFIG_SHELL" (which "sh")) - ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so. - (setenv "LDFLAGS" "-lgcc_s") #t)) (add-after 'install 'post-install From 78bed82d193d73488f18d76165aa3f809122311f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 17:38:09 +0200 Subject: [PATCH 30/35] check-available-binaries: Use %HYDRA-SUPPORTED-SYSTEMS. * build-aux/check-available-binaries.scm: Use %HYDRA-SUPPORTED-SYSTEMS instead of %SUPPORTED-SYSTEMS. --- build-aux/check-available-binaries.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm index bc6207eb2a..04f88b7d0c 100644 --- a/build-aux/check-available-binaries.scm +++ b/build-aux/check-available-binaries.scm @@ -33,7 +33,7 @@ (let* ((native (append-map (lambda (system) (map (cut package-derivation store <> system) (list %bootstrap-tarballs emacs))) - %supported-systems)) + %hydra-supported-systems)) (cross (map (cut package-cross-derivation store %bootstrap-tarballs <>) '("mips64el-linux-gnuabi64"))) From cb151c68bfdb207d6029402c4a1c004ebd630d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 17:38:44 +0200 Subject: [PATCH 31/35] gnu: polkit-qt: Add $libdir to RUNPATH. * gnu/packages/polkit.scm (polkit-qt)[arguments]: Add #:configure-flags. --- gnu/packages/polkit.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm index 572d52404b..be7302ed49 100644 --- a/gnu/packages/polkit.scm +++ b/gnu/packages/polkit.scm @@ -86,7 +86,12 @@ for unprivileged applications.") (native-inputs `(("pkg-config", pkg-config))) (arguments - `(#:tests? #f)) ; there is a test subdirectory, but no test target + `(#:configure-flags (list (string-append "-DCMAKE_INSTALL_RPATH=" + (assoc-ref %outputs "out") + "/lib:" + (assoc-ref %outputs "out") + "/lib64")) + #:tests? #f)) ; there is a test subdirectory, but no test target (home-page "http://api.kde.org/kdesupport-api/polkit-qt-1-apidocs/") (synopsis "Qt frontend to the polkit library") (description "Polkit-qt is a library that lets developers use the From 868ef9aec79fac92efbe885120331310592fef98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 1 May 2015 17:39:39 +0200 Subject: [PATCH 32/35] bash completion: Complete long options with no short variant. * etc/completion/bash/guix (_guix_complete_option): Change grep regexp to match options that don't have a short option name. --- etc/completion/bash/guix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 2a3fa1201e..e4d9a497b3 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -35,7 +35,7 @@ _guix_complete_installed_package () _guix_complete_option () { local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \ - | grep '^ -' \ + | grep '^ \+-' \ | sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )" compopt -o nospace COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}")) From 7e31978b72120a26c769ecddba83405b223e045d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Tue, 28 Apr 2015 15:08:47 +0200 Subject: [PATCH 33/35] gnu: mesa: Add libva input. There is a circular dependency between Mesa and libVA, so we use a libva-no-mesa package that builds libVA without GLX and EGL support, and use that for building Mesa. * gnu/packages/gl.scm (libva-for-mesa): New variable. (mesa): Add as input. --- gnu/packages/gl.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index e640f83756..ea38f1edfc 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -21,11 +21,13 @@ (define-module (gnu packages gl) #:use-module (ice-9 match) + #:use-module (guix build utils) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages flex) @@ -37,6 +39,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages fontutils) #:use-module (gnu packages guile) + #:use-module (gnu packages video) #:use-module (gnu packages xdisorg)) (define-public glu @@ -159,6 +162,23 @@ Polygon meshes, and Extruded polygon meshes") also known as DXTn or DXTC) for Mesa.") (license l:expat))) +;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation; +;;; LibVA itself depends on Mesa. We use the following to solve the circular +;;; dependency. +(define libva-without-mesa + ;; Delay to work around circular import problem. + (delay + (package + (inherit libva) + (name "libva-without-mesa") + (inputs (alist-delete "mesa" (package-inputs libva))) + (arguments + (strip-keyword-arguments + '(#:make-flags) + (substitute-keyword-arguments (package-arguments libva) + ((#:configure-flags flags) + '(list "--disable-glx" "--disable-egl")))))))) + (define-public mesa (package (name "mesa") @@ -187,8 +207,8 @@ also known as DXTn or DXTC) for Mesa.") ("dri3proto" ,dri3proto) ("presentproto" ,presentproto) ("expat" ,expat) + ("libva" ,(force libva-without-mesa)) ("libxml2" ,libxml2) - ;; TODO: Add 'libva' ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support ("makedepend" ,makedepend) ("s2tc" ,s2tc))) From 0272ee499dbd985b2368c55530b16827b7926232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 25 Apr 2015 12:02:33 +0200 Subject: [PATCH 34/35] gnu: mesa: Update to 10.5.4. * gnu/packages/gl.scm (mesa): Update version to 10.5.4. Add libxvmc to inputs. Remove python, gettext, flex, and bison from native-inputs. Remove hack that was necessary to prevent rebuilding parts of the build system. --- gnu/packages/gl.scm | 93 ++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 52 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index ea38f1edfc..afda76d792 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -182,15 +182,15 @@ also known as DXTn or DXTC) for Mesa.") (define-public mesa (package (name "mesa") - (version "10.4.0") + (version "10.5.4") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.freedesktop.org/pub/mesa/" - version "/MesaLib-" version ".tar.bz2")) + version "/mesa-" version ".tar.xz")) (sha256 (base32 - "069j4ck51hc70gryhw3z0rkyhhl0bnhbks4xg1wqqw56l7rxz9wq")))) + "00v89jna7m6r2w1yrnx09isc97r2bd1hkn4jib445n1078zp47mm")))) (build-system gnu-build-system) (propagated-inputs `(("glproto" ,glproto) @@ -201,6 +201,7 @@ also known as DXTn or DXTC) for Mesa.") ("libxfixes" ,libxfixes) ("libxshmfence" ,libxshmfence) ("libxxf86vm" ,libxxf86vm))) + ;; TODO: Add vdpau. (inputs `(("udev" ,eudev) ("dri2proto" ,dri2proto) @@ -210,14 +211,11 @@ also known as DXTn or DXTC) for Mesa.") ("libva" ,(force libva-without-mesa)) ("libxml2" ,libxml2) ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support + ("libxvmc" ,libxvmc) ("makedepend" ,makedepend) ("s2tc" ,s2tc))) (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gnu-gettext) - ("flex" ,flex) - ("bison" ,bison) - ("python" ,python-2))) ; incompatible with Python 3 (print syntax) + `(("pkg-config" ,pkg-config))) (arguments `(#:configure-flags '(;; drop r300 from default gallium drivers, as it requires llvm @@ -239,51 +237,42 @@ also known as DXTn or DXTC) for Mesa.") (_ '("--with-dri-drivers=nouveau,r200,radeon,swrast")))) #:phases (alist-cons-after - 'unpack 'add-missing-m4-files + 'unpack 'patch-create_test_cases (lambda _ - ;; When these files are missing, make tries to rebuild - ;; several parts of the build system. - (zero? (system* "touch" "--date=@0" - "m4/libtool.m4" "m4/ltoptions.m4" - "m4/ltsugar.m4" "m4/ltversion.m4" - "m4/lt~obsolete.m4"))) - (alist-cons-after - 'unpack 'patch-create_test_cases - (lambda _ - (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py" - (("/usr/bin/env bash") (which "bash")))) - (alist-cons-before - 'build 'fix-dlopen-libnames - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((s2tc (assoc-ref inputs "s2tc")) - (udev (assoc-ref inputs "udev")) - (out (assoc-ref outputs "out"))) - ;; Remain agnostic to .so.X.Y.Z versions while doing - ;; the substitutions so we're future-safe. - (substitute* - '("src/gallium/auxiliary/util/u_format_s3tc.c" - "src/mesa/main/texcompress_s3tc.c") - (("\"libtxc_dxtn\\.so") - (string-append "\"" s2tc "/lib/libtxc_dxtn.so"))) - (substitute* "src/gallium/targets/egl-static/egl_st.c" - (("\"libglapi\"") - (string-append "\"" out "/lib/libglapi\""))) - (substitute* "src/loader/loader.c" - (("dlopen\\(\"libudev\\.so") - (string-append "dlopen(\"" udev "/lib/libudev.so"))) - (substitute* "src/glx/dri_common.c" - (("dlopen\\(\"libGL\\.so") - (string-append "dlopen(\"" out "/lib/libGL.so"))) - (substitute* "src/egl/drivers/dri2/egl_dri2.c" - (("\"libglapi\\.so") - (string-append "\"" out "/lib/libglapi.so"))) - (substitute* "src/gbm/main/backend.c" - ;; No need to patch the gbm_gallium_drm.so reference; - ;; it's never installed since Mesa removed its - ;; egl_gallium support. - (("\"gbm_dri\\.so") - (string-append "\"" out "/lib/dri/gbm_dri.so"))))) - %standard-phases))))) + (substitute* "src/glsl/tests/lower_jumps/create_test_cases.py" + (("/usr/bin/env bash") (which "bash")))) + (alist-cons-before + 'build 'fix-dlopen-libnames + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((s2tc (assoc-ref inputs "s2tc")) + (udev (assoc-ref inputs "udev")) + (out (assoc-ref outputs "out"))) + ;; Remain agnostic to .so.X.Y.Z versions while doing + ;; the substitutions so we're future-safe. + (substitute* + '("src/gallium/auxiliary/util/u_format_s3tc.c" + "src/mesa/main/texcompress_s3tc.c") + (("\"libtxc_dxtn\\.so") + (string-append "\"" s2tc "/lib/libtxc_dxtn.so"))) + (substitute* "src/gallium/targets/egl-static/egl_st.c" + (("\"libglapi\"") + (string-append "\"" out "/lib/libglapi\""))) + (substitute* "src/loader/loader.c" + (("dlopen\\(\"libudev\\.so") + (string-append "dlopen(\"" udev "/lib/libudev.so"))) + (substitute* "src/glx/dri_common.c" + (("dlopen\\(\"libGL\\.so") + (string-append "dlopen(\"" out "/lib/libGL.so"))) + (substitute* "src/egl/drivers/dri2/egl_dri2.c" + (("\"libglapi\\.so") + (string-append "\"" out "/lib/libglapi.so"))) + (substitute* "src/gbm/main/backend.c" + ;; No need to patch the gbm_gallium_drm.so reference; + ;; it's never installed since Mesa removed its + ;; egl_gallium support. + (("\"gbm_dri\\.so") + (string-append "\"" out "/lib/dri/gbm_dri.so"))))) + %standard-phases)))) (home-page "http://mesa3d.org/") (synopsis "OpenGL implementation") (description "Mesa is a free implementation of the OpenGL specification - From 5f6887e839c10f0c905969d07baca4e03f453e82 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2015 17:11:39 +0200 Subject: [PATCH 35/35] gnu: gcj: Remove broken symlink and conflicting files. * gnu/packages/gcc.scm (gcj)[arguments]: Add a build phase to remove a broken symlink and generic stump binaries. --- gnu/packages/gcc.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index c368b7df97..957917bf0b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -444,7 +444,18 @@ Go. It also includes runtime support libraries for these languages.") (string-append jvm "/lib/tools.jar"))) (chmod target #o755) #t)) - ,phases)))))) + (alist-cons-after + 'install 'remove-broken-or-conflicting-files + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (for-each + delete-file + (append (find-files (string-append out "/lib/jvm/jre/lib") + "libjawt.so") + (find-files (string-append out "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) + #t) + ,phases))))))) (define ecj-bootstrap-4.8 (origin