I’m having issue with building this demo. https://github.com/kakukogou/opencvjs_demo_segmentation
When i cd into this folder and run make command i get this error message:
JavaScript
x
3
1
/bin/sh: 1: emcc: not found
2
make: *** [segmentation] Error 127
3
This is how make file looks like.
JavaScript
1
20
20
1
segmentation: ../src/segmentation.cpp ../src/export.cpp
2
mkdir -p $(OBJDIR)
3
emcc
4
../src/segmentation.cpp
5
../src/export.cpp
6
-I $(OPENCV_INSTALL_DIR)/include
7
$(OPENCV_INSTALL_DIR)/lib/libopencv_core.so
8
$(OPENCV_INSTALL_DIR)/lib/libopencv_imgproc.so
9
-s EXPORTED_FUNCTIONS="['_on_mouse', '_on_init', '_on_process']"
10
-O3
11
--llvm-lto 1
12
--closure 1
13
-s PRECISE_F32=1
14
-s FORCE_ALIGNED_MEMORY=1
15
-s TOTAL_MEMORY=306777216
16
-o ./bin/segmentation.js
17
18
clean:
19
rm ./bin/*.js ./bin/*.mem
20
Is there any issue with my environment variables. What is the proper way to compile this ?
Advertisement
Answer
For whatever reason default path configurations in .emscripten does not enable emcc in terminal. so i manually set the EMSCRIPTEN_ROOT in /etc/environment and now it recognizes the emcc command in terminal.