OpenCV.js build error with CMake :Failed to fetch compiler version information

asked 2018-10-11 01:52:48 -0600

swon gravatar image

Hi, I've tried to build openCV.js with this tutorial : https://docs.opencv.org/ref/master/d4...

when using command python <opencv_src_dir>/platforms/js/build_js.py <build_dir>, I got a error message like below :

CMake Error at /Users/mac/Documents/dev/reactnative/emsdk/emscripten/1.38.13/cmake/Modules/Platform/Emscripten.cmake:111 (message):

Failed to fetch compiler version information with command "'/Users/mac/Documents/dev/react-native/emsdk/emscripten/1.38.13/emcc' -v"! Process returned with error code 1.

I checked whether emcc exists using sudo emcc- v image description

then it shows some info...

Could you give me some hints?


directory

  • opencv : /Users/mac/documents/dev/react-native/opencv/opencv

  • emsdk : /Users/mac/documents/dev/react-native/emsdk

cmake version : 3.12.3

build command : macui-MacBook-Air:opencv mac$ python ./platforms/js/build_js.py openCVlib --emscripten_dir ../../emsdk/emscripten/1.38.13

edit retag flag offensive close merge delete

Comments

please be so nice, and replace the screenshot with a TEXT version, thank you !

(it's useless here, can't be quoted from, indexed for search, etc.)

berak gravatar imageberak ( 2018-10-11 02:04:05 -0600 )edit

we also need the opencv version used

berak gravatar imageberak ( 2018-10-11 02:08:41 -0600 )edit

i see this too. I'm using cmake 3.7.2, python 2.7.13, on raspberry pi debian stretch with opencv-3.3.1. Failed to fetch compiler version information with command "'/home/dana/emsdk/emscripten/tag-1.38.22/emcc' -v"! Process returned with error code 1.

Call Stack (most recent call first): /usr/share/cmake-3.7/Modules/CMakeDetermineSystem.cmake:88 (include) CMakeLists.txt:114 (project)

dbadb gravatar imagedbadb ( 2019-01-10 11:08:10 -0600 )edit

it appears that this script (emcc) requires python module named "tools" which isn't installed. I guess the answer will be to pip install it. (I did the trivial pip install and get libxml compile errors, so i expect i'll need to install the build-tools for python)

dbadb gravatar imagedbadb ( 2019-01-10 11:14:14 -0600 )edit

actually the python module named tools is part of emscripten, so it seems like the PYTHONPATH needs to point into the emscripten distro.

dbadb gravatar imagedbadb ( 2019-01-10 12:03:12 -0600 )edit

Do you have any new progress,I had the same problem

Yueeeeee gravatar imageYueeeeee ( 2019-01-14 00:22:25 -0600 )edit