all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Debugging missing architecture support
@ 2024-02-14 13:26 Konrad Hinsen
  2024-02-14 18:12 ` Efraim Flashner
  2024-02-14 20:26 ` Saku Laesvuori
  0 siblings, 2 replies; 9+ messages in thread
From: Konrad Hinsen @ 2024-02-14 13:26 UTC (permalink / raw)
  To: Guix Devel

Hi Guix experts,

in trying to build a Docker image for ARM64 (aarch64-linux), I am
hitting errors of the kind

  "package git-annex@10.20230926 does not support aarch64-linux"

There doesn't seem to be anything specifically in the package
definitions that precludes building for aarch64-linux, so I suspect it's
either a dependency or the build system that lacks the required support.

How would I go about debugging such issues? Maybe the causes are simple
and I can fix them. But I don't even know where to start.

Cheers,
  Konrad.


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

* Re: Debugging missing architecture support
  2024-02-14 13:26 Debugging missing architecture support Konrad Hinsen
@ 2024-02-14 18:12 ` Efraim Flashner
  2024-02-14 20:33   ` Ricardo Wurmus
  2024-02-14 20:26 ` Saku Laesvuori
  1 sibling, 1 reply; 9+ messages in thread
From: Efraim Flashner @ 2024-02-14 18:12 UTC (permalink / raw)
  To: Konrad Hinsen; +Cc: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On Wed, Feb 14, 2024 at 02:26:46PM +0100, Konrad Hinsen wrote:
> Hi Guix experts,
> 
> in trying to build a Docker image for ARM64 (aarch64-linux), I am
> hitting errors of the kind
> 
>   "package git-annex@10.20230926 does not support aarch64-linux"
> 
> There doesn't seem to be anything specifically in the package
> definitions that precludes building for aarch64-linux, so I suspect it's
> either a dependency or the build system that lacks the required support.
> 
> How would I go about debugging such issues? Maybe the causes are simple
> and I can fix them. But I don't even know where to start.

Currently GHC is only supported on i686 and x86_64.

(use-modules (gnu packages)(guix packages))
(supported-package? (specification->package "git-annex"))
$1 = ("x86_64-linux" "i686-linux")

As far as tracking back from git-annex to ghc to see that it's not
supported on aarch64, I'm not sure how you would find that information.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

* Re: Debugging missing architecture support
  2024-02-14 13:26 Debugging missing architecture support Konrad Hinsen
  2024-02-14 18:12 ` Efraim Flashner
@ 2024-02-14 20:26 ` Saku Laesvuori
  2024-02-15 10:29   ` Konrad Hinsen
  1 sibling, 1 reply; 9+ messages in thread
From: Saku Laesvuori @ 2024-02-14 20:26 UTC (permalink / raw)
  To: Konrad Hinsen; +Cc: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

> in trying to build a Docker image for ARM64 (aarch64-linux), I am
> hitting errors of the kind
> 
>   "package git-annex@10.20230926 does not support aarch64-linux"
> 
> There doesn't seem to be anything specifically in the package
> definitions that precludes building for aarch64-linux, so I suspect it's
> either a dependency or the build system that lacks the required support.

Git-annex uses the haskell-build-system which requires GHC, the only
modern haskell compiler. Unfortunately GHC is only packaged for
i686-linux and x86_64-linux in Guix.

> How would I go about debugging such issues? Maybe the causes are simple
> and I can fix them. But I don't even know where to start.

Maybe someone else can give more general or Guix specific advice on
finding out the cause of such problems, but I believe that in this case
the fix would just be packaging GHC for aarch64-linux. It should[1] be
possible but it will require some work.

