unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* mips64el machine - mrustc
@ 2018-09-16 12:12 Danny Milosavljevic
  2018-09-16 20:33 ` Ludovic Courtès
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-09-16 12:12 UTC (permalink / raw)
  To: guix-devel

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

Hi,

does anyone have a mips64el machine?
Could I have an (unprivileged) account on one for a little while?

I'm trying to get mrustc to work on mips64el, but I don't have such a machine and
transparent Guix qemu-binfmt-service-type doesn't seem to work for it either
(but does work for aarch64 and arm, WTF?).

Alternatively, I can also send a few commands for you to execute there.

What I'd need is:

* Find out what the gcc triplet is
* Test the mrustc patch I have done to get https://github.com/daym/mrustc/tree/mips64 .
  This means: make -f minicargo.mk
* Build rust@1.19.0 in current guix master.
  This means: guix build rust@1.19.0


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

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

* Re: mips64el machine - mrustc
  2018-09-16 12:12 mips64el machine - mrustc Danny Milosavljevic
@ 2018-09-16 20:33 ` Ludovic Courtès
  2018-09-18  7:29   ` Danny Milosavljevic
  2018-09-20  5:49 ` Mark H Weaver
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2018-09-16 20:33 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> does anyone have a mips64el machine?
> Could I have an (unprivileged) account on one for a little while?

Those we had behind hydra.gnu.org died a couple of years ago…

> I'm trying to get mrustc to work on mips64el, but I don't have such a machine and
> transparent Guix qemu-binfmt-service-type doesn't seem to work for it either
> (but does work for aarch64 and arm, WTF?).

Out of curiosity, how does it fail?  I use it for ARMv7 and AArch64,
where it indeed works nicely.

Thanks,
Ludo’.

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

* Re: mips64el machine - mrustc
  2018-09-16 20:33 ` Ludovic Courtès
@ 2018-09-18  7:29   ` Danny Milosavljevic
  0 siblings, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-09-18  7:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

Hi Ludo,

> Out of curiosity, how does it fail?  I use it for ARMv7 and AArch64,
> where it indeed works nicely.

$ ./pre-inst-env guix build -s mips64el-linux mrustc
...
Building /gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv - mips64el-linux
@ unsupported-platform /gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv mips64el-linux
while setting up the build environment: a `mips64el-linux' is required to build `/gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv', but I am a `x86_64-linux'
builder for `/gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv' failed with exit code 1
Build failed:  /gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv - 1 builder for `/gnu/store/q2x2bxk8xda18aa2xfnvig3rgl4q7xlm-guile-bootstrap-2.0.drv' failed with exit code 1


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

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

* Re: mips64el machine - mrustc
  2018-09-16 12:12 mips64el machine - mrustc Danny Milosavljevic
  2018-09-16 20:33 ` Ludovic Courtès
@ 2018-09-20  5:49 ` Mark H Weaver
  2018-09-20 14:43   ` Danny Milosavljevic
  2018-09-22 12:41   ` mips64el port Ludovic Courtès
  2018-09-20  6:35 ` Question about Rust bootstrap Mark H Weaver
  2018-09-29 16:09 ` mips64el machine - mrustc Andreas Enge
  3 siblings, 2 replies; 10+ messages in thread
From: Mark H Weaver @ 2018-09-20  5:49 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> writes:
> does anyone have a mips64el machine?
> Could I have an (unprivileged) account on one for a little while?
>
> I'm trying to get mrustc to work on mips64el, but I don't have such a machine and
> transparent Guix qemu-binfmt-service-type doesn't seem to work for it either
> (but does work for aarch64 and arm, WTF?).

Thanks for working on our Rust packages, and for making sure the other
architectures are not left in the cold.  I truly appreciate it!

As far as I can tell, I'm the only user of Guix on MIPS in recent years.
I still have a working Yeeloong laptop based on Loongson 2F, which is
running a modified GuixSD.  The most notable modification is that my
GuixSD system on mips64el is based on older binutils (2.25.1), because
I've found that running code built by later versions of binutils causes
my Yeeloong to lock up hard at some random time during compilation.  I
guess it's because either the assembler or the linker is producing code
that tickles a bug in the Loongson 2F, but I've not yet found the energy
to get to the bottom of this issue.

Anyway, the situation is that our MIPS port is more or less "on ice",
meaning that it could be revived with modest effort, but at the present
time there's not enough developer attention to keep it functional.

So, please don't worry about MIPS support in Rust for now.

Thanks again for your work on our Rust packages.  It's a great help!

      Mark

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

* Question about Rust bootstrap
  2018-09-16 12:12 mips64el machine - mrustc Danny Milosavljevic
  2018-09-16 20:33 ` Ludovic Courtès
  2018-09-20  5:49 ` Mark H Weaver
