Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609654 - dev-lang/rust: Keyword request
Summary: dev-lang/rust: Keyword request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
: 657584 670108 (view as bug list)
Depends on: 629444
Blocks:
  Show dependency tree
 
Reported: 2017-02-17 17:44 UTC by Marcus Comstedt
Modified: 2019-12-24 15:02 UTC (History)
7 users (show)

See Also:
Package list:
dev-lang/rust-1.40.0 dev-lang/rust-bin-1.40.0 virtual/cargo-1.40.0 virtual/rust-1.40.0 app-eselect/eselect-rust-20190311
Runtime testing required: No
stable-bot: sanity-check+


Attachments
patch for dev-lang/rust ebuild using new eclass (rust-1.15.1.ebuild.patch,2.10 KB, patch)
2017-02-23 13:47 UTC, Marcus Comstedt
no flags Details | Diff
patch for dev-lang/rust-bin ebuild using new eclass (rust-bin-1.15.1.ebuild.patch,1.09 KB, patch)
2017-02-23 13:47 UTC, Marcus Comstedt
no flags Details | Diff
patch for dev-util/cargo ebuild using new eclass (cargo-0.16.0.ebuild.patch,2.55 KB, patch)
2017-02-23 13:48 UTC, Marcus Comstedt
no flags Details | Diff
new eclass used by the patched ebuilds (rust-toolchain.eclass,2.96 KB, text/plain)
2017-02-23 13:49 UTC, Marcus Comstedt
no flags Details
New toolchain eclass by AxS (rust-toolchain.eclass.txt,3.86 KB, text/plain)
2018-10-03 18:02 UTC, Dirkjan Ochtman (RETIRED)
no flags Details
patch for eclass in #23 (eclass.patch,1.34 KB, patch)
2018-10-03 19:03 UTC, tt_1
no flags Details | Diff
Patch to fix rust-1.29.2.ebuild to work on any arch (rust-1.29.2.ebuild.generic_arch.patch,1.53 KB, patch)
2018-10-28 16:18 UTC, Marcus Comstedt
no flags Details | Diff
Patch to fix cargo-0.30.0.ebuild to work on any arch (cargo-0.30.0.ebuild.generic_arch.patch,2.25 KB, patch)
2018-10-28 16:20 UTC, Marcus Comstedt
no flags Details | Diff
build.log (ppc64, rust-1.30.1-r1) (rust-1.30.1-r1:20181203-210147.log,503.85 KB, text/plain)
2018-12-03 22:06 UTC, ernsteiswuerfel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2017-02-17 17:44:40 UTC
The dev-lang/rust ebuild is lacking support for several arches which are supported by upstream:

arm arm64 mips powerpc s390

Reproducible: Always

Steps to Reproduce:
1. Try to emerge dev-lang/rust on any of the above mentioned arches

Actual Results:  
ebuild fails with this error message:

configure: error: no local rust to use


Expected Results:  
rust is emerged successfully

Also applies to dev-lang/rust-bin (fails during unpack phase)
Comment 1 Marcus Comstedt 2017-02-21 14:05:20 UTC
The ebuild for dev-util/cargo is also missing bootstrap URLs for the other
arches, and in addition has its own computation of "${CTARGET}" which only
handles the x86 and amd64 cases (why doesn't it just use ${CHOST} instead?).
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2017-02-22 14:57:44 UTC
(In reply to Marcus Comstedt from comment #1)
> The ebuild for dev-util/cargo is also missing bootstrap URLs for the other
> arches, and in addition has its own computation of "${CTARGET}" which only
> handles the x86 and amd64 cases (why doesn't it just use ${CHOST} instead?).

Because Gentoo's CHOST is not the same as the value for Rust. Feel free to open a PR with the necessary changes as I don't have any of the hardware arches you requested and will be on travel for the next few weeks.
Comment 3 Marcus Comstedt 2017-02-22 15:07:23 UTC
Ok, so you want a separate issue for cargo?  Otherwise I can just add patches to this one.
Comment 4 Marcus Comstedt 2017-02-23 13:47:21 UTC
Created attachment 464894 [details, diff]
patch for dev-lang/rust ebuild using new eclass
Comment 5 Marcus Comstedt 2017-02-23 13:47:59 UTC
Created attachment 464896 [details, diff]
patch for dev-lang/rust-bin ebuild using new eclass
Comment 6 Marcus Comstedt 2017-02-23 13:48:50 UTC
Created attachment 464898 [details, diff]
patch for dev-util/cargo ebuild using new eclass
Comment 7 Marcus Comstedt 2017-02-23 13:49:32 UTC
Created attachment 464900 [details]
new eclass used by the patched ebuilds
Comment 8 Marcus Comstedt 2017-02-23 13:52:02 UTC
Ok, uploaded patches to all three ebuilds.  I put all the nitty-gritty stuff in a new eclass so that it can be shared.

Tested on arm64.  (I didn't add the actual KEYWORD in the patches, but with this
it is at least possible to build by accepting **.)
Comment 9 Stabilization helper bot gentoo-dev 2017-07-30 16:00:48 UTC
An automated check of this bug failed - repoman reported dependency errors (45 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: PDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425', '>=dev-util/cargo-0.20.0']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx']
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-30 16:15:35 UTC
The ebuild is not ready to be arch-tested without modifications.

Does rust@ team want arch teams to apply the patches as-is?
Comment 11 Dirkjan Ochtman (RETIRED) gentoo-dev 2017-07-30 18:40:44 UTC
Nope, this isn't ready. I've removed the KEYWORDREQ keyword for now.

Marcus, your patches look really interesting. I'm going to need some time however to get up to speed.

Unfortunately I've been part of the Rust team without being on the alias, so I have some catching up to do. Sorry for ignoring this work so far!
Comment 12 Mart Raudsepp gentoo-dev 2017-08-27 23:11:49 UTC
(In reply to Dirkjan Ochtman from comment #11)
> Nope, this isn't ready. I've removed the KEYWORDREQ keyword for now.

KEYWORDREQ isn't sufficient to stop the process; removing arches from CC is, or maybe moving it out of Keywording component.

Building all targets support for the bundled llvm seems excessive for mips, arm and arm64 as well, and if that's still the case, I can't possibly test this on mips without taking a week or two once back at my mips machine physically, should it even fit into working memory needs.
Comment 13 Mart Raudsepp gentoo-dev 2017-08-27 23:12:42 UTC
(In reply to Mart Raudsepp from comment #12)
> (In reply to Dirkjan Ochtman from comment #11)
> > Nope, this isn't ready. I've removed the KEYWORDREQ keyword for now.
> 
> KEYWORDREQ isn't sufficient to stop the process; removing arches from CC is,
> or maybe moving it out of Keywording component.

But the current sanity-check- is mostly sufficient I suppose :D
Comment 14 Stabilization helper bot gentoo-dev 2017-08-31 14:00:56 UTC
An automated check of this bug failed - repoman reported dependency errors (45 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: PDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425', '>=dev-util/cargo-0.20.0']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx']
Comment 15 tt_1 2017-09-02 13:45:22 UTC
It would be great if you could start by adding keywords to the rust-bin package. #611756 has a patch suggestion for the ebuilds, this would be a good starting point in my opinion.
Comment 16 ernsteiswuerfel archtester 2017-09-15 13:45:48 UTC
Tried building on ppc64/32ul, but every incarnation fails.

rust-1.15.1 and rust-1.16.0 fail 'cause of no local rust in build directory (?):
which: no rustc in (/var/tmp/portage/dev-lang/rust-1.15.1/temp/python2.7/bin:/usr/lib/portage/python3.4/ebuild-helpers/xattr:/usr/lib/portage/python3.4/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/powerpc-unknown-linux-gnu/gcc-bin/6.4.0)
configure: error: no local rust to use

rust-1.19.0 fails 'cause not finding some file in the build dir:
Traceback (most recent call last):
  File "x.py", line 20, in <module>
    bootstrap.main()
  File "/var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 678, in main
    bootstrap()
  File "/var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 660, in bootstrap
    rb.build_bootstrap()
  File "/var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 413, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/bootstrap/bootstrap.py", line 137, in run
    ret = subprocess.Popen(args, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Comment 17 Marcus Comstedt 2017-09-15 14:07:42 UTC
(In reply to ernsteiswuerfel from comment #16)
> Tried building on ppc64/32ul, but every incarnation fails.

Did you apply the patch?  I did not post one for 1.16.0 or 1.19.0...
Did it download the correct bootstrap package(s)?
Comment 18 Matt Turner gentoo-dev 2018-03-28 00:56:41 UTC
Would be fun, but mips needs to sort out LLVM in general before this can happen.
Comment 19 Stabilization helper bot gentoo-dev 2018-04-26 15:01:14 UTC
An automated check of this bug failed - repoman reported dependency errors (162 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx', 'sys-devel/clang']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: PDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425', '>=dev-util/cargo-0.20.0']
> dependency.bad dev-lang/rust/rust-1.19.0.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['sys-libs/libcxx']
Comment 20 Mart Raudsepp gentoo-dev 2018-07-14 12:04:26 UTC
dev-lang/rust has been keyworded ~arm64 since February
Comment 21 Stabilization helper bot gentoo-dev 2018-07-14 12:59:25 UTC
An automated check of this bug failed - the following atom is unknown:

dev-lang/rust-1.19.0

Please verify the atom list.
Comment 22 Stabilization helper bot gentoo-dev 2018-07-14 13:59:46 UTC
An automated check of this bug failed - repoman reported dependency errors (126 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.27.1-r1.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust/rust-1.27.1-r1.ebuild: PDEPEND: ~arm(default/linux/arm/13.0) ['>=dev-util/cargo-0.27.0']
> dependency.bad dev-lang/rust/rust-1.27.1-r1.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
Comment 23 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-03 18:02:53 UTC
Created attachment 549192 [details]
New toolchain eclass by AxS
Comment 24 tt_1 2018-10-03 18:11:11 UTC
Unless I'm misstaken this would suggest to install a rustc built for armv6-unknown-linux-gnueabihf for an armv7-unknown-linux-gnueabihf chost, right?
Comment 25 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-03 18:22:53 UTC
I think it would download the armv6 bootstrap binaries for an armv7 host, yes. But I'm happy to take your improvements to it!
Comment 26 tt_1 2018-10-03 18:49:36 UTC
It's possible to use an arm-unknown-linux-gnueabi rust stage to bootstrap and compile an arm-unknown-linux-gnueabihf rustc; but from my understanding it would require cross compiling to use arm-unknown-linux-gnueabihf for armv7-unknown-linux-gnueabihf. 

I'd really like to improve it, but my level of ebuild hacking is certainly limited, let alone eclasses. 

The chost problem gets more problematic if you want to inherit both old 13.0 CHOST and new 17.0 CHOST values. 

Also I think that i*86* --> i686-unknown-linux-gnu is wrong, because of sse2 issues (#665660)
Comment 27 tt_1 2018-10-03 19:03:55 UTC
Created attachment 549200 [details, diff]
patch for eclass in #23

13.0 has:

armv6j-softfloat-linux-gnueabi
armv6j-hardfloat-linux-gnueabi
armv7a-hardfloat-linux-gnueabi

17.0 has: 
armv6j-unknown-linux-gnueabihf
armv7a-unknown-linux-gnueabihf

prefix has:

armv7a-softfloat-linux-gnueabi

now it may be possible to take advantage of the fact that all hardfloat CHOST have an h in them, but no s, and vice versa all softfloat CHOST have no h in them, but an s. 

I tried to fiddle something, patch is attached. 

Todo: i686
Comment 28 Larry the Git Cow gentoo-dev 2018-10-18 09:05:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca73a89121af25876703d0ddcc5f08ddf277933

commit aca73a89121af25876703d0ddcc5f08ddf277933
Author:     Dirkjan Ochtman <djc@gentoo.org>
AuthorDate: 2018-10-18 09:02:33 +0000
Commit:     Dirkjan Ochtman <djc@gentoo.org>
CommitDate: 2018-10-18 09:05:13 +0000

    dev-lang/rust: version bump to 1.29.2 with fixes
    
    Fixes: https://bugs.gentoo.org/667286
    Fixes: https://bugs.gentoo.org/667966
    Bug: https://bugs.gentoo.org/609654
    Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-lang/rust/Manifest                          |  14 ++
 dev-lang/rust/files/1.29.2-clippy-sysroot.patch |  62 +++++
 dev-lang/rust/rust-1.29.2.ebuild                | 289 ++++++++++++++++++++++++
 3 files changed, 365 insertions(+)
Comment 29 Marcus Comstedt 2018-10-28 16:18:17 UTC
Created attachment 553524 [details, diff]
Patch to fix rust-1.29.2.ebuild to work on any arch

Hi.

Here's a patch that lets the 1.29.2 ebuild of rust work on any arch supported by upstreams, instead of just three hardcoded ones.  :-)

Tested on ppc64.
Comment 30 Marcus Comstedt 2018-10-28 16:20:15 UTC
Created attachment 553526 [details, diff]
Patch to fix cargo-0.30.0.ebuild to work on any arch

... and the same for cargo.
Comment 31 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-10-28 21:32:19 UTC
Marcus, thanks for sticking with it! I've pushed your patches.

Arches, please reconsider keywording per the package list.
Comment 32 Stabilization helper bot gentoo-dev 2018-10-28 22:02:24 UTC
An automated check of this bug failed - repoman reported dependency errors (178 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.29.2.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust/rust-1.29.2.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust/rust-1.29.2.ebuild: DEPEND: ~arm(default/linux/arm/17.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust-bin/rust-bin-1.29.2.ebuild: DEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust-bin/rust-bin-1.29.2.ebuild: RDEPEND: ~arm(default/linux/arm/13.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
> dependency.bad dev-lang/rust-bin/rust-bin-1.29.2.ebuild: DEPEND: ~arm(default/linux/arm/17.0) ['>=app-eselect/eselect-rust-0.3_pre20150425']
Comment 33 Stabilization helper bot gentoo-dev 2018-10-29 11:02:46 UTC
An automated check of this bug succeeded - the previous repoman errors are now resolved.
Comment 34 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-02 09:01:00 UTC
*** Bug 670108 has been marked as a duplicate of this bug. ***
Comment 35 Stabilization helper bot gentoo-dev 2018-11-15 11:02:24 UTC
An automated check of this bug failed - repoman reported dependency errors (21 lines truncated): 

> dependency.bad dev-lang/rust/rust-1.30.1-r1.ebuild: DEPEND: ~ppc(default/linux/powerpc/ppc32/17.0) ['>=sys-devel/llvm-6:=']
> dependency.bad dev-lang/rust/rust-1.30.1-r1.ebuild: RDEPEND: ~ppc(default/linux/powerpc/ppc32/17.0) ['>=sys-devel/llvm-6:=']
> dependency.bad dev-lang/rust/rust-1.30.1-r1.ebuild: DEPEND: ~ppc(default/linux/powerpc/ppc32/17.0/desktop) ['>=sys-devel/llvm-6:=']
Comment 36 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-15 11:11:19 UTC
I'll add arm64 and remove ppc/s390 as they don't have LLVM yet (and relying on the system LLVM is certainly desirable).
Comment 37 Dirkjan Ochtman (RETIRED) gentoo-dev 2018-11-15 11:12:58 UTC
*** Bug 657584 has been marked as a duplicate of this bug. ***
Comment 38 Stabilization helper bot gentoo-dev 2018-11-15 12:02:10 UTC
An automated check of this bug succeeded - the previous repoman errors are now resolved.
Comment 39 ernsteiswuerfel archtester 2018-12-03 22:06:26 UTC
Created attachment 557036 [details]
build.log (ppc64, rust-1.30.1-r1)

rust-1.30.1-r1 builds fine and passes tests on ppc64. Perhaps it could be keyworded ~ppc64 as well? ;)
Comment 40 Sergei Trofimovich (RETIRED) gentoo-dev 2018-12-25 20:11:55 UTC
~ppc64 keyworded. Bootstraps file on ppc64 BE and LE.
Comment 41 Stabilization helper bot gentoo-dev 2019-06-22 11:00:24 UTC
An automated check of this bug failed - the following atoms are unknown:

dev-lang/rust-1.30.1-r1
dev-lang/rust-bin-1.30.1-r1
virtual/cargo-1.30.1
virtual/rust-1.30.1

Please verify the atom list.
Comment 42 Stabilization helper bot gentoo-dev 2019-10-13 12:00:51 UTC
An automated check of this bug failed - the following atoms are unknown:

dev-lang/rust-1.30.1-r1
dev-lang/rust-bin-1.30.1-r1
virtual/cargo-1.30.1
virtual/rust-1.30.1

Please verify the atom list.
Comment 43 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-12-24 15:01:05 UTC
~arm keyworded
Comment 44 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-12-24 15:02:30 UTC
~arm keyworded