unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Mathieu Othacehe <othacehe@gnu.org>, guix-devel <guix-devel@gnu.org>
Cc: andrew@trop.in, bjoern.hoefling@bjoernhoefling.de,
	guix@cbaines.net, efraim@flashner.co.il, julien@lepiller.eu,
	cox.katherine.e+guix@gmail.com, lars@6xq.net,
	liliana.prikler@gmail.com, rekado@elephly.net, jgart@dismail.de
Subject: Re: Cross compilation status
Date: Mon, 11 Sep 2023 18:19:51 +0200	[thread overview]
Message-ID: <87o7i8hec8.fsf@gmail.com> (raw)
In-Reply-To: <87lede2xvu.fsf@gnu.org>

Hi Mathieu,

On Sun, 10 Sep 2023 at 11:14, Mathieu Othacehe <othacehe@gnu.org> wrote:

> Here is a status of cross-compilation in Guix. For cross-compilation to
> work, the build-system needs to support cross-compilation.
>
> The following build-systems explicitly refuse cross-compiling packages:
>
> haskell, agda, waf, chicken, rakudo, julia, python, emacs, rebar, cargo, ruby, renpy, dub, android-ndk, scons, dune, ant, pyproject, maven, asdf, r, ocaml, node
>

[...]

> --8<---------------cut here---------------start------------->8---
> Total packages: 28076
>
> clojure: 13
> qt: 317
> copy: 134
> minetest-mod: 22
> tree-sitter: 35
> raw: 2
> linux-module: 17
> glib-or-gtk: 139
> asdf/source: 794
> go: 632
> cmake: 1278
> minify: 12
> perl: 839
> trivial: 250
> guile: 49
> elm: 30
> font: 101
> gnu: 4178
> asdf/ecl: 753
> asdf/sbcl: 814
> meson: 504
> mozilla: 2
> texlive: 4150
> Cross-compilation OK: 15065
>
> ocaml: 61
> haskell: 812
> maven: 2
> chicken: 12
> node: 57
> emacs: 1370
> dune: 289
> android-ndk: 12
> waf: 21
> julia: 300
> pyproject: 433
> r: 2441
> cargo: 3535
> ruby: 597
> rebar: 22
> scons: 15
> rakudo: 22
> agda: 6
> ant: 559
> python: 2488
> Cross-compilation KO: 13054
> --8<---------------cut here---------------end--------------->8---

The build-systems renpy, dub is listed in “refuse“ but not then in
Cross-compilation KO.  Is it expected?

The build-system asdf is listed as refuse but appears in the list
Cross-compilation OK.  Is it expected?


> Over the 28076 packages in Guix, 15065 are part of build-systems with
> cross-compilation support and 13054 are part of build-systems without
> cross-compilation support.
>
> Overall 46.5% of our packages will refuse to cross-compile with errors
> such as:
>
> --8<---------------cut here---------------start------------->8---
> mathieu@meije ~$ guix build --target=aarch64-linux-gnu librsvg
> guix build: error: gnu/packages/gnome.scm:3500:2: librsvg@2.54.5: build system `cargo' does not support cross builds
> --8<---------------cut here---------------end--------------->8---
>
> I'd like to help converge towards the situation where all build-systems
> support cross-compilation.

Considering Julia, the “julia compiler” support of upstream [1] reads:

 + ARMv8 (64-bit): Tier 2
 + ARMv7 (32-bit): Tier 3
 + PowerPC (64-bit): Tier 3
 + then stuff about CUDA, ROCM, oneAPI

where:

 + Tier 2: Julia is guaranteed to build from source using the default
 build options, but may or may not pass all tests. Official binaries are
 available on a case-by-case basis.

 + Tier 3: Julia may or may not build. If it does, it is unlikely to
 pass tests. Binaries may be available in some cases. When they are,
 they should be considered experimental. Ongoing support is dependent on
 community efforts.

But I guess, these are about native compilation.  To my tiny knowledge
on that topic, Julia supports some cross-compilation.  However, Julia
depends on heavy packages as ’suitesparse’ or ’openblas’ and I do not
know if we already cross-compile them.  Since Julia is used for
scientific computations, I do not know if the effort is worth. 

1: https://julialang.org/downloads/

> I have CC'ed members of the python, java, ruby, rust, r, haskell and
> emacs teams. Any plans adding cross-compilation support to your
> build-system, barriers to overcome?

About Haskell, from experience, we are already not able to maintain an
usable ecosystem for i686, but that’s another story. :-)

Well, I do not know if cross-compilation is well-supported by the
Haskell compiler GHC.

Maybe some resources seems there:

    https://github.com/input-output-hk/haskell.nix


About R, similarly as Julia, since they are mainly used for scientific
computations, I do not know if supporting cross-compilation is worth our
effort.

Cheers,
simon


  parent reply	other threads:[~2023-09-11 16:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10  9:14 Cross compilation status Mathieu Othacehe
2023-09-10  9:20 ` Efraim Flashner
2023-09-10  9:27 ` Efraim Flashner
2023-09-10 12:55 ` Maxim Cournoyer
2023-09-10 14:59 ` Liliana Marie Prikler
2023-09-18 14:17   ` Efraim Flashner
2023-09-18 17:01     ` Liliana Marie Prikler
2023-09-11 16:19 ` Simon Tournier [this message]
2023-09-11 17:10   ` Liliana Marie Prikler
2023-09-12 15:05 ` Guillaume Le Vaillant

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7i8hec8.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=andrew@trop.in \
    --cc=bjoern.hoefling@bjoernhoefling.de \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=guix@cbaines.net \
    --cc=jgart@dismail.de \
    --cc=julien@lepiller.eu \
    --cc=lars@6xq.net \
    --cc=liliana.prikler@gmail.com \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).