@ 2018-09-20  6:35 ` Mark H Weaver
  2018-09-20  9:39   ` Danny Milosavljevic
  2018-09-29 16:09 ` mips64el machine - mrustc Andreas Enge
  3 siblings, 1 reply; 10+ messages in thread
From: Mark H Weaver @ 2018-09-20  6:35 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hi Danny,

Speaking of our Rust packages, I have a question: is it intentional that
'rust-1.23' is still built using 'rust-bootstrap' and not 'rust-1.22'?

The reason I ask is that, to my delight, there appears to be (almost?)
everything needed for a complete source-only bootstrap chain for recent
Rust:

* rust-1.19.0 is built using mrustc
* rust-1.20.0 is built using rust-1.19.0
* rust-1.21.0 is built using rust-1.20.0
* rust-1.22.1 is built using rust-1.21.0
* rust-1.23.0 is built using pre-built 'rust-bootstrap' (1.22.1)  (???)
* rust-1.24.1 is built using rust-1.23.0
* rust-1.25.0 is built using rust-1.24.1
* rust-1.26.2 is built using rust-1.25.0
* rust-1.27.2 is built using rust-1.26.2

This chain would be complete if 'rust-1.23' were built using 'rust-1.22'
instead of 'rust-bootstrap'.  Since both 'rust-1.22' and
'rust-bootstrap' are apparently for the same version of Rust (1.22.1),
I would naturally expect one to work in place of the other one.
Have you tried it?

      Thanks,
        Mark

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

* Re: Question about Rust bootstrap
  2018-09-20  6:35 ` Question about Rust bootstrap Mark H Weaver
@ 2018-09-20  9:39   ` Danny Milosavljevic
  0 siblings, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-09-20  9:39 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

Hi Mark,

On Thu, 20 Sep 2018 02:35:27 -0400
Mark H Weaver <mhw@netris.org> wrote:

> Speaking of our Rust packages, I have a question: is it intentional that
> 'rust-1.23' is still built using 'rust-bootstrap' and not 'rust-1.22'?

Yes, because I'm not done yet :)

> The reason I ask is that, to my delight, there appears to be (almost?)
> everything needed for a complete source-only bootstrap chain for recent
> Rust:
> 
> * rust-1.19.0 is built using mrustc
> * rust-1.20.0 is built using rust-1.19.0
> * rust-1.21.0 is built using rust-1.20.0
> * rust-1.22.1 is built using rust-1.21.0
> * rust-1.23.0 is built using pre-built 'rust-bootstrap' (1.22.1)  (???)
> * rust-1.24.1 is built using rust-1.23.0
> * rust-1.25.0 is built using rust-1.24.1
> * rust-1.26.2 is built using rust-1.25.0
> * rust-1.27.2 is built using rust-1.26.2
> 
> This chain would be complete if 'rust-1.23' were built using 'rust-1.22'
> instead of 'rust-bootstrap'.  Since both 'rust-1.22' and
> 'rust-bootstrap' are apparently for the same version of Rust (1.22.1),
> I would naturally expect one to work in place of the other one.
> Have you tried it?

rust 1.20.0 has a failure when creating the documentation (check phase)
because it does not create "version_info.html" from "version_info.html.template"
- although it should.  On the other hand it passes all the tests (about 7000
of them).

I'm investigating why the documentation does not build.

Every guix build rust takes about half a day to complete on my machine, so it
will still take a week or so I'd say.

The build rule for version_info.html is in src/bootstrap/doc.rs , search
for "version_info.html".

I'm tempted to just patch "!up_to_date(&version_input, &version_info)" out of
it - but maybe it's covering up a deeper issue.

There's this:

pub fn mtime(path: &Path) -> FileTime {
    fs::metadata(path).map(|f| {
        FileTime::from_last_modification_time(&f)
    }).unwrap_or(FileTime::zero())
}

pub fn up_to_date(src: &Path, dst: &Path) -> bool {
    let threshold = mtime(dst);
    let meta = match fs::metadata(src) {
        Ok(meta) => meta,
        Err(e) => panic!("source {:?} failed to get metadata: {}", src, e),
    };
    if meta.is_dir() {
        dir_up_to_date(src, &threshold)
    } else {
        FileTime::from_last_modification_time(&meta) <= threshold
    }
}

So what if the destination does not exist?
Then the source would have to have zero timestamp for up_to_date to return true
(which we don't want), right?
So we should have non-zero timestamps for source files.
And I've checked the guix-build-rust directory, they all have timestamps of zero.

Sigh.  So I'll change all the source timestamps to 1, problem maybe solved.
Rebuilding...

Aha, newer rust version have:

pub fn up_to_date(src: &Path, dst: &Path) -> bool {
    if !dst.exists() { //             !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        return false;
    }
    let threshold = mtime(dst);
    let meta = match fs::metadata(src) {
        Ok(meta) => meta,
        Err(e) => panic!("source {:?} failed to get metadata: {}", src, e),
    };
    if meta.is_dir() {
        dir_up_to_date(src, threshold)
    } else {
        meta.modified().unwrap_or(UNIX_EPOCH) <= threshold
    }
}

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

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

* Re: mips64el machine - mrustc
  2018-09-20  5:49 ` Mark H Weaver
