all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords
@ 2019-07-25 23:25 Jakob L. Kreuze
  2019-07-26  8:21 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Jakob L. Kreuze @ 2019-07-25 23:25 UTC (permalink / raw)
  To: 36813; +Cc: ludovic.courtes


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

Hi,

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)))))
#+END_SRC


[-- Attachment #1.2: Command-line output. --]
[-- Type: text/plain, Size: 663 bytes --]

jakob@Epsilon ~ $ guile ~/test.scm 
(primitive-load /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to-system.scm)
jakob@Epsilon ~ $ cat /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to-system.scm
#!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile --no-auto-compile
!#
...
jakob@Epsilon ~ $ file /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile
/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

[-- Attachment #1.3: Type: text/plain, Size: 309 bytes --]


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))))))
#+END_SRC

Regards,
Jakob

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

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

end of thread, other threads:[~2019-07-27 17:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-25 23:25 bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords Jakob L. Kreuze
2019-07-26  8:21 ` Ludovic Courtès
2019-07-26 14:30   ` Jakob L. Kreuze
2019-07-26 15:28     ` Ludovic Courtès
2019-07-26 15:37       ` Jakob L. Kreuze
2019-07-26 15:41         ` Jakob L. Kreuze
2019-07-26 23:09           ` Ludovic Courtès
2019-07-27 17:47             ` Jakob L. Kreuze

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.