ci(gitea): broaden libclang find pattern to match versioned sonames
CI / Security audit (RUSTSEC) (push) Failing after 1m31s
CI / Build + Clippy + Test (push) Failing after 4m18s
CI / Security audit (RUSTSEC) (push) Failing after 1m31s
CI / Build + Clippy + Test (push) Failing after 4m18s
Second LIBCLANG_PATH failure mode: my 'libclang.so.*' with -type f pattern returned nothing because Debian Bookworm's runtime library is 'libclang-14.so.1' (versioned, with no plain libclang.so.* symlink), and the .so symlink is itself a symlink not a regular file (-type f excludes it). bindgen accepts any of: libclang.so, libclang-*.so, libclang.so.*, libclang-*.so.* — so the broader 'libclang*.so*' (no -type filter) catches every variant. Also broadened search root from /usr/lib to /usr to cover both /usr/lib/x86_64-linux-gnu/ (runtime lib) and /usr/lib/llvm-*/lib/ (dev symlink). Log line now includes the actual matched path so future debugging is one glance.
This commit is contained in:
@@ -61,12 +61,18 @@ jobs:
|
||||
# Writing to $GITHUB_ENV propagates the value to subsequent steps
|
||||
# inside the act_runner Docker container; the workflow-level `env:`
|
||||
# block is not reliably visible there.
|
||||
#
|
||||
# Find pattern note: Debian Bookworm installs the runtime library as
|
||||
# `libclang-14.so.1` (versioned, no plain libclang.so.* symlink),
|
||||
# so a strict 'libclang.so.*' pattern returns nothing. The broader
|
||||
# 'libclang*.so*' matches every bindgen-compatible filename variant:
|
||||
# libclang.so, libclang-14.so, libclang.so.1, libclang-14.so.1.
|
||||
run: |
|
||||
set -e
|
||||
LIBCL=$(find /usr/lib -name 'libclang.so.*' -type f 2>/dev/null | head -1)
|
||||
test -n "$LIBCL" || { echo "ERROR: libclang.so.* not found under /usr/lib"; exit 1; }
|
||||
LIBCL=$(find /usr -name 'libclang*.so*' 2>/dev/null | head -1)
|
||||
test -n "$LIBCL" || { echo "ERROR: no libclang shared lib found under /usr"; exit 1; }
|
||||
LIBDIR=$(dirname "$LIBCL")
|
||||
echo "Resolved LIBCLANG_PATH=$LIBDIR"
|
||||
echo "Resolved LIBCLANG_PATH=$LIBDIR (found $LIBCL)"
|
||||
echo "LIBCLANG_PATH=$LIBDIR" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Cache cargo registry + build artifacts
|
||||
|
||||
Reference in New Issue
Block a user