libstdc++.so.6: no version information available or libstdc++.so.6: cannot open shared object file
giuliohome opened this issue · comments
Summary
I'not able to install WasmEdge on Alpine Linux v3.19
P.S.
seen the #1015
Current State
Install scripts fail
Expected State
I hope WasmEdge can be installed on Alpine
Reproduction steps
I'm currently getting
# curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash
Using Python: /usr/bin/python3
INFO - CUDA cannot be detected via nvcc
INFO - CUDA 12.x cannot be detected via nvidia-smi
ERROR - Exception on process - rc= 1 output= b'' command= ['cat /etc/lsb-release 2>/dev/null | grep RELEASE']
ERROR - Exception on process - rc= 1 output= b'' command= ['cat /etc/lsb_release 2>/dev/null | grep DESCRIPTION']
INFO - Compatible with current configuration
INFO - Running Uninstaller
WARNING - SHELL variable not found. Using bash as SHELL
INFO - shell configuration updated
INFO - Downloading WasmEdge
|============================================================|100.00 %INFO - Downloaded
INFO - Installing WasmEdge
/root/.wasmedge/bin/wasmedge: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
ERROR - Exception on process - rc= 127 output= b'' command= ['. /root/.wasmedge/env && /root/.wasmedge/bin/wasmedge --version']
CRITICAL- WasmEdge installation incorrect:
INFO - Run:
source /root/.bashrc
and previously
# curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -p /usr/local
Using Python: /usr/bin/python3
INFO - CUDA cannot be detected via nvcc
INFO - CUDA 12.x cannot be detected via nvidia-smi
ERROR - Exception on process - rc= 1 output= b'' command= ['cat /etc/lsb-release 2>/dev/null | grep RELEASE']
ERROR - Exception on process - rc= 1 output= b'' command= ['cat /etc/lsb_release 2>/dev/null | grep DESCRIPTION']
INFO - Compatible with current configuration
INFO - Running Uninstaller
WARNING - SHELL variable not found. Using bash as SHELL
INFO - shell configuration updated
INFO - Downloading WasmEdge
|============================================================|100.00 %INFO - Downloaded
INFO - Installing WasmEdge
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
/usr/local/bin/wasmedge: /usr/lib/libstdc++.so.6: no version information available (required by /usr/local/lib/libwasmedge.so.0)
ERROR - Exception on process - rc= -11 output= b'' command= ['. /usr/local/env && /usr/local/bin/wasmedge --version']
CRITICAL- WasmEdge installation incorrect:
INFO - Run:
source /root/.bashrc
Screenshots
Any logs you want to share for showing the specific issue
I've tried with https://github.com/sgerrand/alpine-pkg-glibc
# wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
et https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
apk add glibc-2.35-r1.apklocalhost:~/cloud/crun# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.109.133:443)
saving to 'glibc-2.35-r1.apk'
glibc-2.35-r1.apk 100% |*******************************************************************************************************************************************************************| 2760k 0:00:00 ETA
'glibc-2.35-r1.apk' saved
localhost:~/cloud/crun# apk add glibc-2.35-r1.apk
(1/13) Upgrading glibc (2.35-r0 -> 2.35-r1)
(2/13) Installing util-linux-openrc (2.39.3-r0)
(3/13) Installing flock (2.39.3-r0)
(4/13) Installing lsblk (2.39.3-r0)
(5/13) Installing libcap-ng (0.8.4-r0)
(6/13) Installing setpriv (2.39.3-r0)
(7/13) Installing logger (2.39.3-r0)
(8/13) Installing partx (2.39.3-r0)
(9/13) Installing fstrim (2.39.3-r0)
(10/13) Installing util-linux-bash-completion (2.39.3-r0)
(11/13) Installing findmnt (2.39.3-r0)
(12/13) Installing nginx-vim (1.24.0-r15)
(13/13) Installing yajl-dev (2.1.0-r8)
Components
CLI
WasmEdge Version or Commit you used
latest
Operating system information
Alpine Linux v3.19
Hardware Architecture
x86_64
Compiler flags and options
# cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/13.2.1/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-13-20231014/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --enable-checking=release --disable-cet --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-languages=c,c++,d,objc,go,fortran,ada --enable-link-serialization=2 --enable-linker-build-id --disable-libssp --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues --with-system-zlib --with-linker-hash-style=gnu --with-pkgversion='Alpine 13.2.1_git20231014'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.1 20231014 (Alpine 13.2.1_git20231014)
I'm trying to build this from source on podman.
to be continued...
Since the maintainers don't use Alpine Linux and are not familiar with it, we have no plan to make the installer support Alpine Linux. Please feel free to submit a PR to make it work.
As a workaround, you can download the static build for the Alpine Linux(musl libc) on both x86_64 and arm64 platforms:
Thanks @hydai !
It looks to me a better approach than building from a podman container, I'll try this soon
shouldI just unzip and move the content to $HOME/.wasmedge
?
# tar -xvf WasmEdge-0.13.5-alpine3.16_x86_64_static.tar.gz
# cp -r WasmEdge-0.13.5-alpha.3-Linux/* $HOME/.wasmedge
what am I missing?
# podman run --rm --annotation module.wasm.image/variant=compat-smart docker.io/wasmedge/example-wasi:latest /wasi_example_main.wasm 50000000
{"msg":"exec container process `/wasi_example_main.wasm`: Exec format error","level":"error","time":"2024-04-12T14:13:41.982821Z"}
or maybe just locally?
# wasmedge -v
wasmedge: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Meanwhile, I'm resorting to podman source building again...
we have no plan to make the installer support Alpine Linux
Closing the issue in that case, will go on on my own for the moment (or maybe I'll switch to a supported OS).
Good to know, anyway.
FYI
I finally managed to build it with some help from chatgpt....
localhost:~/cloud/WasmEdge/build# apk add lld-dev
(1/3) Installing lld-libs (17.0.6-r0)
(2/3) Installing lld (17.0.6-r0)
(3/3) Installing lld-dev (17.0.6-r0)
Executing busybox-1.36.1-r25.trigger
OK: 2758 MiB in 303 packages
localhost:~/cloud/WasmEdge/build# cmake -DCMAKE_BUILD_TYPE=Release ..
-- Performing Test SUPPORT_EXCLUDE_LIBS
-- Performing Test SUPPORT_EXCLUDE_LIBS - Success
-- Version: 10.2.1
-- Build type: Release
-- Build spdlog: 1.13.0
-- Build type: Release
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done (4.5s)
-- Generating done (0.0s)
-- Build files have been written to: /root/cloud/WasmEdge/build
localhost:~/cloud/WasmEdge/build# cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_TESTS=ON ..
CMake Deprecation Warning at build/_deps/gtest-src/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at build/_deps/gtest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Found Python: /usr/bin/python3.11 (found version "3.11.8") found components: Interpreter
-- Downloading the WASM spec test suite
-- Downloading the WASM spec test suite -- done
-- Downloading SIMDJSON source
-- Looking for fork
-- Looking for fork - found
-- Looking for wait
-- Looking for wait - found
-- Adding -Og to compile flag
-- Downloading SIMDJSON source -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/core
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/core -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/multi-memory
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/multi-memory -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/tail-call
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/tail-call -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/extended-const
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/extended-const -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/threads
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/threads -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/function-references
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/function-references -- done
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/gc
-- Copying test suite to /root/cloud/WasmEdge/build/test/spec/testSuites/gc -- done
-- Version: 10.2.1
-- Build type: Release
-- Build spdlog: 1.13.0
-- Build type: Release
-- Configuring done (14.0s)
-- Generating done (0.2s)
-- Build files have been written to: /root/cloud/WasmEdge/build
Looking into this https://github.com/WasmEdge/WasmEdge/blob/master/utils/docker/Dockerfile.alpine-static could be interesting too.
alpine 3.17 and 3.18 do not ship lld-static
🎉
on a vm with 5 vcpu and 8GB ram
skipping the tests cmake -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_TESTS=OFF ..
# make -j
[ 15%] Built target utilBlake3
[ 14%] Built target wasmedgeCommon
[ 17%] Built target wasmedgePO
[ 21%] Built target wasmedgeValidator
[ 27%] Built target wasmedgeSystem
[ 32%] Built target wasmedgeLoaderFileMgr
[ 36%] Built target wasmedgeAOT
[ 46%] Built target wasmedgeHostModuleWasi
[ 48%] Built target wasmedgePlugin
[ 60%] Built target wasmedgeLoader
[ 83%] Built target wasmedgeExecutor
[ 85%] Built target wasmedgeVM
[ 88%] Building CXX object lib/driver/CMakeFiles/wasmedgeDriver.dir/runtimeTool.cpp.o
[ 89%] Building CXX object lib/driver/CMakeFiles/wasmedgeDriver.dir/compilerTool.cpp.o
[ 90%] Building CXX object lib/driver/CMakeFiles/wasmedgeDriver.dir/fuzzPO.cpp.o
[ 90%] Building CXX object lib/driver/CMakeFiles/wasmedgeDriver.dir/fuzzTool.cpp.o
[ 91%] Building CXX object lib/driver/CMakeFiles/wasmedgeDriver.dir/uniTool.cpp.o
[ 92%] Linking CXX static library libwasmedgeDriver.a
[ 92%] Built target wasmedgeDriver
[ 94%] Building CXX object lib/api/CMakeFiles/wasmedgeCAPI.dir/wasmedge.cpp.o
[ 94%] Built target wasmedgeCAPI
[ 95%] Linking CXX shared library libwasmedge.so
[ 95%] Built target wasmedge_shared
[ 97%] Building CXX object tools/wasmedge/CMakeFiles/wasmedge.dir/wasmedge.cpp.o
[ 97%] Building CXX object tools/wasmedge/CMakeFiles/wasmedgec.dir/wasmedgec.cpp.o
[100%] Linking CXX executable wasmedgec
[100%] Linking CXX executable wasmedge
[100%] Built target wasmedgec
[100%] Built target wasmedge
localhost:~/cloud/wasmedge/build# tools/wasmedge/wasmedge -v
tools/wasmedge/wasmedge version 0.13.5
localhost:~/cloud/wasmedge/build# tools/wasmedge/wasmedge ~/cloud/rust-examples/hello/target/wasm32-wasi/release/hello.
wasm
Hello WasmEdge!