From a5d6fa9ddf298abe3582086529eca02d8c77eb61 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 Aug 2025 16:07:15 +0000 Subject: [PATCH 01/13] Initial plan From 85c38a67a34f41337c9e736264df75e4593e210d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 Aug 2025 16:15:32 +0000 Subject: [PATCH 02/13] Fix aws-lc-rs linking issue in PKGBUILD-GIT and add AUR check workflow Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- .github/workflows/aur-check.yml | 122 ++++++++++++++++++++++++++++++++ aur/PKGBUILD-GIT | 25 +++++-- 2 files changed, 142 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/aur-check.yml diff --git a/.github/workflows/aur-check.yml b/.github/workflows/aur-check.yml new file mode 100644 index 00000000..b2fd59f4 --- /dev/null +++ b/.github/workflows/aur-check.yml @@ -0,0 +1,122 @@ +name: Arch Linux Container Validation + +on: + pull_request: + paths: + - '.github/workflows/aur-check.yml' + - 'aur/**' + push: + paths: + - '.github/workflows/aur-check.yml' + - 'aur/**' + branches: + - main + workflow_dispatch: + +jobs: + archlinux-validation: + name: Arch Linux Container Build & Test + runs-on: ubuntu-latest + container: + image: archlinux/archlinux:multilib-devel + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache Pacman Dependencies + uses: actions/cache@v4 + with: + path: /var/cache/pacman/pkg + key: ${{ runner.os }}-pacman-${{ hashFiles('/etc/pacman.conf', '/etc/makepkg.config', '/etc/makepkg/rust.conf') }} + restore-keys: | + ${{ runner.os }}-pacman- + + - name: Install base dependencies + run: | + pacman -Syu --noconfirm + + pacman -S --noconfirm \ + namcap \ + shellcheck \ + debugedit \ + fakeroot \ + sudo \ + pkgconf \ + libc++ \ + cmake \ + openssl \ + clang \ + llvm \ + perl \ + ninja \ + go \ + git \ + glibc \ + gcc-libs + + - name: Setup build user + run: | + useradd -m -s /bin/bash builder + + echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + + - name: Validate PKGBUILD files + run: | + set -e + + # Color codes + RED='\033[0;31m' + GREEN='\033[0;32m' + YELLOW='\033[1;33m' + BLUE='\033[0;34m' + MAGENTA='\033[0;35m' + CYAN='\033[0;36m' + WHITE='\033[1;37m' + NC='\033[0m' # No Color + + for pathname in aur/PKGBUILD-GIT*; do + if [ -f "${pathname}" ]; then + filename=$(basename ${pathname}) + dirname=$(dirname ${pathname}) + + echo -e "${CYAN}============ Validating [${NC}${filename}${CYAN}] ============${NC}\n\n" + + echo -e "${YELLOW}============ Running Shellcheck On${NC} ${filename} ${YELLOW}============${NC}\n" + if shellcheck --shell=bash --exclude=SC2034,SC2154,SC2164 "${pathname}"; then + echo -e "${GREEN}✅ Shellcheck passed${NC}" + else + echo -e "${RED}❌ Shellcheck failed${NC}" + exit 1 + fi + + chown -R builder:builder "${pathname}" + chown -R builder:builder "${dirname}" + + echo -e "${BLUE}============ Running Namcap On${NC} ${filename} ${BLUE}============${NC}\n" + if namcap "${pathname}"; then + echo -e "${GREEN}✅ Namcap passed${NC}" + else + echo -e "${RED}❌ Namcap failed${NC}" + exit 1 + fi + + echo -e "${MAGENTA}============ Running Makepkg On${NC} ${filename} ${MAGENTA}============${NC}" + + if sudo -u builder bash -c " + set -e + cd '${dirname}' + makepkg -scf --noconfirm -p '${filename}' + "; then + echo -e "${GREEN}✅ Makepkg completed successfully${NC}" + else + echo -e "${RED}❌ Makepkg failed${NC}" + exit 1 + fi + + echo -e "${GREEN}🎉 ${filename} Validation Completed Successfully!${NC}" + echo "" + fi + done + + echo -e "${GREEN}🚀 All PKGBUILD files validated successfully!${NC}" \ No newline at end of file diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 0163a8d8..ad0bdbd2 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'zig=0.13.0') +makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs') arch=('any') source=("git+https://github.com/cordx56/rustowl.git") sha256sums=('SKIP') @@ -21,24 +21,39 @@ pkgver() { prepare() { cd "$srcdir/rustowl" export RUSTC_BOOTSTRAP=1 - export RUSTUP_TOOLCHAIN=1.89.0 + export RUSTUP_TOOLCHAIN=1.88.0 rustup component add rust-src rustc-dev llvm-tools cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd "$srcdir/rustowl" - export CARGO_TARGET_DIR=target export RUSTC_BOOTSTRAP=1 - export RUSTUP_TOOLCHAIN=1.89.0 + export RUSTUP_TOOLCHAIN=1.88.0 export RUSTOWL_RUNTIME_DIRS=/opt/rustowl + + # Configure environment for aws-lc-sys build + export CC=gcc + export CXX=g++ + export CMAKE_C_COMPILER=gcc + export CMAKE_CXX_COMPILER=g++ + export AWS_LC_SYS_CMAKE_BUILDER=1 + export CMAKE_BUILD_TYPE=Release + export AWS_LC_SYS_STATIC=1 + export AWS_LC_SYS_NO_PREFIX=1 + + # Ensure proper library search paths + export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig + export LIBRARY_PATH=/usr/lib:/lib + export LD_LIBRARY_PATH=/usr/lib:/lib + cargo build --frozen --release --all-features --target $(rustc --print=host-tuple) } check() { cd "$srcdir/rustowl" export RUSTC_BOOTSTRAP=1 - export RUSTUP_TOOLCHAIN=1.89.0 + export RUSTUP_TOOLCHAIN=1.88.0 cargo test --frozen --all-features } From bd2f7e21a3aaba6f003071a0cae73ec70e0f4234 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 Aug 2025 16:17:29 +0000 Subject: [PATCH 03/13] Fix PKGBUILD-GIT quotes and add missing dependencies for aws-lc-sys Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index ad0bdbd2..73d7ce62 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs') +makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl') arch=('any') source=("git+https://github.com/cordx56/rustowl.git") sha256sums=('SKIP') @@ -47,7 +47,7 @@ build() { export LIBRARY_PATH=/usr/lib:/lib export LD_LIBRARY_PATH=/usr/lib:/lib - cargo build --frozen --release --all-features --target $(rustc --print=host-tuple) + cargo build --frozen --release --all-features --target "$(rustc --print=host-tuple)" } check() { @@ -62,7 +62,7 @@ package() { find target -type d | grep -E 'rustowl-build-time-out$' | xargs -I % cp -r % ./ mkdir sysroot ACTIVE_TOOLCHAIN="$(rustup show active-toolchain | awk '{ print $1 }')" - cp -r "$(rustc --print=sysroot)" sysroot/$ACTIVE_TOOLCHAIN + cp -r "$(rustc --print=sysroot)" sysroot/"$ACTIVE_TOOLCHAIN" find sysroot -type f | grep -v -E '\.(rlib|so|dylib|dll)$' | xargs rm -rf find sysroot -depth -type d -empty -exec rm -rf {} \; install -d -m 755 "$pkgdir/opt/rustowl" From f875d6be88b50991fcce2b659d510530451d439e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 Aug 2025 16:43:53 +0000 Subject: [PATCH 04/13] Add clang/llvm dependencies and bindgen configuration for aws-lc-sys Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 73d7ce62..3131f667 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl') +makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm') arch=('any') source=("git+https://github.com/cordx56/rustowl.git") sha256sums=('SKIP') @@ -42,6 +42,10 @@ build() { export AWS_LC_SYS_STATIC=1 export AWS_LC_SYS_NO_PREFIX=1 + # Configure bindgen for aws-lc-sys + export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" + export LIBCLANG_PATH=/usr/lib + # Ensure proper library search paths export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig export LIBRARY_PATH=/usr/lib:/lib From f29755c02bafe66b78ceff64944f0a9820ab9dde Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 01:33:47 +0000 Subject: [PATCH 05/13] Install bindgen-cli in prepare step to fix aws-lc-sys build Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 3131f667..5a6f6cf9 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -8,6 +8,10 @@ pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm') + +_build_deps=( + 'bindgen-cli' +) arch=('any') source=("git+https://github.com/cordx56/rustowl.git") sha256sums=('SKIP') @@ -23,6 +27,12 @@ prepare() { export RUSTC_BOOTSTRAP=1 export RUSTUP_TOOLCHAIN=1.88.0 rustup component add rust-src rustc-dev llvm-tools + + # Install bindgen-cli for aws-lc-sys + for dep in "${_build_deps[@]}"; do + cargo install --force --locked "$dep" + done + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } From 9dbaba0e2a67ca7f1e6ff0083193c719ba2075b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 06:55:52 +0000 Subject: [PATCH 06/13] feat(aur): add jemalloc build dependencies and configuration - Add automake, libtool, and nasm to makedepends for jemalloc build - Configure jemalloc build environment variables - Add CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS flag - Set JEMALLOC_SYS_WITH_MALLOC_CONF for jemalloc configuration Resolves jemalloc linking errors with tikv-jemallocator by ensuring proper build tools and configuration for jemalloc compilation. Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 5a6f6cf9..2289ac40 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm') +makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm') _build_deps=( 'bindgen-cli' @@ -56,6 +56,10 @@ build() { export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" export LIBCLANG_PATH=/usr/lib + # Configure jemalloc build environment + export JEMALLOC_SYS_WITH_MALLOC_CONF=background_thread:true + export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 + # Ensure proper library search paths export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig export LIBRARY_PATH=/usr/lib:/lib From 0da5695a510091e866e28b40bcf6ec5fc77ea64c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 07:14:34 +0000 Subject: [PATCH 07/13] fix(aur): add system jemalloc dependency and improve linking - Add jemalloc to makedepends for system library availability - Configure JEMALLOC_SYS_WITH_LG_PAGE for proper page size - Add RUSTFLAGS to explicitly link against system jemalloc - Improve jemalloc environment configuration for better compatibility Addresses undefined reference errors for mallocx, sdallocx, and rallocx symbols by ensuring proper jemalloc library linking. Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 2289ac40..0db819ea 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm') +makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm' 'jemalloc') _build_deps=( 'bindgen-cli' @@ -56,10 +56,15 @@ build() { export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" export LIBCLANG_PATH=/usr/lib - # Configure jemalloc build environment - export JEMALLOC_SYS_WITH_MALLOC_CONF=background_thread:true + # Force jemalloc to use system library with extended API + export JEMALLOC_SYS_WITH_LG_PAGE=16 + export JEMALLOC_SYS_WITH_MALLOC_CONF="background_thread:true" + export JEMALLOC_SYS_BACKGROUND_THREAD=1 export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 + # Link against system jemalloc + export RUSTFLAGS="-L /usr/lib -l jemalloc" + # Ensure proper library search paths export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig export LIBRARY_PATH=/usr/lib:/lib From 215a77474b38fe723adc00924e832bf4aef3b29d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 07:55:08 +0000 Subject: [PATCH 08/13] fix(aur): remove explicit compiler settings to resolve aws-lc-sys conflicts Remove CC, CXX, CMAKE_C_COMPILER, and CMAKE_CXX_COMPILER explicit settings that were causing conflicts between GCC and Clang. Let the build system use the default GCC compiler while keeping Clang available only for bindgen operations. This resolves the "two compilers" issue in aws-lc-sys build. Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 0db819ea..d9ac5dde 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -42,17 +42,13 @@ build() { export RUSTUP_TOOLCHAIN=1.88.0 export RUSTOWL_RUNTIME_DIRS=/opt/rustowl - # Configure environment for aws-lc-sys build - export CC=gcc - export CXX=g++ - export CMAKE_C_COMPILER=gcc - export CMAKE_CXX_COMPILER=g++ + # Configure environment for aws-lc-sys build with GCC export AWS_LC_SYS_CMAKE_BUILDER=1 export CMAKE_BUILD_TYPE=Release export AWS_LC_SYS_STATIC=1 export AWS_LC_SYS_NO_PREFIX=1 - # Configure bindgen for aws-lc-sys + # Configure bindgen for aws-lc-sys (clang needed for bindgen only) export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" export LIBCLANG_PATH=/usr/lib From dfab9ea4ee7dfa85a65c9b977a2aca5accc8b857 Mon Sep 17 00:00:00 2001 From: Muntasir Mahmud Date: Mon, 11 Aug 2025 14:15:39 +0600 Subject: [PATCH 09/13] Update PKGBUILD-GIT --- aur/PKGBUILD-GIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index d9ac5dde..897b9e18 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'gcc' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'openssl' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm' 'jemalloc') +makedepends=('git' 'rustup' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm' 'jemalloc') _build_deps=( 'bindgen-cli' From bb4181eda42df18049acf35743cdafaec5b963cf Mon Sep 17 00:00:00 2001 From: Muntasir Mahmud Date: Mon, 11 Aug 2025 14:40:32 +0600 Subject: [PATCH 10/13] Update PKGBUILD-GIT --- aur/PKGBUILD-GIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 897b9e18..c061cf44 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -7,7 +7,7 @@ pkgrel=1 pkgdesc='Visualize Ownership and Lifetimes in Rust' url='https://github.com/cordx56/rustowl' license=('MPL-2.0') -makedepends=('git' 'rustup' 'make' 'autoconf' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm' 'jemalloc') +makedepends=('git' 'rustup' 'make' 'autoconf' 'gcc' 'openssl' 'automake' 'libtool' 'cmake' 'ninja' 'go' 'glibc' 'gcc-libs' 'pkgconf' 'perl' 'clang' 'llvm' 'nasm' 'jemalloc') _build_deps=( 'bindgen-cli' From dac92fde1b4fd47dc2a40b5cb9a800e24fa7b54f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 08:56:35 +0000 Subject: [PATCH 11/13] fix(aur): improve AWS-LC linking with explicit target directory and linker flags Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index c061cf44..b646083c 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -42,13 +42,13 @@ build() { export RUSTUP_TOOLCHAIN=1.88.0 export RUSTOWL_RUNTIME_DIRS=/opt/rustowl - # Configure environment for aws-lc-sys build with GCC + # Configure environment for aws-lc-sys build export AWS_LC_SYS_CMAKE_BUILDER=1 export CMAKE_BUILD_TYPE=Release export AWS_LC_SYS_STATIC=1 export AWS_LC_SYS_NO_PREFIX=1 - # Configure bindgen for aws-lc-sys (clang needed for bindgen only) + # Configure bindgen for aws-lc-sys export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" export LIBCLANG_PATH=/usr/lib @@ -58,14 +58,17 @@ build() { export JEMALLOC_SYS_BACKGROUND_THREAD=1 export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 - # Link against system jemalloc - export RUSTFLAGS="-L /usr/lib -l jemalloc" + # Configure linker flags for AWS-LC and jemalloc + export RUSTFLAGS="-L /usr/lib -l jemalloc -L native=/tmp -C link-arg=-Wl,--allow-multiple-definition" # Ensure proper library search paths export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig export LIBRARY_PATH=/usr/lib:/lib export LD_LIBRARY_PATH=/usr/lib:/lib + # Set target directory to avoid conflicts + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features --target "$(rustc --print=host-tuple)" } From 646947db07774796bf35d7d604b4235f508f9452 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:02:11 +0000 Subject: [PATCH 12/13] fix(aur): use pregenerated AWS-LC bindings to avoid linking issues Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index b646083c..916a1c4b 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -42,11 +42,11 @@ build() { export RUSTUP_TOOLCHAIN=1.88.0 export RUSTOWL_RUNTIME_DIRS=/opt/rustowl - # Configure environment for aws-lc-sys build - export AWS_LC_SYS_CMAKE_BUILDER=1 - export CMAKE_BUILD_TYPE=Release - export AWS_LC_SYS_STATIC=1 + # Use pregenerated bindings for AWS-LC to avoid build issues + export AWS_LC_SYS_PREBUILT_NASM=1 export AWS_LC_SYS_NO_PREFIX=1 + unset AWS_LC_SYS_CMAKE_BUILDER + unset AWS_LC_SYS_STATIC # Configure bindgen for aws-lc-sys export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include" @@ -58,8 +58,8 @@ build() { export JEMALLOC_SYS_BACKGROUND_THREAD=1 export CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS=1 - # Configure linker flags for AWS-LC and jemalloc - export RUSTFLAGS="-L /usr/lib -l jemalloc -L native=/tmp -C link-arg=-Wl,--allow-multiple-definition" + # Configure linker flags for jemalloc + export RUSTFLAGS="-L /usr/lib -l jemalloc" # Ensure proper library search paths export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig From 83890218042c55daf82f50cc9e2976cf6f88ddc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:51:10 +0000 Subject: [PATCH 13/13] fix(aur): enable AWS_LC_SYS_STATIC for proper linking Co-authored-by: MuntasirSZN <161931072+MuntasirSZN@users.noreply.github.com> --- aur/PKGBUILD-GIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aur/PKGBUILD-GIT b/aur/PKGBUILD-GIT index 916a1c4b..d85a6031 100644 --- a/aur/PKGBUILD-GIT +++ b/aur/PKGBUILD-GIT @@ -45,8 +45,8 @@ build() { # Use pregenerated bindings for AWS-LC to avoid build issues export AWS_LC_SYS_PREBUILT_NASM=1 export AWS_LC_SYS_NO_PREFIX=1 + export AWS_LC_SYS_STATIC=1 unset AWS_LC_SYS_CMAKE_BUILDER - unset AWS_LC_SYS_STATIC # Configure bindgen for aws-lc-sys export BINDGEN_EXTRA_CLANG_ARGS="-I/usr/include"