From mboxrd@z Thu Jan 1 00:00:00 1970 From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Subject: bug#36813: 'lower-gexp' does not respect 'system' or 'target' keywords Date: Thu, 25 Jul 2019 19:25:45 -0400 Message-ID: <87imrp3ddy.fsf@sdf.lonestar.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42462) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqnAW-00039v-6U for bug-guix@gnu.org; Thu, 25 Jul 2019 19:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqnAU-0006Z8-VH for bug-guix@gnu.org; Thu, 25 Jul 2019 19:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60019) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqnAU-0006Yw-Qc for bug-guix@gnu.org; Thu, 25 Jul 2019 19:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqnAU-0007Bj-Ku for bug-guix@gnu.org; Thu, 25 Jul 2019 19:29:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:41972) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqnA9-00039g-8W for bug-guix@gnu.org; Thu, 25 Jul 2019 19:28:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqnA6-0006Pc-Oa for bug-guix@gnu.org; Thu, 25 Jul 2019 19:28:41 -0400 Received: from ol.sdf.org ([205.166.94.20]:58404 helo=mx.sdf.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hqnA6-0006Mg-FN for bug-guix@gnu.org; Thu, 25 Jul 2019 19:28:38 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 36813@debbugs.gnu.org Cc: ludovic.courtes@inria.fr --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=output Content-Transfer-Encoding: quoted-printable Content-Description: Command-line output. jakob@Epsilon ~ $ guile ~/test.scm=20 (primitive-load /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to-syste= m.scm) jakob@Epsilon ~ $ cat /gnu/store/v7v1b7375j9j82dvfycv56v36nv5jq3y-switch-to= -system.scm #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile --no-au= to-compile !# ... jakob@Epsilon ~ $ file /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.= 2.4/bin/guile /gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile: ELF 64-b= it LSB executable, x86-64, version 1 (SYSV), dynamically linked, interprete= r /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-6= 4.so.2, for GNU/Linux 2.6.32, not stripped --=-=-= Content-Type: text/plain 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 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl06OnkACgkQ9Qb9Fp2P 2VrvoRAAhubsIhquhACxwIPqjeu1/P76U5wKT8NdxAvtNB5qXQB7ZRbmzxHmNwfO vWIdb/fbxi1Euwn6uGESg52EGJFbmKeNhL1Xw6JyruomEMNHTTkwAY1CNxJic+t2 5It8ThQK6GgZtJNllmODTAe4KJRzCs7d/TKo6yw4Y5R/xpJeX2z4m65LiSsfgHuT VCYfztlQGCdwaOVDoItkGNeqxb/75z8yOUfY/GmBkxw0FnY4iLQTSr9gL7ibTKMQ JQOoHEFoqv1TKeAGk8Y8JMffEhvVlNMxpbYQ9wSkcQhGLO71tiE/hRo146LpL67i dpm5mBccGKwE0LRZHKwf/wgxBN5hvT/kt3Ssb3l4iHvpVT6qe6OrB67f4hZcXaNA hU8FtQ+ptFCZbSwC4r2Dw5akdsMJlFdVVQgupUVs9VKUST+IEzBfRabprOOvDx74 FE1OhF7MEHs8hkjWXJYfaPLTiIjVDQ4GAG6LP7rp/WZ8GUPAvJyenD3L+G1+p2nc Lhqx+oV0u7xX0X53FUWx7+hXabUm9zl/j8u1QgjpYOrlI+7mqLf0yD8m+hV2nelK cj+HfR59yYMiuh8N+MqggfS8nRptzxI2YzlJ5oeAYfN+0VKmv2uaNqLsMIfJfliw hf3LBz05NjGXfsdaV3DBeOzeYaOdlT+EhQq/8UT5jsyN9wi0/oQ= =sWp3 -----END PGP SIGNATURE----- --==-=-=--