web-devkits / Wasmnizer-ts

Toolchain for compiling TypeScript to WasmGC
Apache License 2.0
302 stars 26 forks source link

how to use iwasm_gc? #131

Closed beautiful-boyyy closed 9 months ago

beautiful-boyyy commented 9 months ago

I got iwasm by homebrew because i can't build runtime library on my computer. Can you give a more detailed example? Screenshot 2023-12-25 at 19 44 06 sys: arm64 macos 14.1

yviansu commented 9 months ago

Hi, to run the generated wasm file, you should build iwasm_gc through runtime-library's cmake file: https://github.com/web-devkits/Wasmnizer-ts/blob/main/runtime-library/README.md The iwasm generated by homebrew lacks the registered native APIs, and lacks the supported of gc proposal, so it will report WASM module load failed error.

However, you say that can not build runtime-library on your computer, would you like to share the error details to us to diagnose root cause?

beautiful-boyyy commented 9 months ago

Hi, to run the generated wasm file, you should build iwasm_gc through runtime-library's cmake file: https://github.com/web-devkits/Wasmnizer-ts/blob/main/runtime-library/README.md The iwasm generated by homebrew lacks the registered native APIs, and lacks the supported of gc proposal, so it will report WASM module load failed error.

However, you say that can not build runtime-library on your computer, would you like to share the error details to us to diagnose root cause?


Wasmnizer-ts/runtime-library main ✗ ./build.sh
CMake Deprecation Warning at CMakeLists.txt:6 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Build Configurations: Build as target X86_64 CMAKE_BUILD_TYPE Release WAMR Interpreter enabled WAMR AOT enabled WAMR Fast JIT disabled WAMR LLVM ORC JIT disabled Libc builtin enabled Libc WASI disabled Fast interpreter enabled Multiple modules disabled Bulk memory feature enabled Wakeup of blocking operations enabled SIMD enabled Reference types enabled GC enabled GC performance profiling disabled Stringref enabled Using custom implementation for stringref Write linear memory base addr to x86 GS register disabled

yviansu commented 9 months ago

Hi, thanks for reporting this bug! Our build script build.sh is valid for Linux, but it not worked in MacOS, we will provide a valid script to support build in MacOS!

yviansu commented 9 months ago

Hi, we updated cmake file, now you can build iwasm_gc by the following command:

./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64

Then you can find iwasm_gc in runtime-library/build.

Please let me know if any other error occurs, thanks a lot!

beautiful-boyyy commented 9 months ago

Hi, we updated cmake file, now you can build iwasm_gc by the following command:

./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64

Then you can find iwasm_gc in runtime-library/build.

Please let me know if any other error occurs, thanks a lot!

still have errors

➜  Wasmnizer-ts/runtime-library main ✗ ./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64
Cloning into 'quickjs'...
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% (69/69), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 69 (delta 7), reused 25 (delta 4), pack-reused 0
Receiving objects: 100% (69/69), 612.04 KiB | 1.53 MiB/s, done.
Resolving deltas: 100% (7/7), done.
Cloning into 'wamr-gc'...
remote: Enumerating objects: 1752, done.
remote: Counting objects: 100% (1752/1752), done.
remote: Compressing objects: 100% (1448/1448), done.
remote: Total 1752 (delta 348), reused 940 (delta 225), pack-reused 0
Receiving objects: 100% (1752/1752), 4.80 MiB | 3.70 MiB/s, done.
Resolving deltas: 100% (348/348), done.
CMake Deprecation Warning at CMakeLists.txt:6 (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.

-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Configurations:
     Build as target X86_64
     CMAKE_BUILD_TYPE Release
     WAMR Interpreter enabled
     WAMR AOT enabled
     WAMR Fast JIT disabled
     WAMR LLVM ORC JIT disabled
     Libc builtin enabled
     Libc WASI disabled
     Fast interpreter enabled
     Multiple modules disabled
     Bulk memory feature enabled
     Wakeup of blocking operations enabled
     SIMD enabled
     Reference types enabled
     GC enabled
     GC performance profiling disabled
     Stringref enabled
       Using custom implementation for stringref
-- The ASM compiler identification is AppleClang
-- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
     * Use libdyntype implemented based on quickjs
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/build
./build.sh: line 15: nproc: command not found
[  1%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/darwin/platform_init.c.o
[  3%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_blocking_op.c.o
[  4%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_malloc.c.o
[  7%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_memmap.c.o
[  9%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_sleep.c.o
[  9%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_thread.c.o
[ 10%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_assert.c.o
[ 12%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_hmu.c.o
[ 14%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_kfc.c.o
[ 15%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_log.c.o
[ 17%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_hashmap.c.o
[ 18%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_common.c.o
[ 20%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_queue.c.o
[ 21%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_alloc.c.o
[ 23%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_time.c.o
[ 25%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_exec_env.c.o
[ 26%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_memory.c.o
[ 28%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_gc.c.o
[ 29%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c.o
[ 31%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_list.c.o
[ 32%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_native.c.o
[ 34%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_vector.c.o
[ 35%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_blocking_op.c.o
[ 37%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_application.c.o
[ 39%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.c.o
[ 40%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_c_api.c.o
[ 42%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/runtime_timer.c.o
[ 43%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_bitmap.c.o
In file included from /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.c:11:
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/ems/ems_gc.h:73:16: warning: redefinition of typedef 'gc_finalizer_t' is a C11 feature [-Wtypedef-redefinition]
typedef void (*gc_finalizer_t)(void *obj, void *data);
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.h:20:16: note: previous definition is here
typedef void (*gc_finalizer_t)(void *obj, void *data);
               ^
1 warning generated.
[ 45%] Building ASM object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s.o
[ 46%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_loader.c.o
[ 48%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_runtime.c.o
[ 51%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_shared_memory.c.o
[ 51%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_loader.c.o
[ 53%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_runtime.c.o
[ 54%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_interp_fast.c.o
[ 57%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_type.c.o
[ 59%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_runtime_common.c.o
[ 60%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/arch/aot_reloc_x86_64.c.o
[ 60%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_common.c.o
[ 62%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_object.c.o
[ 64%] Building C object CMakeFiles/vmlib.dir/stringref/stringref_qjs.c.o
[ 65%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_intrinsic.c.o
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:19:10: error: unknown token in expression
    push %rbp
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:19:10: error: invalid operand
    push %rbp
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:20:9: error: unknown token in expression
    mov %rsp, %rbp
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:20:9: error: invalid operand
    mov %rsp, %rbp
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:22:9: error: unknown token in expression
    mov %rdx, %r10
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:22:9: error: invalid operand
    mov %rdx, %r10
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:23:9: error: unknown token in expression
    mov %rsp, %r11
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:23:9: error: invalid operand
    mov %rsp, %r11
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:24:13: error: unknown token in expression
    and $8, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:24:13: error: invalid operand
    and $8, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:25:5: error: unrecognized instruction mnemonic
    je check_stack_succ
    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:26:5: error: unrecognized instruction mnemonic, did you mean: hint?
    int3
    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:28:9: error: unknown token in expression
    mov %r10, %r11
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:28:9: error: invalid operand
    mov %r10, %r11
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:29:13: error: unknown token in expression
    and $1, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:29:13: error: invalid operand
    and $1, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:30:13: error: unknown token in expression
    shl $3, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:30:13: error: invalid operand
    shl $3, %r11
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:31:9: error: unknown token in expression
    sub %r11, %rsp
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:31:9: error: invalid operand
    sub %r11, %rsp
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:33:10: error: unknown token in expression
    movq %rdi, %r11
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:33:10: error: invalid operand
    movq %rdi, %r11
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:34:10: error: unknown token in expression
    movq %r10, %rcx
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:34:10: error: invalid operand
    movq %r10, %rcx
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:35:17: error: unexpected token in argument list
    lea 128+48-8(%rsi,%rcx,8), %r10
                ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:36:9: error: unknown token in expression
    sub %rsp, %r10
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:36:9: error: invalid operand
    sub %rsp, %r10
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:37:14: error: unknown token in expression
    cmpq $0, %rcx
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:37:14: error: invalid operand
    cmpq $0, %rcx
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:38:5: error: unrecognized instruction mnemonic
    je push_args_end
    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:40:11: error: unexpected token in argument list
    push 0(%rsp,%r10)
          ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:41:5: error: unrecognized instruction mnemonic
    loop push_args
    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:44:16: error: unexpected token in argument list
    movdqu 0x00(%rsi), %xmm0
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:45:16: error: unexpected token in argument list
    movdqu 0x10(%rsi), %xmm1
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:46:16: error: unexpected token in argument list
    movdqu 0x20(%rsi), %xmm2
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:47:16: error: unexpected token in argument list
    movdqu 0x30(%rsi), %xmm3
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:48:16: error: unexpected token in argument list
    movdqu 0x40(%rsi), %xmm4
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:49:16: error: unexpected token in argument list
    movdqu 0x50(%rsi), %xmm5
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:50:16: error: unexpected token in argument list
    movdqu 0x60(%rsi), %xmm6
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:51:16: error: unexpected token in argument list
    movdqu 0x70(%rsi), %xmm7
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:54:14: error: unexpected token in argument list
    movq 0x80(%rsi), %rdi
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:55:14: error: unexpected token in argument list
    movq 0x90(%rsi), %rdx
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:56:14: error: unexpected token in argument list
    movq 0x98(%rsi), %rcx
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:57:14: error: unexpected token in argument list
    movq 0xa0(%rsi), %r8
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:58:14: error: unexpected token in argument list
    movq 0xa8(%rsi), %r9
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:59:14: error: unexpected token in argument list
    movq 0x88(%rsi), %rsi
             ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:61:10: error: invalid token in expression
    call *%r11
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:61:10: error: invalid operand
    call *%r11
         ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s:62:5: error: unrecognized instruction mnemonic
    leave
    ^
make[2]: *** [CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/arch/invokeNative_em64_simd.s.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/stringref/stringref_qjs.c:8:
In file included from /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/libdyntype/dynamic-qjs/type.h:7:
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/quickjs/cutils.h:52:13: warning: redefinition of typedef 'BOOL' is a C11 feature [-Wtypedef-redefinition]
typedef int BOOL;
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/quickjs/quickjs.h:55:13: note: previous definition is here
typedef int BOOL;
            ^
1 warning generated.
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/gc/gc_type.c:753:1: warning: unused function 'wasm_is_reftype_supers_of_extern' [-Wunused-function]
wasm_is_reftype_supers_of_extern(uint8 type)
^
1 warning generated.
make[1]: *** [CMakeFiles/vmlib.dir/all] Error 2
make: *** [all] Error 2
yviansu commented 9 months ago

Hi, we updated cmake file, now you can build iwasm_gc by the following command:

./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64

Then you can find iwasm_gc in runtime-library/build.

Please let me know if any other error occurs, thanks a lot!

Hi, we updated build.sh so that it can accept all the arguments, please build again using the above command with the latest code, thanks!

beautiful-boyyy commented 9 months ago

Hi, we updated cmake file, now you can build iwasm_gc by the following command:

./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64

Then you can find iwasm_gc in runtime-library/build. Please let me know if any other error occurs, thanks a lot!

Hi, we updated build.sh so that it can accept all the arguments, please build again using the above commend with the latest code, thanks!

  Wasmnizer-ts/runtime-library main ✗ ./build.sh -DWAMR_BUILD_PLATFORM="darwin" -DWAMR_BUILD_TARGET=ARM64
Cloning into 'quickjs'...
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% (69/69), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 69 (delta 7), reused 25 (delta 4), pack-reused 0
Receiving objects: 100% (69/69), 612.04 KiB | 1.35 MiB/s, done.
Resolving deltas: 100% (7/7), done.
Cloning into 'wamr-gc'...
remote: Enumerating objects: 1752, done.
remote: Counting objects: 100% (1752/1752), done.
remote: Compressing objects: 100% (1448/1448), done.
remote: Total 1752 (delta 348), reused 937 (delta 225), pack-reused 0
Receiving objects: 100% (1752/1752), 4.80 MiB | 7.93 MiB/s, done.
Resolving deltas: 100% (348/348), done.
CMake Deprecation Warning at CMakeLists.txt:6 (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.

-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test M32_OK
-- Performing Test M32_OK - Success
-- Build Configurations:
     Build as target ARM64
     CMAKE_BUILD_TYPE Release
     WAMR Interpreter enabled
     WAMR AOT enabled
     WAMR Fast JIT disabled
     WAMR LLVM ORC JIT disabled
     Libc builtin enabled
     Libc WASI disabled
     Fast interpreter enabled
     Multiple modules disabled
     Bulk memory feature enabled
     Wakeup of blocking operations enabled
     SIMD enabled
     Reference types enabled
     GC enabled
     GC performance profiling disabled
     Stringref enabled
       Using custom implementation for stringref
-- The ASM compiler identification is AppleClang
-- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
     * Use libdyntype implemented based on quickjs
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/build
./build.sh: line 15: nproc: command not found
[  3%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_thread.c.o
[  4%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_alloc.c.o
[  6%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_sleep.c.o
[  6%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_blocking_op.c.o
[  9%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_malloc.c.o
[  9%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/darwin/platform_init.c.o
[ 12%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_assert.c.o
[ 12%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_memmap.c.o
[ 14%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.c.o
[ 15%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_bitmap.c.o
[ 17%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_hmu.c.o
[ 18%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_gc.c.o
[ 20%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/platform/common/posix/posix_time.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 23%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_c_api.c.o
[ 23%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_application.c.o
[ 25%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_memory.c.o
[ 26%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_native.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 28%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/mem-alloc/ems/ems_kfc.c.o
[ 29%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_hashmap.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 31%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_exec_env.c.o
[ 32%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/libraries/libc-builtin/libc_builtin_wrapper.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 37%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_runtime_common.c.o
[ 37%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_log.c.o
[ 37%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_common.c.o
[ 39%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_list.c.o
[ 40%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_blocking_op.c.o
[ 42%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_vector.c.o
[ 43%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_loader.c.o
[ 45%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/bh_queue.c.o
[ 48%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_interp_fast.c.o
[ 48%] Building ASM object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s.o
[ 50%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/shared/utils/runtime_timer.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 51%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/wasm_shared_memory.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 53%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/interpreter/wasm_runtime.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
[ 54%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/arch/aot_reloc_arm.c.o
[ 56%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_type.c.o
[ 57%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_loader.c.o
[ 59%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_common.c.o
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:24:21: error: vector register expected
        stmfd sp!, {r4, r5, r6, r7, lr}
                    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:24:23: error: unknown token in expression
        stmfd sp!, {r4, r5, r6, r7, lr}
                      ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:24:23: error: invalid operand
        stmfd sp!, {r4, r5, r6, r7, lr}
                      ^
[ 60%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/gc/gc_object.c.o
[ 62%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_intrinsic.c.o
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:26:13: error: invalid operand for instruction
        mov ip, r0
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:27:13: error: invalid operand for instruction
        mov r4, r1
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:28:13: error: invalid operand for instruction
        mov r5, r2
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:30:13: error: invalid operand for instruction
        cmp r5, #1
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:33:13: error: invalid operand for instruction
        mov r6, #0
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:35:13: error: invalid operand for instruction
        ldr r0, [r4], #4
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:36:13: error: invalid operand for instruction
        cmp r5, #1
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:39:13: error: invalid operand for instruction
        ldr r1, [r4], #4
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:40:13: error: invalid operand for instruction
        cmp r5, #2
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:43:13: error: invalid operand for instruction
        ldr r2, [r4], #4
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:44:13: error: invalid operand for instruction
        cmp r5, #3
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:47:13: error: invalid operand for instruction
        ldr r3, [r4], #4
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:48:13: error: invalid operand for instruction
        cmp r5, #4
       [ 64%] Buildiclang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
ng C object CMakeFiles/vmlib.dir/stringref/stringref_qjs.c.o
     ^
[ 65%] Building C object CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/aot/aot_runtime.c.o
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:51:13: error: invalid operand for instruction
        sub r5, r5, #4
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:54:13: error: invalid operand for instruction
        mov r6, r5, lsl#2
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:55:13: error: invalid operand for instruction
        add r6, r6, #7
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:56:13: lang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
1;31mIn file included from error: /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.c:11:
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/ems/ems_gc.h:73:16: warning: redefinition of typedef 'gc_finalizer_t' is a C11 feature [-Wtypedef-redefinition]
typedef void (*gc_finalizer_t)(void *obj, void *data);
               ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/shared/mem-alloc/mem_alloc.h:20:16: note: previous definition is here
typedef void (*gc_finalizer_t)(void *obj, void *data);
               ^
invalid operand for instruction
        bic r6, r6, #7
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:57:21: error: expected compatible register, symbol or integer in range [0, 4095]
        sub sp, sp, r6
                    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:58:13: error: invalid operand for instruction
        mov r7, sp
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:61:13: error: invalid operand for instruction
        cmp r5, #0
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:63:18: error: invalid operand for instruction
^[[?62;cclang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
        ldr lr, [r4], #4
                 ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:64:18: error: invalid operand for instruction
        str lr, [r7], #4
                 ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:65:13: error: invalid operand for instruction
        sub r5, r5, #1
            ^
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:69:9: error: unrecognized instruction mnemonic, did you mean: b, bl, blr, bsl, tbl, tbx?
        blx ip
        ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:70:21: error: expected compatible register, symbol or integer in range [0, 4095]
        add sp, sp, r6
                    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:74:21: error: vector register expected
        ldmfd sp!, {r4, r5, r6, r7, lr}
                    ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:74:23: error: unknown token in expression
        ldmfd sp!, {r4, r5, r6, r7, clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
lr}
                      ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:74:23: error: invalid operand
        ldmfd sp!, {r4, r5, r6, r7, lr}
                      ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s:75:9: error: unrecognized instruction mnemonic, did you mean: b, bcax, bl, br, sb, tbx?
        bx lr
        ^
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
make[2]: *** [CMakeFiles/vmlib.dir/deps/wamr-gc/core/iwasm/common/arch/invokeNative_arm.s.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 warning generated.
clang: warning: argument unused during compilation: '-marm' [-Wunused-command-line-argument]
In file included from /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/stringref/stringref_qjs.c:8:
In file included from /Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/libdyntype/dynamic-qjs/type.h:7:
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/quickjs/cutils.h:52:13: warning: redefinition of typedef 'BOOL' is a C11 feature [-Wtypedef-redefinition]
typedef int BOOL;
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/quickjs/quickjs.h:55:13: note: previous definition is here
typedef int BOOL;
            ^
/Users/fgui/PersonalSpace/Wasmnizer-ts/runtime-library/deps/wamr-gc/core/iwasm/common/gc/gc_type.c:753:1: warning: unused function 'wasm_is_reftype_supers_of_extern' [-Wunused-function]
wasm_is_reftype_supers_of_extern(uint8 type)
^
1 warning generated.
1 warning generated.
make[1]: *** [CMakeFiles/vmlib.dir/all] Error 2
make: *** [all] Error 2
yviansu commented 9 months ago

Hi, we received your reported bug, and we will figure out the solution ASAP.

xujuntwt95329 commented 9 months ago

@beautiful-boyyy Hi, could you replace -DWAMR_BUILD_TARGET=ARM64 to -DWAMR_BUILD_TARGET=AARCH64 when executing the build script and try again?

beautiful-boyyy commented 9 months ago

@beautiful-boyyy Hi, could you replace -DWAMR_BUILD_TARGET=ARM64 to -DWAMR_BUILD_TARGET=AARCH64 when executing the build script and try again?

thanks, sloved