Skip to content

Commit

Permalink
bump(main/rust): 1.83.0
Browse files Browse the repository at this point in the history
In config.toml, for target x86_64-unknown-linux-gnu,
add "rpath = true" to resolve
stage 1 rustc librustc_driver*.so not found issue

Also drop the stage 1 cargo build in x86_64 step
workaround which should no longer be needed
  • Loading branch information
truboxl committed Nov 29, 2024
1 parent e680012 commit a9cae84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
15 changes: 3 additions & 12 deletions packages/rust/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.rust-lang.org/
TERMUX_PKG_DESCRIPTION="Systems programming language focused on safety, speed and concurrency"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.82.0"
TERMUX_PKG_VERSION="1.83.0"
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-${TERMUX_PKG_VERSION}-src.tar.xz
TERMUX_PKG_SHA256=1276a0bb8fa12288ba6fa96597d28b40e74c44257c051d3bc02c2b049bb38210
TERMUX_PKG_SHA256=7b11d4242dab0921a7d54758ad3fe805153c979c144625fecde11735760f97df
_LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)
_LLVM_MAJOR_VERSION_NEXT=$((_LLVM_MAJOR_VERSION + 1))
_LZMA_VERSION=$(. $TERMUX_SCRIPTDIR/packages/liblzma/build.sh; echo $TERMUX_PKG_VERSION)
Expand Down Expand Up @@ -132,7 +132,7 @@ termux_step_configure() {
# like 30 to 40 + minutes ... so lets get it right

# upstream tests build using versions N and N-1
local BOOTSTRAP_VERSION=1.81.0
local BOOTSTRAP_VERSION=1.82.0
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
if ! rustup install "${BOOTSTRAP_VERSION}"; then
echo "WARN: ${BOOTSTRAP_VERSION} is unavailable, fallback to stable version!"
Expand Down Expand Up @@ -200,15 +200,6 @@ termux_step_make() {
termux_step_make_install() {
unset CC CFLAGS CPP CPPFLAGS CXX CXXFLAGS LD LDFLAGS PKG_CONFIG RANLIB

# needed to workaround build issue that only happens on x86_64
# /home/runner/.termux-build/rust/build/build/bootstrap/debug/bootstrap: error while loading shared libraries: /lib/x86_64-linux-gnu/libc.so: invalid ELF header
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]] && [[ "${TERMUX_ARCH}" == "x86_64" ]]; then
mv -v ${TERMUX_PREFIX}{,.tmp}
${TERMUX_PKG_SRCDIR}/x.py build -j ${TERMUX_PKG_MAKE_PROCESSES} --host x86_64-unknown-linux-gnu --stage 1 cargo
[[ -d "${TERMUX_PREFIX}" ]] && termux_error_exit "Contaminated PREFIX found:\n$(find ${TERMUX_PREFIX} | sort)"
mv -v ${TERMUX_PREFIX}{.tmp,}
fi

# install causes on device build fail to continue
# dist uses a lot of spaces on CI
local job="install"
Expand Down
4 changes: 3 additions & 1 deletion packages/rust/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://github.com/rust-lang/rust/blob/master/config.example.toml

[llvm]
download-ci-llvm = false
link-shared = true

[build]
Expand Down Expand Up @@ -43,7 +44,8 @@ channel = "stable"
rpath = false

[target.x86_64-unknown-linux-gnu]
llvm-config = "/usr/bin/llvm-config-17"
llvm-config = "/usr/bin/llvm-config-18"
rpath = true

[target.aarch64-linux-android]
llvm-config = "@TERMUX_PREFIX@/bin/llvm-config"
Expand Down

0 comments on commit a9cae84

Please sign in to comment.