admin管理员组文章数量:1277888
I have the following directory structure:
~/emsdk
~/opencv
I am trying to build OpenCV.js
I do
cd ~/opencv
python ./platforms/js/build_js.py build_js --emscripten_dir=~/emsdk/
Which results in:
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:100 (message):
Could not find toolchain file:
~/emsdk/cmake/Modules/Platform/Emscripten.cmake
Call Stack (most recent call first):
CMakeLists.txt:135 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring inplete, errors occurred!
Traceback (most recent call last):
File "./platforms/js/build_js.py", line 227, in <module>
builder.config()
File "./platforms/js/build_js.py", line 167, in config
execute(cmd)
File "./platforms/js/build_js.py", line 23, in execute
raise Fail("Child returned: %s" % retcode)
__main__.Fail: Child returned: 1
Both gcc and g++ are installed in the system. Prior of running this I went to ~/emsdk and ran:
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
I am not sure why this is failing. I am trying to follow this [tutorial][1].
EDIT:
I am doing this on Ubuntu, if it helps
EDIT 2:
It seems an important part of the problem es from the message:
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:100 (message):
Could not find toolchain file:
~/emsdk/cmake/Modules/Platform/Emscripten.cmake
There is no emsdk/cmake
directory.
EDIT 3:
Posting answer, it was the path
I have the following directory structure:
~/emsdk
~/opencv
I am trying to build OpenCV.js
I do
cd ~/opencv
python ./platforms/js/build_js.py build_js --emscripten_dir=~/emsdk/
Which results in:
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:100 (message):
Could not find toolchain file:
~/emsdk/cmake/Modules/Platform/Emscripten.cmake
Call Stack (most recent call first):
CMakeLists.txt:135 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring inplete, errors occurred!
Traceback (most recent call last):
File "./platforms/js/build_js.py", line 227, in <module>
builder.config()
File "./platforms/js/build_js.py", line 167, in config
execute(cmd)
File "./platforms/js/build_js.py", line 23, in execute
raise Fail("Child returned: %s" % retcode)
__main__.Fail: Child returned: 1
Both gcc and g++ are installed in the system. Prior of running this I went to ~/emsdk and ran:
./emsdk update
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
I am not sure why this is failing. I am trying to follow this [tutorial][1].
EDIT:
I am doing this on Ubuntu, if it helps
EDIT 2:
It seems an important part of the problem es from the message:
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:100 (message):
Could not find toolchain file:
~/emsdk/cmake/Modules/Platform/Emscripten.cmake
There is no emsdk/cmake
directory.
EDIT 3:
Posting answer, it was the path
Share Improve this question edited May 7, 2019 at 19:21 Makogan asked May 7, 2019 at 18:06 MakoganMakogan 9,63210 gold badges63 silver badges155 bronze badges3 Answers
Reset to default 5The problem is a stupid assumption on my end. Writing:
python ./platforms/js/build_js.py build_js --emscripten_dir=~/emsdk/
Is the wrong mand, the correct one is:
python ./platforms/js/build_js.py build_js --emscripten_dir=/home/username/emsdk/emscripten/1.38.30/
For me, this works: python ./platforms/js/build_js.py build_js --emscripten_dir=/home/username/emsdk/upstream/emscripten
On MACOSX:
It works:
python /path-to/opencv-src/platforms/js/build_js.py /path-to/build_js --emscripten_dir=/path-to/emsdk/upstream/emscripten
Note:
- Important: --emscripten_dir=/path-to/emsdk/upstream/emscripten
- build_js: let create a empty folder
Thanks All.
本文标签: javascriptBuilding OpenCVjs fails CMake can39t find installed compilersStack Overflow
版权声明:本文标题:javascript - Building OpenCV.js fails. CMake can't find installed compilers? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741232917a2362437.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论