[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 32-bit Python interpreter on a 64-bit system (ARM)
From: |
Tomas Volf |
Subject: |
Re: 32-bit Python interpreter on a 64-bit system (ARM) |
Date: |
Tue, 12 Dec 2023 16:56:57 +0100 |
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.
signature.asc
Description: PGP signature