Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53124 - [rust] build fixes for 1.15

Attached to Project: Community Packages
Opened by userwithuid (userwithuid) - Wednesday, 01 March 2017, 10:12 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 23 April 2017, 04:15 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Since packaging 1.15 has been delayed, I thought you might be stuck on the build errors.

Rust 1.15 enabled the new "rustbuild" system [0] by default. Some kinks need to be ironed out to make that work.

Attached is a PKGBUILD (and a diff for convenience) that successfully builds with extra-{i686,x86_64}-build from 'devtools'.

Explanations:

* NEEDED: The 2 patches (destdir [1] and jemalloc [2]) are backports from 1.16 to prevent build errors. They can be removed in the next version.

* NEEDED: --enable-llvm-link-shared : old build system in 1.14 sorta implied this, rustbuild 1.15+ has this explicit flag instead, see [3]

* CLEANUP: cmake [4], libffi, ninja [5] and perl are really only needed to build the vendored llvm or statically link it, but we use shared system-llvm. I've removed all things relating to that from the PKGBUILD.

* CLEANUP+: '!strip' does cause some (harmless) warnings for the *.rlib files, but I think *.so should still be stripped so I removed that. It makes the package smaller (~10M stripped vs unstripped 1.15)

* CLEANUP: 'staticlibs' is useless as there are no *.a files in the package to keep.

* CLEANUP: Removed a few more rust-installer files that were left in the pkg (e.g. uninstall.sh)

* OPTIONAL: --enable-local-rust --local-rust-root=/usr --enable-vendor :
This is for bootstrapping from previous version that I suggested last time [6]. With rustbuild from 1.15+ using cargo as well, another binary that we already have is downloaded during build. The previous issues with point releases have been fixed (as a data point: I've followed the transitions 1.12.1->1.13.0->1.14.0->1.15.0->1.15.1 successfully on my dev setup).


Future stuff: looks like building rust and cargo at once is being worked on, see [7]: "port cargo build to the rust extended build system". We'll see what comes from that.

Just ask if you need more info.



[0] https://github.com/rust-lang/rust/pull/37817
[1] https://github.com/rust-lang/rust/issues/38441
[2] https://github.com/rust-lang/rust/issues/39215
[3] https://github.com/rust-lang/rust/commit/b1da18f
[4] https://github.com/rust-lang/rust/blob/1.15.1/configure#L856
[5] https://github.com/rust-lang/rust/blob/1.15.1/configure#L638
[6] https://bugs.archlinux.org/task/51335
[7] https://github.com/rust-lang/rust/issues/38531
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 23 April 2017, 04:15 GMT
Reason for closing:  Fixed

Loading...