Page MenuHomeFreeBSD

lang/rust: Update to 1.41.0
ClosedPublic

Authored by tobik on Jan 27 2020, 9:27 PM.

Details

Summary

Scheduled to be released on 2020-01-30.

https://internals.rust-lang.org/t/rust-1-41-0-pre-release-testing/11707
https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1410-2020-01-30

This uses the bootstraps generated by lang/rust-bootstrap from D23133.

Test Plan

12.0 amd64 ok, consumers ok
11.3 i386 ok, consumers ok
13.0 amd64 ok
13.0 i386 ok
aarch64 ???
armv6 ok
armv7 ok
powerpc64 elfv1 ok
powerpc64 elfv2 ok
*-rust-bootstrap-1.41.0 ok

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

  • Remove DESTDIR from MAKE_ENV again (one change too much; it causes the bundled LLVM to be staged into it during do-build, i.e., check-plist will fail later)
tobik edited the test plan for this revision. (Show Details)
tobik edited the test plan for this revision. (Show Details)
  • Apply some cosmetic stuff by @mikael
  • Update with proper armv6 bootstrap

It's ok on armv7, ppc64 elfv1/elfv2.
The builds hangs on my aarch64, not sure if it's a problem with rust or the system.
armv6 doesn't build:

  = note: /tmp/rustcdnGbao/librustc_codegen_llvm-9f9b2279994669d5.rlib(rustc_codegen_llvm-9f9b2279994669d5.rustc_codegen_llvm.e2557spx-cgu.11.rcgu.o): In function `_$LT$rustc_target..abi..call..CastTarget$u20$a
s$u20$rustc_codegen_llvm..abi..LlvmType$GT$::llvm_type::h1296210ab461fc57':                                                                                                                                       
          rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fi
t: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p
39ey-cgu.13.rcgu.o)

It's ok on armv7, ppc64 elfv1/elfv2.
The builds hangs on my aarch64, not sure if it's a problem with rust or the system.

When/where does it hang?

armv6 doesn't build:

  = note: /tmp/rustcdnGbao/librustc_codegen_llvm-9f9b2279994669d5.rlib(rustc_codegen_llvm-9f9b2279994669d5.rustc_codegen_llvm.e2557spx-cgu.11.rcgu.o): In function `_$LT$rustc_target..abi..call..CastTarget$u20$a
s$u20$rustc_codegen_llvm..abi..LlvmType$GT$::llvm_type::h1296210ab461fc57':                                                                                                                                       
          rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fi
t: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p
39ey-cgu.13.rcgu.o)

That's a really weird error? Do you think that maybe forcing the build to use ld.lld (or newer ld.bfd from devel/binutils) would help at all? Cross-compiling armv6-rust-bootstrap-1.41.0 was fine.

--- Makefile.orig
+++ Makefile
@@ -165,7 +165,13 @@
 	@${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml
+.if ${ARCH} == armv6
+	@${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=lld "$$@"' > ${WRKDIR}/cc-wrapper 	 
+	@${CHMOD} +x ${WRKDIR}/cc-wrapper 	 
+	@${ECHO_CMD} 'linker="${WRKDIR}/cc-wrapper"' >> ${WRKSRC}/config.toml
+.else
 	@${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml
+.endif
 	@${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml
 	@${REINPLACE_CMD} 's,%CC%,${CC},g' \

It's ok on armv7, ppc64 elfv1/elfv2.
The builds hangs on my aarch64, not sure if it's a problem with rust or the system.

When/where does it hang?

armv6 doesn't build:

  = note: /tmp/rustcdnGbao/librustc_codegen_llvm-9f9b2279994669d5.rlib(rustc_codegen_llvm-9f9b2279994669d5.rustc_codegen_llvm.e2557spx-cgu.11.rcgu.o): In function `_$LT$rustc_target..abi..call..CastTarget$u20$a
s$u20$rustc_codegen_llvm..abi..LlvmType$GT$::llvm_type::h1296210ab461fc57':                                                                                                                                       
          rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fi
t: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p
39ey-cgu.13.rcgu.o)

That's a really weird error? Do you think that maybe forcing the build to use ld.lld (or newer ld.bfd from devel/binutils) would help at all? Cross-compiling armv6-rust-bootstrap-1.41.0 was fine.

--- Makefile.orig
+++ Makefile
@@ -165,7 +165,13 @@
 	@${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml
+.if ${ARCH} == armv6
+	@${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=lld "$$@"' > ${WRKDIR}/cc-wrapper 	 
+	@${CHMOD} +x ${WRKDIR}/cc-wrapper 	 
+	@${ECHO_CMD} 'linker="${WRKDIR}/cc-wrapper"' >> ${WRKSRC}/config.toml
+.else
 	@${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml
+.endif
 	@${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml
 	@${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml
 	@${REINPLACE_CMD} 's,%CC%,${CC},g' \

It's ok on armv6 with binutils:ld or ld.lld.
aarch64 doesn't hang but it's extremely slow, I don't remember it being so slow.

aarch64 doesn't hang but it's extremely slow, I don't remember it being so slow.

I think it's unlikely to be caused by the update. To find out maybe reattempt to build Rust 1.40.0 and see how that goes. But maybe it is something simple like running out of free disk space on the builder?

Can I commit it or do you want more time to debug it?

  • Rebase
  • Add armv6 lld workaround
tobik edited the test plan for this revision. (Show Details)

aarch64 doesn't hang but it's extremely slow, I don't remember it being so slow.

I think it's unlikely to be caused by the update. To find out maybe reattempt to build Rust 1.40.0 and see how that goes. But maybe it is something simple like running out of free disk space on the builder?

Can I commit it or do you want more time to debug it?

I definitely hit https://svnweb.freebsd.org/base?view=revision&revision=357253
ship it, garga@ said it builds fine in https://reviews.freebsd.org/D23133#513437
I'll open a pr if I find an issue.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 30 2020, 8:00 PM
Closed by commit rP524658: lang/rust: Update to 1.41.0 (authored by tobik). · Explain Why
This revision was automatically updated to reflect the committed changes.