You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is perhaps more of a question or a "release management" issue, perhaps even "documenting the latter".
In my quest to continue to have rust buildable & installable in NetBSD's pkgsrc system, I've now come to rust 1.81.0.
The package has an option to either build with an external LLVM (and libunwind) or with the embedded version of at least LLVM
in the rust tarball.
When going from rust 1.80.1 to rust 1.81.0 I find that the rust compiler no longer builds with an external LLVM 17.x.
The last time a bump in the requirement for an external LLVM happened was in the 1.79.0 release.
My question is whether someone missed bumping the requirement in the rust release notes for 1.81.0, or whether
the errors I'm seeing while trying to use an external LLVM are of my own or "our own" doing. The errors start with
[ 29%] Building CXX object COFF/CMakeFiles/lldCOFF.dir/CallGraphSort.cpp.o
[ 30%] Building CXX object MachO/CMakeFiles/lldMachO.dir/Arch/ARM64Common.cpp.o
In file included from /usr/pkgsrc/wip/rust181/work/rustc-1.81.0-src/src/llvm-project/lld/wasm/Driver.cpp:141:
/usr/pkgsrc/wip/rust181/work/rustc-1.81.0-src/build/x86_64-unknown-netbsd/lld/build/wasm/Options.inc:44:122: error: macro "OPTION" requires 13 arguments, but only 12 given
44 | OPTION(prefix_0, llvm::StringLiteral("<input>"), INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr)
| ^
/usr/pkgsrc/wip/rust181/work/rustc-1.81.0-src/src/llvm-project/lld/wasm/Driver.cpp:134: note: macro "OPTION" defined here
134 | #define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, \
|
For some reason the build appears to want to build LLD.
Did someone not test building with an external LLVM 17.x? Does rust now from 1.81.0 in fact need an external LLVM >= 18?
#130487 drop LLVM 17 at Rust 1.83.0. It looks like your logs are building the LLVM bundled with Rust?
Actually no, as I said, it's trying to build LLD (I don't know why). The percentage progress starts with
-- Build files have been written to: /usr/pkgsrc/wip/rust181/work/rustc-1.81.0-src/build/x86_64-unknown-netbsd/lld/build
running: cd "/usr/pkgsrc/wip/rust181/work/rustc-1.81.0-src/build/x86_64-unknown-netbsd/lld/build" && DESTDIR="" "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j" "20"
[ 0%] Built target intrinsics_gen
[ 3%] Building Options.inc...
[ 3%] Building Options.inc...
: {110} egrep '^Build' list.01
Building bootstrap
Building stage0 library artifacts (x86_64-unknown-netbsd)
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-netbsd)
Building LLD for x86_64-unknown-netbsd
: {111}
Yes, just set rust.lld=false if you don’t want to build lld. If you’re using an external llvm, not building dev/nightly, not building for x64 linux and so on, it should already be disabled though. In case not, setting it explicitly will disable it for sure.
edit: ah you’re probably using the dist profile, lld is enabled there.
Activity
dianqk commentedon Oct 5, 2024
#130487 drop LLVM 17 at Rust 1.83.0. It looks like your logs are building the LLVM bundled with Rust?
he32 commentedon Oct 5, 2024
Actually no, as I said, it's trying to build LLD (I don't know why). The percentage progress starts with
he32 commentedon Oct 5, 2024
And ... the build phases it has started are:
dianqk commentedon Oct 5, 2024
Ah, I guess it's #124129. You can disable lld.
dianqk commentedon Oct 5, 2024
IIUC, after #126282, you just need to set the channel to stable.
cc @lqd
he32 commentedon Oct 5, 2024
That would explain it, I'm pursuing that hint.
lqd commentedon Oct 5, 2024
Yes, just set rust.lld=false if you don’t want to build lld. If you’re using an external llvm, not building dev/nightly, not building for x64 linux and so on, it should already be disabled though. In case not, setting it explicitly will disable it for sure.
edit: ah you’re probably using the dist profile, lld is enabled there.
he32 commentedon Oct 5, 2024
lqd commentedon Oct 5, 2024
#126701 enabled lld on the dist profile
rust181: if building with an external LLVM turn off building LLD.
he32 commentedon Oct 6, 2024
OK, that worked around the issue for the package.
Again, many thanks for the quick hints which led me on the correct path.