Details
- Reviewers
- None
- Group Reviewers
rust - Commits
- R11:e57dfbf32324: lang/rust: Update to 1.60.0
Poudriere 14 aarch64 ok
Poudriere 14 amd64 ok
Poudriere 13 powerpc64le - ok
Poudriere 13 powerpc64 - ok
Poudriere 13 powerpc - ok
Exp-run: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263442
Broken ports:
devel/racer (marked broken): error[E0635]: unknown feature `thread_local_const_init` --> /wrkdirs/usr/ports/devel/racer/work/racer-2.1.48/cargo-crates/rustc-ap-rustc_span-722.0.0/src/lib.rs:23:12
textproc/ripgrep (fixed with https://cgit.freebsd.org/ports/commit/?id=6232f9ef95a4a7df474752319b00f91c5dded612) error[E0635]: unknown feature `llvm_asm` --> /wrkdirs/usr/ports/textproc/ripgrep/work/ripgrep-13.0.0/cargo-crates/packed_simd_2-0.3.6/src/lib.rs:227:5
games/veloren (fixed in https://cgit.freebsd.org/ports/commit/?id=fbe3e82d8415d60bc45b66379857cd50e6d9a18b) error[E0635]: unknown feature `llvm_asm` --> /wrkdirs/usr/ports/games/veloren/work/veloren-b5bac97c2e533bc61faf39ab0a43a037aa5a5ccf/cargo-crates/packed_simd_2-0.3.6/src/lib.rs:227:5
lang/rust-bootstrap@powerpc (fixed by reverting part of https://github.com/rust-lang/rust/commit/07dae5a97b64100f5abd511f1e2d5a6263a54006) CMake Error at /usr/local/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message): The C compiler "/usr/local/freebsd-sysroot/powerpc/bin/cc" is not able to compile a simple test program. It fails with the following output: Change Dir: /wrkdirs/usr/ports/lang/rust-bootstrap/work-powerpc/_build/powerpc-unknown-freebsd/llvm/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/local/bin/ninja cmTC_51d93 && [ 50% 1/2] Building C object CMakeFiles/cmTC_51d93.dir/testCCompiler.c.o [100% 2/2] Linking C executable cmTC_51d93 FAILED: cmTC_51d93 : && /usr/local/freebsd-sysroot/powerpc/bin/cc -ffunction-sections -fdata-sections -fPIC -pipe -fstack-protector-strong -fno-strict-aliasing -fuse-ld=bfd -lz -fstack-protector-strong CMakeFiles/cmTC_51d93.dir/testCCompiler.c.o -o cmTC_51d93 && : cc: error: invalid linker name in argument '-fuse-ld=bfd'
Diff Detail
- Repository
- R11 FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Regarding powerpc bootstraps: on 13.1 rust builds fine without bfd. Would it be possible to build bootstraps against 13.1 for powerpc?
Use the following patch for powerpc (assuming 13.1):
--- src/bootstrap/native.rs.orig 2022-04-09 03:06:06.748146000 +0200 +++ src/bootstrap/native.rs 2022-04-09 03:06:17.718886000 +0200 @@ -316,11 +316,6 @@ } } - // Workaround for ppc32 lld limitation - if target == "powerpc-unknown-freebsd" { - ldflags.exe.push(" -fuse-ld=bfd"); - } - // https://llvm.org/docs/HowToCrossCompileLLVM.html if target != builder.config.build { builder.ensure(Llvm { target: builder.config.build });
Also remove -fuse-ld from Makefile:
@@ -210,8 +210,6 @@ do-configure: @${CHMOD} +x ${WRKDIR}/cc-wrapper @${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/cxx-wrapper @${CHMOD} +x ${WRKDIR}/cxx-wrapper - @${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=bfd "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/ld-wrapper - @${CHMOD} +x ${WRKDIR}/ld-wrapper .endif .for _target in ${_RUST_TARGETS} @${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml @@ -223,11 +221,7 @@ do-configure: @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml .endif -.if ${ARCH} == powerpc - @${ECHO_CMD} 'linker="${WRKDIR}/ld-wrapper"' >> ${WRKSRC}/config.toml -.else @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml -.endif .endfor @${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml
That makes lang/rust build.
For lang/rust-bootstrap, you will probably also need changing /usr/local/freebsd-sysroot/powerpc/bin/c* (remove -fuse-ld="/usr/local/bin/powerpc-unknown-freebsd13.0-ld.bfd). Since the system compiler is used, build on 13.1
The problem with devel/racer is as follows:
- racer 2.1.48 doesn't build with rust 1.60.0
- racer 2.x requires rustc-dev from rust-nightly
- rustc-dev is not "fabricated" on lang/rust-nightly because we use x.py build instead of x.py dist
Probably time to resurrect https://reviews.freebsd.org/D28520
Racer 2.2.0 builds fine with rust 1.60.0 and rustc-dev (no need for the nightly version)
@mikael
I'm not sure what happened, but I can now build lang/rust-bootstrap@powerpc without additional patching. Do you want me to upload the bootstrap somewhere?
devel/racer has always been a problem. Let's remove it or if it builds now put an expiration date on it. People can build it themselves with cargo install or use rls or better rust-analyzer like upstream suggests anyway.
Using x.py dist starts making a whole lot of sense if FreeBSD Ports ever gets the long overdue support for generating subpackages. Every distfile is a natural subpackage.
Please let me know if you want me to test something for this update.
lang/rust/Makefile | ||
---|---|---|
10 | We should only have one of those. Remove mine. I'm going to ask clusteradm if we can have a /home/rust on freefall. Other groups also have one. |
Here is an update. I still have to test a few things marked with XXX in the Makefile.
The DOC doesn't build but there is a patch available now, we should try to import it.
I'm still not sure if we should install rustc-dev on the stable channel (alpine installs it), it's only usefull to build devel/racer. It adds 120MB to rust-1.60.0.pkg
- Switch to using x.py dist instead of x.py in the do-build phase as we are missing the rustc-dev component (needed for devel/racer)
- Revert part of [1] as it causes cross build problem with lang/rust-bootstrap@powerpc
devel/racer: Update to 2.2.0
[1] https://github.com/rust-lang/rust/commit/07dae5a97b64100f5abd511f1e2d5a6263a54006
- Mark devel/racer as broken and set an expiration date
- Only build rustc-dev on nightly (per https://rust-lang.github.io/rustup/concepts/components.html)
Address tobik's comments
Mk/bsd.gecko.mk | ||
---|---|---|
82 |
Firefox upstream upgraded both Rust to 1.60 and Clang to 14, see https://bugzilla.mozilla.org/show_bug.cgi?id=1758780 |
Not to be the party pooper here, but as of now devel/llvm14 doesn't even build with default options on 13.0 (I think brooks@'s rererevert of the libunwind dependency logic broke it, at least the error matches). Once that's sorted out, I can take care of the wasi-compiler-stuff. Totally excited about having a fourth llvm installation besides base.