From: Tomas Volf <~@wolfsden.cz>
To: "Wicki Gabriel (wicg)" <wicg@zhaw.ch>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: 32-bit Python interpreter on a 64-bit system (ARM)
Date: Tue, 12 Dec 2023 16:56:57 +0100 [thread overview]
Message-ID: <ZXiCySfYihGiyVMk@ws> (raw)
In-Reply-To: <ZR0P278MB02680948F71CE4ED0871F49FC18EA@ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]
On 2023-12-12 15:09:52 +0000, Wicki Gabriel (wicg) wrote:
> Hi
>
> Thanks for the input, Csepp, this seems to be exactly what I was looking for!
>
> Now I include the altered package like so:
> `
>
> (package
> (name foo)
> ...
> (propagated-inputs
> (list
> (with-parameters ((%current-system "armhf-linux"))
> some-package)))
> ...
> )
>
> `
>
> But this produces the following error message when building package "foo". What am I missing? I am able to ,lower and ,build the (with-parameters) package in a repl so i guess the expression itself is fine?
I cannot say what you are doing wrong, but my interest got piqued so I gave it a
try as well. It works for me:
$ guix build --no-offload -f /tmp/test.scm
[..]
/gnu/store/867m8dkv9hzsl4c1nqrj1nzg502a4l3c-hello-2.10
$ file /gnu/store/867m8dkv9hzsl4c1nqrj1nzg502a4l3c-hello-2.10/bin/python-native/bin/python3.10
/gnu/store/867m8dkv9hzsl4c1nqrj1nzg502a4l3c-hello-2.10/bin/python-native/bin/python3.10: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
$ file /gnu/store/867m8dkv9hzsl4c1nqrj1nzg502a4l3c-hello-2.10/bin/python-i686/bin/python3.10
/gnu/store/867m8dkv9hzsl4c1nqrj1nzg502a4l3c-hello-2.10/bin/python-i686/bin/python3.10: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /gnu/store/0hr9jpczkcgpgqkhf4q4868xd57h5a62-glibc-2.35/lib/ld-linux.so.2, for GNU/Linux 2.6.32, stripped
So for me it seems to work. My package definition (adjusted hello package from
the cookbook), maybe you can use it as a starting point:
(use-modules (gnu)
(gnu packages)
(gnu packages python)
(guix build-system gnu)
(guix download)
(guix gexp)
(guix licenses)
(guix packages))
(package
(name "hello")
(version "2.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/hello/hello-" version
".tar.gz"))
(sha256
(base32
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(inputs `(("python-native" ,python)
("python-i686" ,(with-parameters ((%current-system "i686-linux"))
python))))
(build-system gnu-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'link-pythons
(lambda* (#:key inputs #:allow-other-keys)
(symlink (assoc-ref inputs "python-native")
(string-append #$output "/bin/python-native"))
(symlink (assoc-ref inputs "python-i686")
(string-append #$output "/bin/python-i686")))))))
(synopsis "Hello, GNU world: An example GNU package")
(description
"GNU Hello prints the message \"Hello, world!\" and then exits. It
serves as an example of standard GNU coding practices. As such, it supports
command-line arguments, multiple languages, and so on.")
(home-page "https://www.gnu.org/software/hello/")
(license gpl3+))
Hope this helps,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-12-12 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 15:40 32-bit Python interpreter on a 64-bit system (ARM) Wicki Gabriel (wicg)
2023-12-10 8:03 ` Csepp
2023-12-12 15:09 ` Wicki Gabriel (wicg)
2023-12-12 15:56 ` Tomas Volf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZXiCySfYihGiyVMk@ws \
--to=~@wolfsden.cz \
--cc=help-guix@gnu.org \
--cc=wicg@zhaw.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.