You are not logged in.

#1 2024-12-28 17:40:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,673
Website

Unable to build rust against clang 19.1.6 due to an old lib [solved]

I am manually updating clang to 19.1.6 and hitting a snag when I try to rebuilt rust.  I am seeing this error:

Building bootstrap
error: process didn't exit successfully: `/usr/bin/rustc -vV` (exit status: 127)
--- stderr
/usr/bin/rustc: error while loading shared libraries: libLLVM.so.18.1: cannot open shared object file: No such file or directory

failed to run: /usr/bin/cargo build --manifest-path /build/rust/src/rustc-1.83.0-src/src/bootstrap/Cargo.toml --locked --frozen

Up to this point, I built the following packages in the order below in a clean-chroot-root, and have them in a staging repo so that the new version is pulled in as a dep/makedep if needed:

llvm-19.1.6-1-x86_64.pkg.tar.zst
llvm-libs-19.1.6-1-x86_64.pkg.tar.zst
compiler-rt-19.1.6-1-x86_64.pkg.tar.zst
clang-19.1.6-1-x86_64.pkg.tar.zst
lld-19.1.6-1-x86_64.pkg.tar.zst

Did I miss something that would be providing the older version of libLLVM.so?

Last edited by graysky (2024-12-29 09:31:06)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2024-12-28 17:45:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,254

Re: Unable to build rust against clang 19.1.6 due to an old lib [solved]

as always, use ldd-tree to see what's pulling in the old lib

Edit: Notice it's bootstrapping, so it needs rust to build rust, and you don't have a working rust. You'll need both versions in the chroot to build it, most likely

Last edited by Scimmia (2024-12-28 17:47:40)

Offline

#3 2024-12-28 18:11:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,673
Website

Re: Unable to build rust against clang 19.1.6 due to an old lib [solved]

Sorry, I don't follow.  You're saying I need to build rust with a bootstrap package of rust?  I did not see a corresponding PKGBUILD for rust-bootstrap.

EDIT: Ah, you're suggesting that I need llvm-libs from18.1.8 in the build-root as well as version 19.1.6... short of me manually copying them into the build-root, is there a more elegant method?  For the record, running the below after creating the build-root allow rust to build:

for i in libLLVM.so.18.1 libRemarks.so.18.1 libLTO.so.18.1; do
  cp /usr/lib/$i /scratch/.buildroot/facade/usr/lib
done

Last edited by graysky (2024-12-28 19:21:49)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2024-12-28 22:31:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,254

Re: Unable to build rust against clang 19.1.6 due to an old lib [solved]

right, often something like this would be done by packaging the old libs (like https://aur.archlinux.org/packages/llvm17-libs) and using that in the chroot. After it's built, it can then be rebuilt with the new rust package so you don't have to have the old libs to make it reproducible.

Offline

#5 2024-12-28 23:14:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,673
Website

Re: Unable to build rust against clang 19.1.6 due to an old lib [solved]

Ah, I missed the libs only package but did see the llvm14 package.  Makes sense.

Update the wiki: https://wiki.archlinux.org/index.php?ti … did=814596

Last edited by graysky (2024-12-29 09:51:39)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB