GNU bug report logs - #36813
'program-file' does not respect 'system' and 'target'

Previous Next

Package: guix;

Reported by: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)

Date: Thu, 25 Jul 2019 23:29:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36813: closed ('program-file' does not respect 'system' and
 'target')
Date: Fri, 26 Jul 2019 23:10:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 27 Jul 2019 01:09:20 +0200
with message-id <87ef2cjsv3.fsf <at> gnu.org>
and subject line Re: bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords
has caused the debbugs.gnu.org bug report #36813,
regarding 'program-file' does not respect 'system' and 'target'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36813: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36813
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: bug-guix <at> gnu.org
Cc: ludovic.courtes <at> inria.fr
Subject: 'lower-gexp' does not respect 'system' or 'target' keywords
Date: Thu, 25 Jul 2019 19:25:45 -0400
[Message part 3 (text/plain, inline)]
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

[output (text/plain, inline)]
jakob <at> Epsilon ~ $ guile ~/test.scm 
(primitive-load /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to-system.scm)
jakob <at> Epsilon ~ $ cat /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to-system.scm
#!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile --no-auto-compile
!#
...
jakob <at> 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
[Message part 5 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]
[Message part 7 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: "Jakob L. Kreuze" <zerodaysfordays.sdf.org <at> sdf.org>
Cc: zerodaysfordays <at> sdf.lonestar.org, 36813-done <at> debbugs.gnu.org
Subject: Re: bug#36813: 'lower-gexp' does not respect 'system' or 'target'
 keywords
Date: Sat, 27 Jul 2019 01:09:20 +0200
"Jakob L. Kreuze" <zerodaysfordays.sdf.org <at> sdf.org> skribis:

> Apologies, I should clarify -- the Guile for the S-Expression appears to be fine, but the Guile referenced in the shebang of the ungexp'd program-file does not reflect the system.

Got it now.  This is fixed by 2e8cabb8d630a8423e2e5a3bf150c1c0310b945d.

Thanks!

Ludo’.


This bug report was last modified 5 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.