Skip to content

Building OpenCV.js using Docker fails on macOS 11.3 #20313

@carstenschwede

Description

@carstenschwede
System information (version)
  • OpenCV => 4.5.2
  • Operating System / Platform => macOS 11.3.1
  • Docker Desktop 3.1.0
Detailed description
Steps to reproduce
git clone https://github.com/opencv/opencv.git
cd opencv
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emcmake python3 ./platforms/js/build_js.py build_js

results in

configure: python3 ./platforms/js/build_js.py build_js -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/emsdk/node/14.15.5_64bit/bin/node
EMSCRIPTEN environment variable is not available. Please properly activate Emscripten SDK and consider using 'emcmake' launcher
usage: build_js.py [-h] [--opencv_dir OPENCV_DIR]
                   [--emscripten_dir EMSCRIPTEN_DIR] [--build_wasm]
                   [--disable_wasm] [--threads] [--simd] [--build_test]
                   [--build_perf] [--build_doc] [--build_loader]
                   [--clean_build_dir] [--skip_config] [--config_only]
                   [--enable_exception] [--cmake_option CMAKE_OPTION]
                   [--build_flags BUILD_FLAGS] [--build_wasm_intrin_test]
                   [--config CONFIG]
                   build_dir
build_js.py: error: unrecognized arguments: -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/emsdk/node/14.15.5_64bit/bin/node
emcmake: error: 'python3 ./platforms/js/build_js.py build_js -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/emsdk/node/14.15.5_64bit/bin/node' failed (returned 2)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions