[Top][All Lists]

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

bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords

From: Jakob L. Kreuze
Subject: bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords
Date: Thu, 25 Jul 2019 19:25:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)


I believe there is an issue with 'lower-gexp'. Running the following
snippet to lower a G-Expression for "i686-linux" yields output that
references store paths built for x86_64. In this case, the Guile
interpreter used is an x86_64 binary.

#+BEGIN_SRC scheme
(define (display-exp exp)
  (mlet* %store-monad ((lowered (lower-gexp exp
                                            #:system "i686-linux"
                                            #:target "i686-linux"))
                       (to-build -> (cons (lowered-gexp-guile lowered)
                                          (lowered-gexp-inputs lowered)))
                       (_ (built-derivations to-build)))
    (return (format #t "~a~%" (lowered-gexp-sexp lowered)))))

(with-store store
  (run-with-store store
    (display-exp #~(primitive-load #$(switch-system-program %system)))))

jakob@Epsilon ~ $ guile ~/test.scm 
jakob@Epsilon ~ $ cat 
jakob@Epsilon ~ $ file 
/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile: ELF 64-bit 
LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter 
 for GNU/Linux 2.6.32, not stripped
This doesn't seem to be an issue if '%current-system' is parameterized,
as in the following.

#+BEGIN_SRC scheme
(parameterize ((%current-system "i686-linux"))
  (with-store store
    (run-with-store store
      (display-exp #~(primitive-load #$(switch-system-program %system))))))


Attachment: signature.asc
Description: PGP signature

reply via email to

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