Skip to content

Commit a98248c

Browse files
soulbirdsoulbird
and
soulbird
authored
fix: libwasmtime.so not available under centos arm (api7#129)
Co-authored-by: soulbird <[email protected]>
1 parent 5bb50d1 commit a98248c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

install-wasmtime.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ if [ -d wasmtime-c-api ]; then
3232
rm -rf wasmtime-c-api
3333
fi
3434
mv wasmtime-${VER}-${ARCH}-${os}-c-api wasmtime-c-api
35-
if echo "int main(void) {}" | gcc -o /dev/null -v -x c - &> /dev/stdout| grep collect | tr -s " " "\012" | grep musl; then
36-
# build from source code if the libc is musl
35+
if { echo "int main(void) {}" | gcc -o /dev/null -v -x c - &> /dev/stdout| grep collect | tr -s " " "\012" | grep musl; } \
36+
|| ( [[ -f /etc/redhat-release ]] && [[ "$arch" = "aarch64" ]] ); then
37+
# build from source code if the libc is musl or under centos aarch64
38+
if ! command -v cargo > /dev/null; then
39+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
40+
source "$HOME/.cargo/env"
41+
fi
42+
3743
git clone https://github.com/bytecodealliance/wasmtime -b ${VER} --depth 1 \
3844
&& cd wasmtime \
3945
&& git submodule update --init \

0 commit comments

Comments
 (0)