WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

on arm32, wasmedge build failed : undefined reference to `__register_frame'

Open chairwa opened this issue 1 year ago • 2 comments

Summary

I'm build wasmedge in arm32v7/ubuntu:20.04 container, but it failed when Linking CXX executable wasmedge.

Current State

build failed

Expected State

build successful

Reproduction steps

export LLVM_DIR=/usr/lib/llvm-12/lib/cmake/llvm
export LLD_DIR=/usr/lib/llvm-12/lib/cmake/lld

# vim CMakeLists.txt to add
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon")

mkdir build
cd build
cmake -Wno-dev ..
make
[ 95%] Built target wasmedgeCAPI
Scanning dependencies of target wasmedge_shared
[ 96%] Linking CXX shared library libwasmedge.so
[ 96%] Built target wasmedge_shared
Scanning dependencies of target wasmedge
Scanning dependencies of target wasmedgec
[ 98%] Building CXX object tools/wasmedge/CMakeFiles/wasmedge.dir/wasmedge.cpp.o
[ 98%] Building CXX object tools/wasmedge/CMakeFiles/wasmedgec.dir/wasmedgec.cpp.o
[100%] Linking CXX executable wasmedge
[100%] Linking CXX executable wasmedgec
/usr/bin/ld: ../../lib/api/libwasmedge.so.0.1.0: undefined reference to `__deregister_frame'
/usr/bin/ld: ../../lib/api/libwasmedge.so.0.1.0: undefined reference to `__register_frame'
/usr/bin/ld: ../../lib/api/libwasmedge.so.0.1.0: undefined reference to `__deregister_frame'
/usr/bin/ld: ../../lib/api/libwasmedge.so.0.1.0: undefined reference to `__register_frame'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[2]: *** [tools/wasmedge/CMakeFiles/wasmedge.dir/build.make:87: tools/wasmedge/wasmedge] Error 1
make[2]: *** [tools/wasmedge/CMakeFiles/wasmedgec.dir/build.make:87: tools/wasmedge/wasmedgec] Error 1
make[1]: *** [CMakeFiles/Makefile2:1195: tools/wasmedge/CMakeFiles/wasmedge.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1224: tools/wasmedge/CMakeFiles/wasmedgec.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Screenshots

DESCRIPTION

Any logs you want to share for showing the specific issue

No response

Components

CLI

WasmEdge Version or Commit you used

WasmEdge-0.14.0-src.tar.gz

Operating system information

arm32v7/ubuntu:20.04

Hardware Architecture

arm32

Compiler flags and options

No response

chairwa avatar Jul 09 '24 08:07 chairwa

Unlike x86_64 libgcc, /usr/lib/arm-linux-gnueabihf/libgcc_s.so.1 not provide __register_frame. arm32 libunwind also did not provide these symbols.

chairwa avatar Jul 09 '24 08:07 chairwa

Thanks, @chairwa, for raising this. @ibmibmibm is going to take a look.

hydai avatar Jul 09 '24 09:07 hydai

This issue is the same as #3239 This workaround should help: https://github.com/WasmEdge/WasmEdge/issues/3239#issuecomment-2940568604

hydai avatar Jun 04 '25 23:06 hydai