@ 2018-09-20 14:43   ` Danny Milosavljevic
  2018-09-22 12:41   ` mips64el port Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-09-20 14:43 UTC (permalink / raw)
  To: Mark H Weaver, guix-devel

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

Hi Mark,

On Thu, 20 Sep 2018 01:49:05 -0400
Mark H Weaver <mhw@netris.org> wrote:

> So, please don't worry about MIPS support in Rust for now.
> 
> Thanks again for your work on our Rust packages.  It's a great help!

Thanks!

Okay, I'll just leave MIPS support off for now.

I'll keep the github branch online.
It contains my patch for MIPS for mrustc which is not in upstream.

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

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

* mips64el port
  2018-09-20  5:49 ` Mark H Weaver
  2018-09-20 14:43   ` Danny Milosavljevic
@ 2018-09-22 12:41   ` Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-09-22 12:41 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Hello Mark,

Mark H Weaver <mhw@netris.org> skribis:

> Anyway, the situation is that our MIPS port is more or less "on ice",
> meaning that it could be revived with modest effort, but at the present
> time there's not enough developer attention to keep it functional.

What do you think would be the best course of action with our mips64el
port now?

Our documentation should probably reflect the fact that it’s not
receiving much attention, for instance by removing mentions of it from
the manual and web site, and optionally by having ‘configure’ reject it
unless ‘--with-courage’ is passed.

Another approach would be to get build machines (possibly via the
qemu-binfmt service), though if there are few users that may not help
much.  Or we could try to make GuixSD a viable option for mips-based
routers that typically run OpenWRT, though that’s a bit ambitious…

Thoughts?

Ludo’.

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

* Re: mips64el machine - mrustc
  2018-09-16 12:12 mips64el machine - mrustc Danny Milosavljevic
                   ` (2 preceding siblings ...)
  2018-09-20  6:35 ` Question about Rust bootstrap Mark H Weaver
@ 2018-09-29 16:09 ` Andreas Enge
  2018-09-29 19:38   ` Mark H Weaver
  3 siblings, 1 reply; 10+ messages in thread
From: Andreas Enge @ 2018-09-29 16:09 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Hello Danny,

I have a mips64 machine (the mini-pc desktop version of Mark's laptop,
with only one core). It is excruciatingly slow (if I remember well, just
compiling guix takes a few hours) and makes a tractor like noise, so I
turned it off and moved it to my closet. But I could take it out again
and try to let it run during the day when I am not there, and see if
I manage to upgrade Guix on it.

Andreas

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

* Re: mips64el machine - mrustc
  2018-09-29 16:09 ` mips64el machine - mrustc Andreas Enge
@ 2018-09-29 19:38   ` Mark H Weaver
  0 siblings, 0 replies; 10+ messages in thread
From: Mark H Weaver @ 2018-09-29 19:38 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

> Hello Danny,
>
> I have a mips64 machine (the mini-pc desktop version of Mark's laptop,
> with only one core). It is excruciatingly slow (if I remember well, just
> compiling guix takes a few hours) and makes a tractor like noise, so I
> turned it off and moved it to my closet. But I could take it out again
> and try to let it run during the day when I am not there, and see if
> I manage to upgrade Guix on it.

Based on my own experience with my Yeeloong, I suspect you will find
that machines based on Loongson 2F will lock up at some point during the
bootstrap when using binutils newer than 2.25.1.  It would be
interesting to confirm or deny this hypothesis.

       Mark

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

end of thread, other threads:[~2018-09-29 19:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-16 12:12 mips64el machine - mrustc Danny Milosavljevic
2018-09-16 20:33 ` Ludovic Courtès
2018-09-18  7:29   ` Danny Milosavljevic
2018-09-20  5:49 ` Mark H Weaver
2018-09-20 14:43   ` Danny Milosavljevic
2018-09-22 12:41   ` mips64el port Ludovic Courtès
2018-09-20  6:35 ` Question about Rust bootstrap Mark H Weaver
2018-09-20  9:39   ` Danny Milosavljevic
2018-09-29 16:09 ` mips64el machine - mrustc Andreas Enge
2018-09-29 19:38   ` Mark H Weaver

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