Description
The embedder-example.c returns a null pointer when it executes the wasm_module_new_text function.
My configuation is as follows
starship:~/work/tagion_main/WAVM/Examples/embedder/c> uname -a
Linux starship 4.15.0-1073-oem #83-Ubuntu SMP Mon Feb 17 11:21:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
starship:~/work/tagion_main/WAVM/Examples/embedder/c> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
starship:/work/tagion_main/WAVM/Examples/embedder/c> g++ --version18.04) 7.5.0
g++ (Ubuntu 7.5.0-3ubuntu1
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
starship:/work/tagion_main/WAVM/Examples/embedder/c> dpkg -l|grep llvmubuntu18.04.2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm6.0:amd64 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm9:amd64 1:9-2
ii llvm 1:6.0-41exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM)
ii llvm-6.0 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies
ii llvm-6.0-dev 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-6.0-runtime 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-runtime 1:6.0-41exp5ubuntu1 amd64 Low-Level Virtual Machine (LLVM), bytecode interpreter
I have forked the project into https://github.com/tagion/WAVM.git.
git clone https://github.com/tagion/WAVM.git
git fetch
git checkout examble_null_result
The example is placed in.
cd Examples/embedder/c
And hardcoded Makefile is also place in this directory.
Run the example by
starship:~/work/tagion_main/WAVM/Examples/embedder/c> make
export LD_LIBARY_PATH=/home/carsten/work/tagion_main/WAVM; ./embedder-example
engine 0x55fe5b9d5f20
compartment 0x55fe5b9d6370
store 0x55fe5b9d7480
Start
sizeof(hello_wast) =147
module (nil)
Makefile:20: recipe for target 'run' failed
make: *** [run] Error 1
Thank you
cbleser