unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Aarch64 build of rust-1.39.0 fails
@ 2021-12-16 13:14 phodina via
  2021-12-17 16:37 ` Vagrant Cascadian
  2021-12-20  2:55 ` Maxim Cournoyer
  0 siblings, 2 replies; 14+ messages in thread
From: phodina via @ 2021-12-16 13:14 UTC (permalink / raw)
  To: help-guix

Hi,

I checked the build server and there were no substitutes [1] for rust-1.39.0 for the Aarch64 system.

When building natively (Pinebook Pro) there is this problem:

$ uname -a
Linux valhalla 5.14.9-gnu #1 SMP PREEMPT 1 aarch64 GNU/Linux
~/guix$ guix build rust -K
...
> /tmp/guix-build-rust-1.39.0.drv-0/mrustc/bin/mrustc rustc-1.39.0-src/src/libcore/lib.rs -o output/libcore.rlib --crate-name core --crate-type rlib -C emit-depfile=output/libcore.rlib.d --crate-tag 0_0_0 -g --cfg debug_assertions -O -L output --edition 2018
rustc-1.39.0-src/src/libcore/slice/mod.rs:67: warn:0:Unexpected attribute allow_internal_unstable on associated item
rustc-1.39.0-src/src/libcore/str/mod.rs:2173: warn:0:Unexpected attribute allow_internal_unstable on associated item
In file included from output/libcore.rlib.c:7:
output/libcore.rlib.c: In function ‘ZRQG2ch4core50_0_03ffi10VaListImpl0g2cb05clone5Clone0gb30g’:
output/libcore.rlib.c:219717:10: warning: passing argument 1 of ‘__builtin_va_copy’ from incompatible pointer type [-Wincompatible-pointer-types]
219717 | va_copy(var3, arg0);
| ^~~~
| |
| struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **
output/libcore.rlib.c:219717:10: note: expected ‘__va_list *’ but argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **’
output/libcore.rlib.c:219717:16: error: incompatible type for argument 2 of ‘__builtin_va_copy’
219717 | va_copy(var3, arg0);
| ^~~~
| |
| struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *
output/libcore.rlib.c:219717:16: note: expected ‘__va_list’ but argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *’
C Compiler failed to execute - error code 256
Process exited with non-zero exit status 1
BUILD FAILED
make: *** [minicargo.mk:82: output/libstd.rlib] Error 1
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-f" "minicargo.mk" "output/rustc" "-j6" "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0" "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 1006.4 seconds
command "make" "-f" "minicargo.mk" "output/rustc" "-j6" "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0" "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=" failed with status 2

Not sure if this PR [2] would help as I don't know how to apply the patch to the package definition for rust-1.39.

[1] http://ci.guix.gnu.org/search?query=rust-1.39
[2] https://github.com/rust-lang/rust/pull/49878

----
Petr

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

* Re: Aarch64 build of rust-1.39.0 fails
  2021-12-16 13:14 Aarch64 build of rust-1.39.0 fails phodina via
@ 2021-12-17 16:37 ` Vagrant Cascadian
  2021-12-20  2:55 ` Maxim Cournoyer
  1 sibling, 0 replies; 14+ messages in thread
From: Vagrant Cascadian @ 2021-12-17 16:37 UTC (permalink / raw)
  To: phodina, help-guix

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

On 2021-12-16, phodina via wrote:
> I checked the build server and there were no substitutes [1] for rust-1.39.0 for the Aarch64 system.

This is unfortunately a known issue; there isn't a good bootstrap path
for rust on aarch64... and an increasingly number of things are
depending on rust, which makes it a more obvious problem now.


> When building natively (Pinebook Pro) there is this problem:
>
> $ uname -a
> Linux valhalla 5.14.9-gnu #1 SMP PREEMPT 1 aarch64 GNU/Linux
> ~/guix$ guix build rust -K
> ...
>> /tmp/guix-build-rust-1.39.0.drv-0/mrustc/bin/mrustc rustc-1.39.0-src/src/libcore/lib.rs -o output/libcore.rlib --crate-name core --crate-type rlib -C emit-depfile=output/libcore.rlib.d --crate-tag 0_0_0 -g --cfg debug_assertions -O -L output --edition 2018
> rustc-1.39.0-src/src/libcore/slice/mod.rs:67: warn:0:Unexpected attribute allow_internal_unstable on associated item
> rustc-1.39.0-src/src/libcore/str/mod.rs:2173: warn:0:Unexpected attribute allow_internal_unstable on associated item
> In file included from output/libcore.rlib.c:7:
> output/libcore.rlib.c: In function ‘ZRQG2ch4core50_0_03ffi10VaListImpl0g2cb05clone5Clone0gb30g’:
> output/libcore.rlib.c:219717:10: warning: passing argument 1 of ‘__builtin_va_copy’ from incompatible pointer type [-Wincompatible-pointer-types]
> 219717 | va_copy(var3, arg0);
> | ^~~~
> | |
> | struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **
> output/libcore.rlib.c:219717:10: note: expected ‘__va_list *’ but argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **’
> output/libcore.rlib.c:219717:16: error: incompatible type for argument 2 of ‘__builtin_va_copy’
> 219717 | va_copy(var3, arg0);
> | ^~~~
> | |
> | struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *
> output/libcore.rlib.c:219717:16: note: expected ‘__va_list’ but argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *’
> C Compiler failed to execute - error code 256
> Process exited with non-zero exit status 1
> BUILD FAILED
> make: *** [minicargo.mk:82: output/libstd.rlib] Error 1
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-f" "minicargo.mk" "output/rustc" "-j6" "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0" "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=") exit-status: 2 term-signal: #f stop-signal: #f>
> phase `build' failed after 1006.4 seconds
> command "make" "-f" "minicargo.mk" "output/rustc" "-j6" "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0" "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=" failed with status 2
>
> Not sure if this PR [2] would help as I don't know how to apply the patch to the package definition for rust-1.39.
...
> [2] https://github.com/rust-lang/rust/pull/49878

Looks somewhat plausible...

You could try pulling out the patches and adding them in
gnu/packages/patches/rust-1.39-XXX.patch, and then adding into the
search-patches definition in gnu/packages/rust.scm for rust-1.39.

Though, they may require backwards or forwards-porting those patches;
not sure if those patches were applied before or after 1.39.


live well,
  vagrant

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

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

* Re: Aarch64 build of rust-1.39.0 fails
  2021-12-16 13:14 Aarch64 build of rust-1.39.0 fails phodina via
  2021-12-17 16:37 ` Vagrant Cascadian
