i follow the guide ’ Building using emscripten for WebAssembly’ to build VTK-wasm,
but when i use ninja compile ,error occurs:
ninja: build stopped: subcommand failed
and this is the full info:
[1/1027] Generating proj.db
FAILED: share/vtk-9.3/proj/proj.db E:/vtk-wasm-new/share/vtk-9.3/proj/proj.db
C:\Windows\system32\cmd.exe /C "cd /D E:\github\VTK-master\ThirdParty\libproj\vtklibproj\data && "C:\Program Files\CMake\bin\cmake.exe" -E remove -f E:/vtk-wasm-new/lib/../share/vtk-9.3/proj/proj.db && "C:\Program Files\CMake\bin\cmake.exe" -DCMAKE_SYSTEM_NAME=Emscripten -DCMAKE_CROSSCOMPILING_EMULATOR=E:/github/emsdk/emsdk/node/16.20.0_64bit/bin/node.exe -DALL_SQL_IN=E:/vtk-wasm-new/ThirdParty/libproj/vtklibproj/data/all.sql.in -DEXE_SQLITE3=E:/vtk-wasm-new/bin/sqlitebin-9.3.js -DPROJ_DB=E:/vtk-wasm-new/lib/../share/vtk-9.3/proj/proj.db -DPROJ_VERSION=8.1.0 -P E:/github/VTK-master/ThirdParty/libproj/vtklibproj/data/generate_proj_db.cmake && "C:\Program Files\CMake\bin\cmake.exe" -E copy E:/vtk-wasm-new/lib/../share/vtk-9.3/proj/proj.db E:/vtk-wasm-new/ThirdParty/libproj/vtklibproj/data/for_tests"
'E:/github/emsdk/emsdk/node/16.20.0_64bit/bin/node.exe' 'E:/vtk-wasm-new/bin/sqlitebin-9.3.js' '-init' 'E:/vtk-wasm-new/ThirdParty/libproj/vtklibproj/data/all.sql.in' 'E:/vtk-wasm-new/lib/../share/vtk-9.3/proj/proj.db'
-- Loading resources from E:/vtk-wasm-new/ThirdParty/libproj/vtklibproj/data/all.sql.in
Error: unable to open database "E:/vtk-wasm-new/lib/../share/vtk-9.3/proj/proj.db": unable to open database file
CMake Error at generate_proj_db.cmake:29 (message):
SQLite3 failed
[2/1027] Building CXX object ThirdParty/libproj/vtklibproj/src/CMakeFiles/libproj.dir/iso19111/operation/esriparammappings.cpp.o
[3/1027] Building CXX object ThirdParty/libproj/vtklibproj/src/CMakeFiles/libproj.dir/iso19111/operation/parammappings.cpp.o
[4/1027] Building CXX object ThirdParty/libproj/vtklibproj/src/CMakeFiles/libproj.dir/iso19111/operation/projbasedoperation.cpp.o
[5/1027] Building CXX object ThirdParty/libproj/vtklibproj/src/CMakeFiles/libproj.dir/iso19111/operation/oputils.cpp.o
[6/1027] Building CXX object ThirdParty/libproj/vtklibproj/src/CMakeFiles/libproj.dir/iso19111/operation/singleoperation.cpp.o
ninja: build stopped: subcommand failed.
Here’s how I do it:
1.downlaod ‘Emscripten SDK’ and install as instructed in the guide,enter ‘embuilder build sdl2’
2.download ‘cmake’ and install it
3.download ‘VTK-master’ from github,the version is 9.3.0
4.create a folder named ‘vtk-wasm-new’,and open git bash in this folder,enter these instructions
emcmake cmake
-S ../github/VTK-Master
-B .
-G "Ninja"
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS:BOOL=OFF
-DVTK_ENABLE_LOGGING:BOOL=OFF
-DVTK_ENABLE_WRAPPING:BOOL=OFF
-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT
5.enter ‘ninja’ and waiting for end,but throw error
what should i do ? please help me,thank you.