docker 共享:错误:BINARYEN_ROOT在/root/.emscripten中设置为空值

nvbavucw  于 2023-02-03  发布在  Docker
关注(0)|答案(2)|浏览(250)

我正在尝试使用以下命令运行Docker映像:

docker run -v $PWD/build:/app/build --rm tflite-find-arena-size

然而这个错误弹出给我。我使用的是MacOS。我尝试brew安装它,但没有帮助。我还打开~/.emscripten文件,并检查BINARYEN_ROOT不是空的。请帮助。

shared:ERROR: BINARYEN_ROOT is set to empty value in /root/.emscripten
Makefile.emcc:31: recipe for target 'build' failed
make: *** [build] Error 1

这是我正在使用的makefile:

NAME = find-arena-size

CC = emcc
CXX = em++
CFLAGS ?= -Wall

MACROS += -DTF_LITE_DISABLE_X86_NEON
CXXFLAGS += -std=c++11
EMCCFLAGS += -s WASM=0
EMCCFLAGS += --bind
CFLAGS += -I.
CFLAGS += -Isource
CFLAGS += -Iedge-impulse-sdk/
CFLAGS += -Iedge-impulse-sdk/tensorflow
CFLAGS += -Iedge-impulse-sdk/third_party
CFLAGS += -Iedge-impulse-sdk/third_party/flatbuffers
CFLAGS += -Iedge-impulse-sdk/third_party/flatbuffers/include
CFLAGS += -Iedge-impulse-sdk/third_party/flatbuffers/include/flatbuffers
CFLAGS += -Iedge-impulse-sdk/third_party/gemmlowp/
CFLAGS += -Iedge-impulse-sdk/third_party/gemmlowp/fixedpoint
CFLAGS += -Iedge-impulse-sdk/third_party/gemmlowp/internal
CFLAGS += -Iedge-impulse-sdk/third_party/ruy
CFLAGS += -Imodel-parameters
CFLAGS += -Iedge-impulse-sdk/porting

all: build

.PHONY: build clean

build:
    echo "Mazenm"
    mkdir -p build/emcc
    $(CC) -c $(MACROS) $(CFLAGS) $(LFLAGS) edge-impulse-sdk/tensorflow/lite/c/common.c -o build/emcc/common.o
    $(CXX) $(MACROS) $(CXXFLAGS) $(CFLAGS) $(LFLAGS) $(EMCCFLAGS) emcc/emcc_binding.cpp edge-impulse-sdk/tensorflow/lite/kernels/*.cc edge-impulse-sdk/tensorflow/lite/kernels/internal/*.cc edge-impulse-sdk/tensorflow/lite/micro/kernels/*.cc edge-impulse-sdk/tensorflow/lite/micro/*.cc edge-impulse-sdk/tensorflow/lite/micro/memory_planner/*.cc edge-impulse-sdk/tensorflow/lite/core/api/*.cc ./edge-impulse-sdk/dsp/memory.cpp emcc/porting/*.c* build/emcc/common.o -o build/emcc/$(NAME).js
    rm build/emcc/*.o

clean:
    rm -r build/emcc
2o7dmzc5

2o7dmzc51#

您使用的是哪个docker镜像?您是如何在docker镜像中安装emscripten(emsdk?)的。
你可以通过docker pull emscripten/emsdk使用一个半官方的docker镜像。
但是你应该可以直接在MacOS上安装emsdk而不需要使用docker。这是安装emscripten的推荐方法。如果你在直接安装emsdk时遇到问题,请在https://github.com/emscripten-core/emsdk提交一个bug

4c8rllxm

4c8rllxm2#

emsdk似乎未激活。可能emsdk的路径不正确。

相关问题