@ 2021-12-20  2:55 ` Maxim Cournoyer
  2021-12-22 10:51   ` phodina
  2022-01-03 23:21   ` Denis 'GNUtoo' Carikli
  1 sibling, 2 replies; 14+ messages in thread
From: Maxim Cournoyer @ 2021-12-20  2:55 UTC (permalink / raw)
  To: phodina via

Hi,

phodina via <help-guix@gnu.org> writes:

> Hi,
>
> I checked the build server and there were no substitutes [1] for
> rust-1.39.0 for the Aarch64 system.
>
> When building natively (Pinebook Pro) there is this problem:
>
> $ uname -a
> Linux valhalla 5.14.9-gnu #1 SMP PREEMPT 1 aarch64 GNU/Linux
> ~/guix$ guix build rust -K
> ...
>> /tmp/guix-build-rust-1.39.0.drv-0/mrustc/bin/mrustc
> rustc-1.39.0-src/src/libcore/lib.rs -o output/libcore.rlib
> --crate-name core --crate-type rlib -C
> emit-depfile=output/libcore.rlib.d --crate-tag 0_0_0 -g --cfg
> debug_assertions -O -L output --edition 2018
> rustc-1.39.0-src/src/libcore/slice/mod.rs:67: warn:0:Unexpected
> attribute allow_internal_unstable on associated item
> rustc-1.39.0-src/src/libcore/str/mod.rs:2173: warn:0:Unexpected
> attribute allow_internal_unstable on associated item
> In file included from output/libcore.rlib.c:7:
> output/libcore.rlib.c: In function
> ‘ZRQG2ch4core50_0_03ffi10VaListImpl0g2cb05clone5Clone0gb30g’:
> output/libcore.rlib.c:219717:10: warning: passing argument 1 of
> ‘__builtin_va_copy’ from incompatible pointer type
> [-Wincompatible-pointer-types]
> 219717 | va_copy(var3, arg0);
> | ^~~~
> | |
> | struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **
> output/libcore.rlib.c:219717:10: note: expected ‘__va_list *’ but
> argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g **’
> output/libcore.rlib.c:219717:16: error: incompatible type for argument 2 of ‘__builtin_va_copy’
> 219717 | va_copy(var3, arg0);
> | ^~~~
> | |
> | struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *
> output/libcore.rlib.c:219717:16: note: expected ‘__va_list’ but
> argument is of type ‘struct s_ZRG2ch4core50_0_03ffi10VaListImpl0g *’
> C Compiler failed to execute - error code 256
> Process exited with non-zero exit status 1
> BUILD FAILED
> make: *** [minicargo.mk:82: output/libstd.rlib] Error 1
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-f"
> "minicargo.mk" "output/rustc" "-j6"
> "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0"
> "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=") exit-status: 2 term-signal: #f
> stop-signal: #f>
> phase `build' failed after 1006.4 seconds
> command "make" "-f" "minicargo.mk" "output/rustc" "-j6"
> "RUSTC_TARGET=aarch64-unknown-linux-gnu" "RUSTC_VERSION=1.39.0"
> "MRUSTC_TARGET_VER=1.39" "OUTDIR_SUF=" failed with status 2

This is not a Rust but a (known) mrustc issue, which is used to
bootstrap Rust starting at version 1.39.0.  It currently only supports
x86_64, although the author is interested in enabling support for other
architectures (a WIP).

Thanks,

Maxim


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

* Re: Aarch64 build of rust-1.39.0 fails
  2021-12-20  2:55 ` Maxim Cournoyer
@ 2021-12-22 10:51   ` phodina
  2022-01-03 23:21   ` Denis 'GNUtoo' Carikli
  1 sibling, 0 replies; 14+ messages in thread
From: phodina @ 2021-12-22 10:51 UTC (permalink / raw)
  To: Maxim Cournoyer, Vagrant Cascadian; +Cc: phodina via

Hi Vagrant and Maxim,

thanks for the clarification.

I do now see that the latest supported version is rust@1.39.0 om Aarch64 [1].

Thanks also Danny Milosavljevic for blog post on bootstrapping rust [2].

Yes, it's great that Rust is used more, however, at the same time it causes problems integrating it into the Guix system properly.

----
Petr

[1] https://github.com/thepowersgang/mrustc
[2] https://guix.gnu.org/en/blog/2018/bootstrapping-rust/




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

* Re: Aarch64 build of rust-1.39.0 fails
  2021-12-20  2:55 ` Maxim Cournoyer
  2021-12-22 10:51   ` phodina
@ 2022-01-03 23:21   ` Denis 'GNUtoo' Carikli
  2022-01-04 16:18     ` Maxim Cournoyer
  1 sibling, 1 reply; 14+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-01-03 23:21 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: phodina via

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

On Sun, 19 Dec 2021 21:55:21 -0500
Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> This is not a Rust but a (known) mrustc issue, which is used to
> bootstrap Rust starting at version 1.39.0.  It currently only supports
> x86_64, although the author is interested in enabling support for
> other architectures (a WIP).
So that's why it also fails on i686.

In that case would it be possible to revert to the way it
was before for non x86_64 architectures (so without mrustc), when it's
done to switch the remaining architectures to mrustc when they become
ready for that?

Denis.

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

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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-03 23:21   ` Denis 'GNUtoo' Carikli
@ 2022-01-04 16:18     ` Maxim Cournoyer
  2022-01-04 17:41       ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2022-01-04 16:18 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: phodina via

Hi Denis,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:

> On Sun, 19 Dec 2021 21:55:21 -0500
> Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>> This is not a Rust but a (known) mrustc issue, which is used to
>> bootstrap Rust starting at version 1.39.0.  It currently only supports
>> x86_64, although the author is interested in enabling support for
>> other architectures (a WIP).
> So that's why it also fails on i686.
>
> In that case would it be possible to revert to the way it
> was before for non x86_64 architectures (so without mrustc), when it's
> done to switch the remaining architectures to mrustc when they become
> ready for that?

Rust has been bootstrapped via mrustc since September 2018 (commit
3159ef7c99c646b78b04cedb1bd3525c301ef978); I don't think it supported
non-x86_64 back then, it's just that Rust wasn't as widely used as it is
today so it had a lesser impact.

The impact of the lack of Rust on non-x86_64 architectures has been
reduced on non-x86_64 architectures on the master branch by workarounds
such as using polkit-duktape in place of the regular polkit to avoid
requiring Rust for non-x86_64 architectures or an older librsvg that can
be used to build GTK without SVG support.

The i686 native build of rust 1.39 via mrustc nearly succeeds, but fails
due to GCC using too much memory (more than the 4 GiB limit imposed by
32 bit addressing).  With the growth of Rust, there's growing value in
contributing testing and patches to mrustc, so if you'd like to help
Rust on Guix, that's currently the best option to pursue (there's a
#mrustc channel on libera.chat where the mrustc author is often
available).  There's also a wip-cross-built-rust branch that I had
started; I stopped working on it after finding out rustc couldn't be
built statically; other than that it was working to build rust things on
non-x86_64 platforms.

Thanks,

Maxim


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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-04 16:18     ` Maxim Cournoyer
@ 2022-01-04 17:41       ` Denis 'GNUtoo' Carikli
  2022-01-04 22:22         ` Maxim Cournoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-01-04 17:41 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: phodina via

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

On Tue, 04 Jan 2022 11:18:31 -0500
Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Hi Denis,
Hi,
 
> The impact of the lack of Rust on non-x86_64 architectures has been
> reduced on non-x86_64 architectures on the master branch by
> workarounds such as using polkit-duktape in place of the regular
> polkit to avoid requiring Rust for non-x86_64 architectures or an
> older librsvg that can be used to build GTK without SVG support.
>
> The i686 native build of rust 1.39 via mrustc nearly succeeds, but
> fails due to GCC using too much memory (more than the 4 GiB limit
> imposed by 32 bit addressing).  With the growth of Rust, there's
> growing value in contributing testing and patches to mrustc, so if
> you'd like to help Rust on Guix, that's currently the best option to
> pursue (there's a #mrustc channel on libera.chat where the mrustc
> author is often available).  There's also a wip-cross-built-rust
> branch that I had started; I stopped working on it after finding out
> rustc couldn't be built statically; other than that it was working to
> build rust things on non-x86_64 platforms.
Thanks a lot. All the infos you gave me suggest that it's probably
easier to try to build it from master than trying to go back in time
(the approach I was trying).

With both Guix system i686 and Parabola i686 (with linux-libre-pae)
htop sees 8GiB of RAM on my laptop[1], and I've also 9G of swap
available, and I can probably make it run builds the night, so I'll try
to get that built on my laptop and report here and/or on IRC.

Though at the end of the day, it'll really be fixed for everybody when
official substitutes are available (as not everybody has that amount of
RAM and the time to build it) and unfortunatelyu I can't help much with
substitute (I guess it's just a matter of waiting for builds as soon as
the build works reliability with enough RAM+swap).

So beside reporting success/failures if that works, I'll probably try to
fix other issues instead (tests fails on i686 for several packages) as
I don't run substitute servers.

References:
-----------
[1] It's a Thinkpad x200 which is capable of running in
    x86_64 mode, but due to various reason my systems need to run in
    i686 mode.

Denis.

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

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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-04 17:41       ` Denis 'GNUtoo' Carikli
@ 2022-01-04 22:22         ` Maxim Cournoyer
  2022-01-09 21:13           ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2022-01-04 22:22 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: phodina via

Hi Denis,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:

[...]

> With both Guix system i686 and Parabola i686 (with linux-libre-pae)
> htop sees 8GiB of RAM on my laptop[1], and I've also 9G of swap
> available, and I can probably make it run builds the night, so I'll try
> to get that built on my laptop and report here and/or on IRC.

Actually I'm not sure I understand where the limits comes from; it seems
when using 32 bits there's a 2 GB limit somewhere:
https://github.com/thepowersgang/mrustc/issues/78#issuecomment-980830551

Note that you'll want to use the latest commit available of mrustc, or
something recent enough like this in (gnu packages rust) as it includes
recent fixes to the (still failing) i686 build:

--8<---------------cut here---------------start------------->8---
;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's designed
;;; to be used in source form.  The latest support for bootstrapping from
;;; 1.39.0 is not yet released so use the latest commit (see:
;;; https://github.com/thepowersgang/mrustc/issues/185).
(define %mrustc-commit "c7066542f8e93d320323749216bf3c82aecb67c2")
(define %mrustc-source
  (let* ((version "0.9")
         (commit %mrustc-commit)
         (revision "1")
         (name "mrustc"))
    (origin
      (method git-fetch)
      (uri (git-reference
            (url "https://github.com/thepowersgang/mrustc")
            (commit commit)))
      (file-name (git-file-name name (git-version version revision commit)))
      (sha256
       (base32
        "0zv1x6601s5fnnkcdlqkc4bknisqz569qb0iyb9rjsmaf1kh0na3")))))
--8<---------------cut here---------------end--------------->8---

HTH,

Maxim


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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-04 22:22         ` Maxim Cournoyer
@ 2022-01-09 21:13           ` Denis 'GNUtoo' Carikli
  2022-01-10 21:22             ` Maxim Cournoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-01-09 21:13 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: phodina via

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

On Tue, 04 Jan 2022 17:22:02 -0500
Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Hi Denis,
Hi,

> Note that you'll want to use the latest commit available of mrustc, or
> something recent enough like this in (gnu packages rust) as it
> includes recent fixes to the (still failing) i686 build:
With ./build-1.39.0.sh in mrustc, some help from #mrustc, and some local
patches, I was able to get it build under 4GiB of RAM per process with
an x86_64 kernel (by removing -O2 and -g), but it fails for 3GiB of RAM
per process (i686 kernel) no mater what options are passed to it.

My issue is that claws-mail now depend on rust (it didn't before). As
several other pakcages also fails on i686 (failing tests), and that I
also hit a Guix bug, it's hard for me to fix it as everything is
broken and I need to do workarounds on workarounds.

What do I need to revert (locally?) to make claws-mail not depend on
rust (for i686)?

Denis.

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

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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-09 21:13           ` Denis 'GNUtoo' Carikli
@ 2022-01-10 21:22             ` Maxim Cournoyer
  2022-01-11 13:34               ` Efraim Flashner
  0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2022-01-10 21:22 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: phodina via

Hi Denis,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:

> On Tue, 04 Jan 2022 17:22:02 -0500
> Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> Hi Denis,
> Hi,
>
>> Note that you'll want to use the latest commit available of mrustc, or
>> something recent enough like this in (gnu packages rust) as it
>> includes recent fixes to the (still failing) i686 build:
> With ./build-1.39.0.sh in mrustc, some help from #mrustc, and some local
> patches, I was able to get it build under 4GiB of RAM per process with
> an x86_64 kernel (by removing -O2 and -g), but it fails for 3GiB of RAM
> per process (i686 kernel) no mater what options are passed to it.

Thank you for doing the experiment and sharing the result!  I've relayed
it to mrustc's author here:
https://github.com/thepowersgang/mrustc/issues/78, I hope you don't
mind.

> My issue is that claws-mail now depend on rust (it didn't before). As
> several other pakcages also fails on i686 (failing tests), and that I
> also hit a Guix bug, it's hard for me to fix it as everything is
> broken and I need to do workarounds on workarounds.

The situation with Rust on Guix is far from satisfactory, and the usage
of Rust continues to expand, we'll have to find solutions.  GCC-rust
seems like a good candidate to help us bootstrap for more platforms, but
it isn't ready yet.  mrustc is the current best option; cross-building
rust could be another thing to do (there's a wip-cross-built-rust branch
that I had started to explore doing this), but it's a messier path.

> What do I need to revert (locally?) to make claws-mail not depend on
> rust (for i686)?

I don't see this relationship locally:

$ guix graph --path claws-mail rust
$ guix describe
5b95cad85018e64f2a34ef950dd2e5434d07cfc0

But looking at the package definition, it explicitly depends on librsvg,
which is a Rust-powered library.  You could try to make this input
conditional (e.g., add it only when the system is x86_64), if claws-mail
can be built without it.

Thanks,

Maxim


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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-10 21:22             ` Maxim Cournoyer
@ 2022-01-11 13:34               ` Efraim Flashner
  2022-01-14 23:27                 ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 14+ messages in thread
From: Efraim Flashner @ 2022-01-11 13:34 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: phodina via

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

On Mon, Jan 10, 2022 at 04:22:17PM -0500, Maxim Cournoyer wrote:
> Hi Denis,
> 
> Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:
> 
> > On Tue, 04 Jan 2022 17:22:02 -0500
> > Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> >
> >> Hi Denis,
> > Hi,
> >
> >> Note that you'll want to use the latest commit available of mrustc, or
> >> something recent enough like this in (gnu packages rust) as it
> >> includes recent fixes to the (still failing) i686 build:
> > With ./build-1.39.0.sh in mrustc, some help from #mrustc, and some local
> > patches, I was able to get it build under 4GiB of RAM per process with
> > an x86_64 kernel (by removing -O2 and -g), but it fails for 3GiB of RAM
> > per process (i686 kernel) no mater what options are passed to it.
> 
> Thank you for doing the experiment and sharing the result!  I've relayed
> it to mrustc's author here:
> https://github.com/thepowersgang/mrustc/issues/78, I hope you don't
> mind.
> 
> > My issue is that claws-mail now depend on rust (it didn't before). As
> > several other pakcages also fails on i686 (failing tests), and that I
> > also hit a Guix bug, it's hard for me to fix it as everything is
> > broken and I need to do workarounds on workarounds.
> 
> The situation with Rust on Guix is far from satisfactory, and the usage
> of Rust continues to expand, we'll have to find solutions.  GCC-rust
> seems like a good candidate to help us bootstrap for more platforms, but
> it isn't ready yet.  mrustc is the current best option; cross-building
> rust could be another thing to do (there's a wip-cross-built-rust branch
> that I had started to explore doing this), but it's a messier path.
> 
> > What do I need to revert (locally?) to make claws-mail not depend on
> > rust (for i686)?
> 
> I don't see this relationship locally:
> 
> $ guix graph --path claws-mail rust
> $ guix describe
> 5b95cad85018e64f2a34ef950dd2e5434d07cfc0
> 
> But looking at the package definition, it explicitly depends on librsvg,
> which is a Rust-powered library.  You could try to make this input
> conditional (e.g., add it only when the system is x86_64), if claws-mail
> can be built without it.

Specifically, try replacing librsvg with librsvg-for-system

-- 
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] 14+ messages in thread

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-11 13:34               ` Efraim Flashner
@ 2022-01-14 23:27                 ` Denis 'GNUtoo' Carikli
  2022-01-18  4:36                   ` Maxim Cournoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-01-14 23:27 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: phodina via

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

On Tue, 11 Jan 2022 15:34:00 +0200
Efraim Flashner <efraim@flashner.co.il> wrote:

> Specifically, try replacing librsvg with librsvg-for-system
Thanks a lot.

I've now managed to build almost all of the system.scm I was using by
patching several packages to:
- use librsvg-for-system instead of librsvg
- not use gjs for i686
- disable some or all tests for i686.

I'm currently in the process of converting all that to proper patches.

Though I still have an issue before being able to run guix system
reconfigure.

If I add gdm in my packages list, it doesn't bring in rust as
dependencies anymore.

But if I don't comment the following code, it brings rust again:
> (service gdm-service-type (gdm-configuration (debug? #t) 
>                                              (wayland? #t)))
And it does that even without debug and wayland (I didn't test with
debug and wayland before because the issue in this thread prevented me
from doing that).

Without debug and wayland, it worked before, but here I'm not fluent
enough in scheme yet to properly understand how the service definition
really work and to pinpoint the cause of it.

Denis.

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

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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-14 23:27                 ` Denis 'GNUtoo' Carikli
@ 2022-01-18  4:36                   ` Maxim Cournoyer
  2022-01-18  6:15                     ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2022-01-18  4:36 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: phodina via

Hi Denis,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:

> On Tue, 11 Jan 2022 15:34:00 +0200
> Efraim Flashner <efraim@flashner.co.il> wrote:
>
>> Specifically, try replacing librsvg with librsvg-for-system
> Thanks a lot.
>
> I've now managed to build almost all of the system.scm I was using by
> patching several packages to:
> - use librsvg-for-system instead of librsvg
> - not use gjs for i686
> - disable some or all tests for i686.
>
> I'm currently in the process of converting all that to proper patches.
>
> Though I still have an issue before being able to run guix system
> reconfigure.
>
> If I add gdm in my packages list, it doesn't bring in rust as
> dependencies anymore.
>
> But if I don't comment the following code, it brings rust again:
>> (service gdm-service-type (gdm-configuration (debug? #t) 
>>                                              (wayland? #t)))
> And it does that even without debug and wayland (I didn't test with
> debug and wayland before because the issue in this thread prevented me
> from doing that).

gdm depends on gjs IIRC, which is bound to mozjs, which requires rust.
So you should use another login manager such as lightdm or slim.

HTH!

Maxim


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

* Re: Aarch64 build of rust-1.39.0 fails
  2022-01-18  4:36                   ` Maxim Cournoyer
@ 2022-01-18  6:15                     ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 14+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2022-01-18  6:15 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: phodina via

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

On Mon, 17 Jan 2022 23:36:42 -0500
Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> gdm depends on gjs IIRC, which is bound to mozjs, which requires rust.
> So you should use another login manager such as lightdm or slim.
I'm running Guix system i686 and I use GDM, including the service to
have it started at boot, and it works, but I didn't manage to run guix
system reconfigure recently yet because of the issue mentioned in this
thread.

With my patches, I can install gdm without GJS, it's only the gdm
service that brings rust as dependency, not the gdm package. 

To be able to install gdm without rust, I had to use the right librsvg
in gnome-settings-daemon.

Denis.

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

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

end of thread, other threads:[~2022-01-18  6:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 13:14 Aarch64 build of rust-1.39.0 fails phodina via
2021-12-17 16:37 ` Vagrant Cascadian
2021-12-20  2:55 ` Maxim Cournoyer
2021-12-22 10:51   ` phodina
2022-01-03 23:21   ` Denis 'GNUtoo' Carikli
2022-01-04 16:18     ` Maxim Cournoyer
2022-01-04 17:41       ` Denis 'GNUtoo' Carikli
2022-01-04 22:22         ` Maxim Cournoyer
2022-01-09 21:13           ` Denis 'GNUtoo' Carikli
2022-01-10 21:22             ` Maxim Cournoyer
2022-01-11 13:34               ` Efraim Flashner
2022-01-14 23:27                 ` Denis 'GNUtoo' Carikli
2022-01-18  4:36                   ` Maxim Cournoyer
2022-01-18  6:15                     ` Denis 'GNUtoo' Carikli

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).