webassemblyEnclave 报错 fatal error: editline/readline.h: No such file or directory

make errors

在编译webassemblyEnclave项目时出现报错:

App/App.cpp:51:12: fatal error: editline/readline.h: No such file or directory
   51 |   #include <editline/readline.h>
      |            ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:206: App/App.o] Error 1

根据帖子安装libedit相关库

sudo apt install libeditline-dev
sudo apt install libedit-dev

并在Makefile文件中添加ledit链接

App_Cpp_Flags := $(App_C_Flags) -std=c++11 -ledit

然后再次编译遇到报错/usr/local/bin/ld: cannot find -lsgx_tstdcxx,按照之前的记录修改即可
再次编译,即可通过

run errors

在尝试运行该程序的时候出现报错:

$ ./app --debug arith.wasm
repl: 0, debug: 1, module path: arith.wasm
Error(Enclave/wa.cpp:2018): no exported function named '_main'
Exception

需要按照wac的运行方式运行

./app --debug arith.wasm add 2 3
repl: 0, debug: 1, module path: arith.wasm
0x5
Info: SampleEnclave successfully returned.
Enter a character before exit ...
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值