all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 'patchelf' doesn't change shared libraries
@ 2013-07-14 13:33 Nikita Karetnikov
  2013-07-14 13:44 ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Nikita Karetnikov @ 2013-07-14 13:33 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

I've attached a patch that fails with this error

/nix/store/4g873aa2h6c8c2qfsiw0j1cbvhginx4d-ghc-bin-7.0.1/lib/ghc-7.0.1/ghc-pkg: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
make[1]: *** [install_packages] Error 127
make: *** [install] Error 2

Why does 'patchelf' fail to adjust shared libraries?  (Note that
'--set-interpreter' works fine.)


[-- Attachment #1.2: ghc.scm --]
[-- Type: text/plain, Size: 4560 bytes --]

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (gnu packages ghc)
  #:use-module ((guix licenses) #:select (bsd-style))
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bootstrap)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages patchelf)
  #:use-module (gnu packages perl))

(define-public ghc-7.0.1-bin
  (package
    (name "ghc-bin")
    ;; 7.0.2--7.6.3
    (version "7.0.1")
    (source
     (origin
      (method url-fetch)
      ;; XXX: Support other platforms.
      (uri (string-append "http://www.haskell.org/ghc/dist/"
                          version "/ghc-" version
                          "-i386-unknown-linux.tar.bz2"))
      (sha256
       (base32
        "1cc9ih3h804gj53vf1xabg4155m6bz5r468mjsv54kckmabgsmav"))))
    (build-system gnu-build-system)
    (arguments
     `(#:modules ((guix build gnu-build-system)
                  (guix build utils)
                  (srfi srfi-1))
       #:phases (alist-cons-before
                 'configure 'pre-configure
                 (lambda _
                   (let ((gmp (format #f "~a/lib"
                                      (assoc-ref %build-inputs "gmp")))
                         (linker (format #f "~a~a"
                                         (assoc-ref %build-inputs "libc")
                                         ,(glibc-dynamic-linker)))
                         (ncurses (format #f "~a/lib"
                                          (assoc-ref %build-inputs "ncurses"))))
                     (begin (substitute* '("configure"
                                           "mk/config.mk.in"
                                           "utils/ghc-pkg/ghc.mk"
                                           "inplace/bin/mkdirhier"
                                           "utils/ghc-pkg/ghc.mk")
                              (("/bin/sh") (which "sh"))
                              (("/usr/local/bin/bash") (which "sh")))

                            (substitute* "configure"
                              (("utils/ghc-pwd/ghc-pwd") (which "pwd")))

                            ;; XXX: The following doesn't change shared libs.
                            (every (lambda (file)
                                     (zero?
                                      (system (format #f
                                                      "~a ~a ~a ~a ~a:~a ~a"
                                                      (which "patchelf")
                                                      "--set-interpreter"
                                                      linker
                                                      "--set-rpath"
                                                      gmp
                                                      ncurses
                                                      file))))
                                   (filter executable-file?
                                           (find-files "utils" ""))))))

                 (alist-delete 'build %standard-phases))
       #:tests? #f))
    (inputs
     `(("gmp" ,gmp)
       ("libc" ,glibc)
       ("ncurses" ,ncurses)
       ("patchelf" ,patchelf)
       ("perl" ,perl)))
    (home-page "http://www.haskell.org/ghc/")
    (synopsis "Haskell compiler and interactive environment")
    (description
     "This is a binary distribution of GHC, a compiler and interactive
environment for the Haskell functional programming language.")
    (license (bsd-style "file://LICENSE"
                        "See LICENSE in the distribution."))))

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-08-21  5:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-14 13:33 'patchelf' doesn't change shared libraries Nikita Karetnikov
2013-07-14 13:44 ` Ludovic Courtès
2013-07-14 15:10   ` Nikita Karetnikov
2013-07-15 22:01     ` Ludovic Courtès
2013-07-16 17:55       ` 'substitute*' fails with "string contains #\nul character" (was: 'patchelf' doesn't change shared libraries) Nikita Karetnikov
2013-07-16 19:07         ` 'substitute*' fails with "string contains #\nul character" Ludovic Courtès
2013-08-05 21:20         ` Nikita Karetnikov
2013-08-15 10:37           ` Ludovic Courtès
2013-08-18  5:57             ` Nikita Karetnikov
2013-08-18 22:13               ` Ludovic Courtès
2013-08-18 23:53                 ` Nikita Karetnikov
2013-08-19 11:22                   ` Ludovic Courtès
2013-08-20  5:42                     ` Nikita Karetnikov
2013-08-20  7:23                       ` Ludovic Courtès
2013-08-21  5:15                         ` Nikita Karetnikov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.