I am a beginner using opencv for wasm, the main purpose is to use its polygon calculation function
Building on: wsl Ubuntu20.04 platform
Considering that the lib is so huge at 7.9mb, I need to build it myself, minus unnecessary functions
Follow the installation instructions on opencv’s official website,
I installed emsdk, and because it kept failing, I also installed other tools indiscriminately
The *recommended* precompiled SDK download is 2.0.26-lto (b92ba43f3ac92ab6f1ce6136a8c5969b68ba6968).
To install/activate it, use one of:
latest [default (llvm) backend]
latest-fastcomp [legacy (fastcomp) backend]
Those are equivalent to installing/activating the following:
2.0.26-lto INSTALLED
2.0.26-lto-fastcomp
All recent (non-legacy) installable versions are:
2.0.26
2.0.25
2.0.24
2.0.23
2.0.22
2.0.21
2.0.20
2.0.19
2.0.18
2.0.17
2.0.16
2.0.15
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
2.0.26-lto INSTALLED
2.0.23-lto
2.0.20-lto
2.0.19-lto
1.40.1
1.40.0
1.39.20
1.39.19
1.39.18
1.39.17
1.39.16
1.39.15
1.39.14
1.39.13
1.39.12
1.39.11
1.39.10
1.39.9
1.39.8
1.39.7
1.39.6
1.39.5
1.39.4
1.39.3
1.39.2
1.39.1
1.39.0
1.38.48
1.38.47
1.38.46
1.38.45
1.38.44
1.38.43
1.38.42
1.38.41
1.38.40
1.38.39
1.38.38
1.38.37
1.38.36
1.38.35
1.38.34
1.38.33
The additional following precompiled SDKs are also available for download:
* sdk-releases-upstream-b92ba43f3ac92ab6f1ce6136a8c5969b68ba6968-64bit INSTALLED
sdk-releases-upstream-823d37b15d1ab61bc9ac0665ceef6951d3703842-64bit
sdk-releases-fastcomp-edf24e7233e0def312a08cc8dcec63a461155da1-64bit
sdk-releases-fastcomp-536568644fd67d53778f6111fdd5f64ad3f4c539-64bit
sdk-fastcomp-1.38.30-64bit
sdk-fastcomp-1.38.31-64bit
The following SDKs can be compiled from source:
sdk-upstream-main-64bit
sdk-upstream-main-32bit
sdk-fastcomp-tag-1.38.30-64bit
sdk-fastcomp-tag-1.38.31-64bit
The following precompiled tool packages are available for download:
(*) releases-upstream-b92ba43f3ac92ab6f1ce6136a8c5969b68ba6968-64bit INSTALLED
releases-upstream-823d37b15d1ab61bc9ac0665ceef6951d3703842-64bit
releases-fastcomp-edf24e7233e0def312a08cc8dcec63a461155da1-64bit
releases-fastcomp-536568644fd67d53778f6111fdd5f64ad3f4c539-64bit
fastcomp-clang-e1.38.30-64bit
fastcomp-clang-e1.38.31-64bit
(*) node-14.15.5-64bit INSTALLED
emscripten-1.38.30
emscripten-1.38.31
The following tools can be compiled from source:
llvm-git-main-32bit
llvm-git-main-64bit
clang-tag-e1.38.30-32bit
clang-tag-e1.38.31-32bit
fastcomp-clang-tag-e1.38.30-64bit
fastcomp-clang-tag-e1.38.31-64bit
fastcomp-clang-master-32bit
fastcomp-clang-master-64bit
emscripten-tag-1.38.30-32bit
emscripten-tag-1.38.31-32bit
emscripten-tag-1.38.30-64bit
emscripten-tag-1.38.31-64bit
binaryen-tag-1.38.30-32bit
binaryen-tag-1.38.31-32bit
binaryen-tag-1.38.30-64bit
binaryen-tag-1.38.31-64bit
emscripten-main-32bit
emscripten-main-64bit INSTALLED
binaryen-main-32bit
binaryen-main-64bit INSTALLED
ninja-git-release-64bit
ccache-git-emscripten-64bit
I don’t know if these tools affect my use
When I type source ./emsdk_env.sh
, it shows
Adding directories to PATH:
PATH += /code/emsdk
PATH += /code/emsdk/upstream/emscripten
PATH += /code/emsdk/node/14.15.5_64bit/bin
Setting environment variables:
PATH = /code/emsdk:/code/emsdk/upstream/emscripten:/code/emsdk/node/14.15.5_64bit/bin:/root/.nvm/versions/node/v14.4.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/Microsoft.WindowsTerminal_1.9.1942.0_x64__8wekyb3d8bbwe:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/WINDOWS/System32/wsl.exe:/mnt/f/jdk-14/bin:/mnt/f/jdk-14/jre/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/f/Git/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/f/LxRunOffline:/mnt/c/Users/123/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/dotnet/":/mnt/f/ffmpeg/bin:/mnt/c/Program Files/dotnet/:/mnt/f/Program Files/Microsoft SQL Server/Client SDK/ODBC/110/Tools/Binn/:/mnt/f/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/:/mnt/f/Program Files/Microsoft SQL Server/120/Tools/Binn/:/mnt/f/Program Files/Microsoft SQL Server/120/DTS/Binn/:/mnt/f/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/ManagementStudio/:/mnt/f/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/f/VSCode/bin:/mnt/c/Windows/System32/WindowsPowerShell/7/:/mnt/f/epub/:/mnt/f/nginx/:/mnt/c/ProgramData/chocolatey/bin:/mnt/f/sdk/platform-tools:/mnt/c/Users/123/apps/gsudo:/mnt/c/Users/123/AppData/Roaming/npm:/usr/local/lib/node_modules:/root/.nvm/versions/node/v12.18.2/lib/node_modules:~/.nvm/versions/node/v12.18.2/bin:~/.nvm/versions/node/v14.4.0/bin:/root/.nvm
EMSDK = /code/emsdk
EM_CONFIG = /code/emsdk/.emscripten
EMSDK_NODE = /code/emsdk/node/14.15.5_64bit/bin/node
(eval):1: unmatched "
,to continue the examples mentioned in the tutorial
echo ${EMSDK}
The returned result is a blank line. There is no other return value.
Enter command
emcmake python ./opencv/platforms/js/build_js.py build_js
zsh will prompt emcmake no found, so I cd to the emcmake directory and used ./emcmake to execute it.
But still prompt
EMSCRIPTEN environment variable is not available. Please properly activate Emscripten SDK and consider using 'emcmake' launcher