Page MenuHomeSolus

Allow rust to compile without networking and update to 1.17.0
Closed, ResolvedPublic

Description

Here are a couple of patches to update the rust package to work without networking and bump it to version 1.16.0

A couple of notes

  • The new rustbuild build system is disabled for the 1.16.0 bump. It uses rust and cargo for the build system instead of Makefiles. This means it will once again need networking, without polluting the sources list with all the dependent crates. Builds with rustbuild enabled are not working anyway, so this isn't such a big issue at the moment. However, the Makefiles are being removed and rustbuild will be the only option once 1.17.0 hits stable.
  • Bootstrapping the compiler from the existing rust and cargo packages does not work (rustc fails to compile with can't find crate for 'core' or can't fine crate for 'std'). I have not had a chance to look into if we are able to work around this to bootstrap using existing packages.

Related Objects

Event Timeline

saintdev created this task.Feb 8 2017, 8:49 PM
saintdev updated the task description. (Show Details)EditedFeb 9 2017, 2:46 AM

Updated revision bump patch after compile test attached.

Obsoleted patch:

  1. Cargo is not needed to build rust
  2. What's the problem with networking ?

@saintdev could you please review my patch ? T2917

  1. Cargo is not needed to build rust

Is not needed, yet. Since PR#39431 Delete the makefile build system, it will be required. This was merged into what will be the 1.17 release.

  1. What's the problem with networking ?

Reproducible builds. You start out with a source file and a bootstrap compiler (ideally this would be the existing Solus package) and end up with a new compiler. Otherwise, Cargo is downloading whatever deps it needs. If a file is corrupted or missing when cargo downloads it, the build fails for no reason whatsoever. If you are trying to build the package in an offline environment, you can just download the two (ideally, one) source files and that is all you need.

@saintdev could you please review my patch ? T2917

Why did you just copy parts of the Arch PKGBUILD? Ninja is only used for building llvm (which Solus already provides)? Is there a reason you disable jemalloc?

Thank you for your time answering me, you are totally right !

Reproducible builds.

Didn't thought about this and it's essential.

Why did you just copy parts of the Arch PKGBUILD?

Because I'm still learning...

Is there a reason you disable jemalloc?

I think I tried ~30 times to make a working build with adding and removing options. Thus, no good reason at all, just tried this time with the malloc from glibc.

Because I'm still learning...

And learning should be done by reading the appropriate documentation and trial / error first, not looking at PKGBUILDs.

saintdev renamed this task from Allow rust to compile without networking and update to 1.15.1 to Allow rust to compile without networking and update to 1.16.0.Mar 17 2017, 3:42 AM
saintdev updated the task description. (Show Details)

Updated patch in OP for rust 1.16.0

saintdev updated the task description. (Show Details)Apr 18 2017, 5:56 AM

Added patch to use rustbuild instead of Makefile build system.

saintdev renamed this task from Allow rust to compile without networking and update to 1.16.0 to Allow rust to compile without networking and update to 1.17.0.Apr 28 2017, 8:49 AM
saintdev updated the task description. (Show Details)

@kyrios123 thanks for the heads up. Patch updated for 1.17.0.

ikey changed the task status from Open to In Progress.Apr 29 2017, 3:46 PM
ikey closed this task as Resolved.Apr 29 2017, 4:08 PM
ikey claimed this task.
ikey added a subscriber: ikey.