[1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms

- Saku

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

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

* Re: Debugging missing architecture support
  2024-02-14 18:12 ` Efraim Flashner
@ 2024-02-14 20:33   ` Ricardo Wurmus
  2024-02-15 10:06     ` Konrad Hinsen
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Wurmus @ 2024-02-14 20:33 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: Konrad Hinsen, guix-devel


Efraim Flashner <efraim@flashner.co.il> writes:

> As far as tracking back from git-annex to ghc to see that it's not
> supported on aarch64, I'm not sure how you would find that information.

You can try this in guix repl:

--8<---------------cut here---------------start------------->8---
(import (srfi srfi-1)
        (guix packages)
        (gnu packages))

(define p (specification->package "git-annex"))
(define deps (package-development-inputs p))
(find (lambda (pkg)
        (not (member "aarch64-linux" (package-supported-systems pkg))))
      (map cadr deps))
--8<---------------cut here---------------end--------------->8---


-- 
Ricardo


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

* Re: Debugging missing architecture support
  2024-02-14 20:33   ` Ricardo Wurmus
@ 2024-02-15 10:06     ` Konrad Hinsen
  2024-02-24 16:35       ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Hinsen @ 2024-02-15 10:06 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, Efraim Flashner

Ricardo Wurmus <rekado@elephly.net> writes:

> You can try this in guix repl:
>
> --8<---------------cut here---------------start------------->8---
> (import (srfi srfi-1)
>         (guix packages)
>         (gnu packages))
>
> (define p (specification->package "git-annex"))
> (define deps (package-development-inputs p))
> (find (lambda (pkg)
>         (not (member "aarch64-linux" (package-supported-systems pkg))))
>       (map cadr deps))
> --8<---------------cut here---------------end--------------->8---

Thanks, that's very useful!

I changed the last command to

--8<---------------cut here---------------start------------->8---
(find (lambda (pkg)
        (and (package? pkg)
             (not (member "aarch64-linux" (package-supported-systems pkg)))))
      (map cadr deps))
--8<---------------cut here---------------end--------------->8---

because some packages have local files among the development inputs.

This search doesn't work for all cases though. For "python-jupyterlab"
(from the guix-science channel) it returns no problematic dependencies,
and yet I cannot build the package for aarch64-linux.

The problem in that case seems to be cross-compilation. The dependency
of python-jupyterlab that fails to build is libwebp, whose build log
says:

   @ unsupported-platform /gnu/store/7fj9ckgxw27r196vkisc9cm3n8v9072x-libwebp-1.3.2.drv aarch64-linux
   while setting up the build environment: a `aarch64-linux' is required to
   build `/gnu/store/7fj9ckgxw27r196vkisc9cm3n8v9072x-libwebp-1.3.2.drv',
   but I am a `x86_64-linux'

Maybe this would build on an actual ARM64 machine.

Cheers,
  Konrad.


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

* Re: Debugging missing architecture support
  2024-02-14 20:26 ` Saku Laesvuori
@ 2024-02-15 10:29   ` Konrad Hinsen
  2024-02-16 10:34     ` Efraim Flashner
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Hinsen @ 2024-02-15 10:29 UTC (permalink / raw)
  To: Saku Laesvuori; +Cc: Guix Devel

Hi Saku,

> Maybe someone else can give more general or Guix specific advice on
> finding out the cause of such problems, but I believe that in this case
> the fix would just be packaging GHC for aarch64-linux. It should[1] be
> possible but it will require some work.
>
> [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms

Thanks for the pointer! It looks indeed like GHC already support
aarch64, so it's just a matter of integrating that support into Guix.
I'll see if I can find someone motivated and competent to do that.

Cheers,
  Konrad


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

* Re: Debugging missing architecture support
  2024-02-15 10:29   ` Konrad Hinsen
@ 2024-02-16 10:34     ` Efraim Flashner
  0 siblings, 0 replies; 9+ messages in thread
From: Efraim Flashner @ 2024-02-16 10:34 UTC (permalink / raw)
  To: Konrad Hinsen; +Cc: Saku Laesvuori, Guix Devel


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

On Thu, Feb 15, 2024 at 11:29:55AM +0100, Konrad Hinsen wrote:
> Hi Saku,
> 
> > Maybe someone else can give more general or Guix specific advice on
> > finding out the cause of such problems, but I believe that in this case
> > the fix would just be packaging GHC for aarch64-linux. It should[1] be
> > possible but it will require some work.
> >
> > [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms
> 
> Thanks for the pointer! It looks indeed like GHC already support
> aarch64, so it's just a matter of integrating that support into Guix.
> I'll see if I can find someone motivated and competent to do that.

I've been carrying around this diff for a while but I don't think I'm
currently ready to finish it off. It adds aarch64 and armhf bootstrap
binaries for GHC and gets started on the path to building ghc-8.6 with
them.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: ghc-aarch64-support.diff --]
[-- Type: text/plain, Size: 13866 bytes --]

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 62815efbb1..92ba976189 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -57,6 +57,7 @@ (define-module (gnu packages haskell)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lisp)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
@@ -699,6 +852,24 @@ (define ghc-bootstrap-i686-7.8.4
      (base32
       "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg"))))
 
+(define ghc-bootstrap-armhf-8.2.2
+  (origin
+    (method url-fetch)
+    (uri
+     "https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-armv7-deb8-linux.tar.xz")
+    (sha256
+     (base32
+      "1jmv8qmnh5bn324fivbwdcaj55kvw7cb2zq9pafmlmv3qwwx7s46"))))
+
+(define ghc-bootstrap-aarch64-8.2.2
+  (origin
+    (method url-fetch)
+    (uri
+     "https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-aarch64-deb8-linux.tar.xz")
+    (sha256
+     (base32
+      "1k2amylcp1ad67c75h1pqf7czf9m0zj1i7hdc45ghjklnfq9hrk7"))))
+
 ;; 43 tests out of 3965 fail.
 ;;
 ;; Most of them do not appear to be serious:
@@ -1057,10 +1228,115 @@ (define-public ghc-8.4
                                 (file-pattern ".*\\.conf\\.d$")
                                 (file-type 'directory))))))
 
+(define ghc-8.4-bootstrap
+  (package
+    (inherit ghc-8.4)
+    (name "ghc")
+    (version "8.4.4")
+    (supported-systems '("aarch64-linux" "armhf-linux"))
+    (native-inputs
+     `(;("clang" ,clang)
+       ("gcc:lib" ,gcc "lib")
+       ("ghc-bootstrap" ,(if (target-aarch64?)
+                           ghc-bootstrap-aarch64-8.2.2
+                           ghc-bootstrap-armhf-8.2.2))
+       ("llvm" ,llvm-9)
+       ("patchelf" ,patchelf)
+       ;("ld-wrapper" ,(@ (gnu packages commencement) ld-gold-wrapper)) ; for arm
+       ,@(filter (match-lambda
+                   (("ghc-bootstrap" . _) #f)
+                   (_ #t))
+                 (package-native-inputs ghc-8.4))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ghc-8.4)
+       ((#:modules _ #~%gnu-build-system-modules)
+        '((guix build gnu-build-system)
+          (guix build utils)
+          (srfi srfi-26)
+          (srfi srfi-1)))
+       ((#:phases phases)
+        #~(let* ((ghc-bootstrap-path
+                   (string-append (getcwd) "/" #$name "-" #$version "/ghc-bin"))
+                 (ghc-bootstrap-prefix
+                   (string-append ghc-bootstrap-path "/usr")))
+            (modify-phases #$phases
+              (add-after 'unpack 'unpack-bin
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (mkdir-p ghc-bootstrap-prefix)
+                  (with-directory-excursion ghc-bootstrap-path
+                    (invoke "tar" "xvf" (assoc-ref inputs "ghc-bootstrap")))))
+              (add-before 'configure 'install-bin
+                (lambda _
+                  (with-directory-excursion
+                    (string-append ghc-bootstrap-path "/ghc-8.2.2")
+                    (invoke "make" "install"))))
+              (add-before 'install-bin 'configure-bin
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let* ((binaries
+                           (list "ghc/stage2/build/tmp/ghc-stage2"
+                                 "iserv/stage2/build/tmp/ghc-iserv"
+                                 "iserv/stage2_dyn/build/tmp/ghc-iserv-dyn"
+                                 "iserv/stage2_p/build/tmp/ghc-iserv-prof"
+                                 "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
+                                 "utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
+                                 ;"utils/haddock/dist/build/tmp/haddock" ; not on arm
+                                 "utils/hp2ps/dist/build/tmp/hp2ps"
+                                 "utils/hpc/dist-install/build/tmp/hpc"
+                                 "utils/hsc2hs/dist-install/build/tmp/hsc2hs"
+                                 "utils/runghc/dist-install/build/tmp/runghc"
+                                 "utils/unlit/dist/build/tmp/unlit"))
+                         (gmp (assoc-ref inputs "gmp"))
+                         (gmp-lib (string-append gmp "/lib"))
+                         (gmp-include (string-append gmp "/include"))
+                         (ncurses-lib
+                           (dirname (search-input-file inputs "/lib/libncurses.so")))
+                         (ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
+                         (libtinfo-dir
+                           (string-append ghc-bootstrap-prefix
+                                          "/lib/ghc-8.2.2/terminfo-0.4.1.0")))
+                    (with-directory-excursion
+                      (string-append ghc-bootstrap-path "/ghc-8.2.2")
+                      (setenv "CONFIG_SHELL" (which "bash"))
+                      (setenv "LD_LIBRARY_PATH"
+                              (string-append gmp-lib ":"
+                                             (assoc-ref inputs "gcc:lib") "/lib"))
+                      ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
+                      (for-each
+                        (cut invoke "patchelf" "--set-interpreter" ld-so <>)
+                        binaries)
+                      ;; The binaries include a reference to libtinfo.so.5 which
+                      ;; is a subset of libncurses.so.5.  We create a symlink in a
+                      ;; directory included in the bootstrap binaries rpath.
+                      (mkdir-p libtinfo-dir)
+                      (symlink
+                        (string-append ncurses-lib "/libncursesw.so."
+                                       ;; Extract "6.2" from "6.2.20210619" if a
+                                       ;; dash-separated version tag exists.
+                                       #$(let* ((v (package-version ncurses))
+                                                (d (or (string-index v #\-)
+                                                       (string-length v))))
+                                           (version-major+minor (string-take v d))))
+                        (string-append libtinfo-dir "/libtinfo.so.5"))
+
+                      (setenv "PATH"
+                              (string-append (getenv "PATH") ":"
+                                             ghc-bootstrap-prefix "/bin"))
+                      (invoke
+                        (string-append (getcwd) "/configure")
+                        (string-append "--prefix=" ghc-bootstrap-prefix)))))))))))
+    (native-search-paths (list (search-path-specification
+                                (variable "GHC_PACKAGE_PATH")
+                                (files (list
+                                        (string-append "lib/ghc-" version)))
+                                (file-pattern ".*\\.conf\\.d$")
+                                (file-type 'directory))))))
+
 (define-public ghc-8.6
   (package (inherit ghc-8.4)
     (name "ghc")
     (version "8.6.5")
+    (supported-systems (append (package-supported-systems ghc-8.4)
+                               (package-supported-systems ghc-8.4-bootstrap)))
     (source
      (origin
        (method url-fetch)
@@ -1070,7 +1346,10 @@ (define-public ghc-8.6
         (base32 "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd"))))
     (native-inputs
      `(;; GHC 8.6.5 must be built with GHC >= 8.2.
-       ("ghc-bootstrap" ,ghc-8.4)
+       ("ghc-bootstrap" ,(if (member (%current-system)
+                                     (package-supported-systems ghc-8.4-bootstrap))
+                           ghc-8.4-bootstrap
+                           ghc-8.4))
        ("ghc-testsuite"
         ,(origin
            (method url-fetch)
@@ -1140,6 +1419,105 @@ (define-public ghc-8.6
                                 (file-pattern ".*\\.conf\\.d$")
                                 (file-type 'directory))))))
 
+(define ghc-8.6-bootstrap
+  (package
+    (inherit ghc-8.6)
+    (name "ghc")
+    (version "8.6.5")
+    (supported-systems '("aarch64-linux" "armhf-linux"))
+    (native-inputs
+     `(;("clang" ,clang)
+       ("gcc:lib" ,gcc "lib")
+       ("ghc-bootstrap" ,(if (target-aarch64?)
+                           ghc-bootstrap-aarch64-8.2.2
+                           ghc-bootstrap-armhf-8.2.2))
+       ("llvm" ,llvm)
+       ("patchelf" ,patchelf)
+       ,@(filter (match-lambda
+                   (("ghc-bootstrap" . _) #f)
+                   (_ #t))
+                 (package-native-inputs ghc-8.6))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ghc-8.6)
+       ((#:modules _ #~%gnu-build-system-modules)
+        '((guix build gnu-build-system)
+          (guix build utils)
+          (srfi srfi-26)
+          (srfi srfi-1)))
+       ((#:phases phases)
+        #~(let* ((ghc-bootstrap-path
+                   (string-append (getcwd) "/" #$name "-" #$version "/ghc-bin"))
+                 (ghc-bootstrap-prefix
+                   (string-append ghc-bootstrap-path "/usr")))
+            (modify-phases #$phases
+              (add-after 'unpack 'unpack-bin
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (mkdir-p ghc-bootstrap-prefix)
+                  (with-directory-excursion ghc-bootstrap-path
+                    (invoke "tar" "xvf" (assoc-ref inputs "ghc-bootstrap")))))
+              (add-before 'configure 'install-bin
+                (lambda _
+                  (with-directory-excursion
+                    (string-append ghc-bootstrap-path "/ghc-8.2.2")
+                    (invoke "make" "install"))))
+              (add-before 'install-bin 'configure-bin
+                (lambda* (#:key inputs outputs #:allow-other-keys)
+                  (let* ((binaries
+                           (list "ghc/stage2/build/tmp/ghc-stage2"
+                                 "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
+                                 "utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
+                                 "utils/haddock/dist/build/tmp/haddock"
+                                 "utils/hp2ps/dist/build/tmp/hp2ps"
+                                 "utils/hpc/dist-install/build/tmp/hpc"
+                                 "utils/hsc2hs/dist-install/build/tmp/hsc2hs"
+                                 "utils/runghc/dist-install/build/tmp/runghc"
+                                 "utils/unlit/dist/build/tmp/unlit"))
+                         (gmp (assoc-ref inputs "gmp"))
+                         (gmp-lib (string-append gmp "/lib"))
+                         (gmp-include (string-append gmp "/include"))
+                         (ncurses-lib
+                           (dirname (search-input-file inputs "/lib/libncurses.so")))
+                         (ld-so (search-input-file inputs #$(glibc-dynamic-linker)))
+                         (libtinfo-dir
+                           (string-append ghc-bootstrap-prefix
+                                          "/lib/ghc-8.2.2/terminfo-0.4.1.0")))
+                    (with-directory-excursion
+                      (string-append ghc-bootstrap-path "/ghc-8.2.2")
+                      (setenv "CONFIG_SHELL" (which "bash"))
+                      (setenv "LD_LIBRARY_PATH"
+                              (string-append gmp-lib ":"
+                                             (assoc-ref inputs "gcc:lib") "/lib"))
+                      ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded.
+                      (for-each
+                        (cut invoke "patchelf" "--set-interpreter" ld-so <>)
+                        binaries)
+                      ;; The binaries include a reference to libtinfo.so.5 which
+                      ;; is a subset of libncurses.so.5.  We create a symlink in a
+                      ;; directory included in the bootstrap binaries rpath.
+                      (mkdir-p libtinfo-dir)
+                      (symlink
+                        (string-append ncurses-lib "/libncursesw.so."
+                                       ;; Extract "6.2" from "6.2.20210619" if a
+                                       ;; dash-separated version tag exists.
+                                       #$(let* ((v (package-version ncurses))
+                                                (d (or (string-index v #\-)
+                                                       (string-length v))))
+                                           (version-major+minor (string-take v d))))
+                        (string-append libtinfo-dir "/libtinfo.so.5"))
+
+                      (setenv "PATH"
+                              (string-append (getenv "PATH") ":"
+                                             ghc-bootstrap-prefix "/bin"))
+                      (invoke
+                        (string-append (getcwd) "/configure")
+                        (string-append "--prefix=" ghc-bootstrap-prefix)))))))))))
+    (native-search-paths (list (search-path-specification
+                                (variable "GHC_PACKAGE_PATH")
+                                (files (list
+                                        (string-append "lib/ghc-" version)))
+                                (file-pattern ".*\\.conf\\.d$")
+                                (file-type 'directory))))))
+
 (define-public ghc-8.8
   (package (inherit ghc-8.6)
     (name "ghc")

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

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

* Re: Debugging missing architecture support
  2024-02-15 10:06     ` Konrad Hinsen
@ 2024-02-24 16:35       ` Ludovic Courtès
  2024-02-25 17:22         ` Konrad Hinsen
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2024-02-24 16:35 UTC (permalink / raw)
  To: Konrad Hinsen; +Cc: Ricardo Wurmus, guix-devel, Efraim Flashner

Hi Konrad,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

> The problem in that case seems to be cross-compilation. The dependency
> of python-jupyterlab that fails to build is libwebp, whose build log
> says:
>
>    @ unsupported-platform /gnu/store/7fj9ckgxw27r196vkisc9cm3n8v9072x-libwebp-1.3.2.drv aarch64-linux
>    while setting up the build environment: a `aarch64-linux' is required to
>    build `/gnu/store/7fj9ckgxw27r196vkisc9cm3n8v9072x-libwebp-1.3.2.drv',

This shows an attempt to compile libwebp natively for aarch64-linux,
which fails on your machine.

To cross compile, you would run:

  guix build python-jupyterlab --target=aarch64-linux-gnu

… but I doubt this would succeed because that’s a huge pile of packages.

Ludo’.


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

* Re: Debugging missing architecture support
  2024-02-24 16:35       ` Ludovic Courtès
@ 2024-02-25 17:22         ` Konrad Hinsen
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Hinsen @ 2024-02-25 17:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Ricardo Wurmus, guix-devel, Efraim Flashner

Hi Ludo,

> This shows an attempt to compile libwebp natively for aarch64-linux,
> which fails on your machine.
>
> To cross compile, you would run:
>
>   guix build python-jupyterlab --target=aarch64-linux-gnu

That's already what I did, by giving the same option to "guix pack".

I had someone check on a real ARM machine, and there libwebp compiles
just fine. There seems to be some cross-compilation issues, for whatever
reasons - this isn't my priority for now.

I ended up tracking down all the issues with the container I was trying
to produce, and in the end it's always ghc that prevents builds for
aarch64-linux. Most frequently by having pandoc as a dependency.

I'll have to take a closer look at Efraim's diff (thanks Efraim!),
but I fear it's above my paygrade.

Cheers,
  Konrad.


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

end of thread, other threads:[~2024-02-25 17:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14 13:26 Debugging missing architecture support Konrad Hinsen
2024-02-14 18:12 ` Efraim Flashner
2024-02-14 20:33   ` Ricardo Wurmus
2024-02-15 10:06     ` Konrad Hinsen
2024-02-24 16:35       ` Ludovic Courtès
2024-02-25 17:22         ` Konrad Hinsen
2024-02-14 20:26 ` Saku Laesvuori
2024-02-15 10:29   ` Konrad Hinsen
2024-02-16 10:34     ` Efraim Flashner

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.