ThatOpen / engine_web-ifc

Reading and writing IFC files with Javascript, at native speeds.
https://thatopen.github.io/engine_web-ifc/demo
Mozilla Public License 2.0
617 stars 190 forks source link

[Bug]: Install script failing #433

Closed CBenghi closed 1 year ago

CBenghi commented 1 year ago

What happened?

Hello all,

I'm trying to build the wasm module on windows on a clean system according to the instructions at: https://ifcjs.github.io/info/docs/Guide/web-ifc/Contribution/#wasm-library

First I've downloaded and installed the pre-requisites (node, python, emscripten and ninja).

The steps that worked with no problems are:

but then I run into problems.

When run npm run build-release-all I receive a suggestion to use npm run build-release, instead.

When I run that I get the following error:

> web-ifc@0.0.43 build-release
> npm run build-wasm-release && npm run build-api && npm run build-cleanup

> web-ifc@0.0.43 build-wasm-release
> make-dir src/wasm/build && cd src/wasm/build && emcmake cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Release && emmake make && npm run copy-to-dist

configure: cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:\Data\Tools\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=C:/Data/Tools/emsdk/node/16.20.0_64bit/bin/node.exe -G Ninja
emcmake: error: 'cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:\Data\Tools\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=C:/Data/Tools/emsdk/node/16.20.0_64bit/bin/node.exe -G Ninja' failed: [WinError 2] The system cannot find the file specified

All the files listed in the error seem to exist on my system, I'm not sure how to proceed, I'm rather inexperienced with emscripten and npm.

Any suggestion much appreciated.

PS. I have managed to compile the wasm using emscripten commands directly, but replacing the wasm file does not seem to be sufficient to update the library as the expected function signatures are not found in the wasm. I must be doing something wrong there too.

Version

9fcec2885379f705ff9693e8fd064faa33e78667

What browsers are you seeing the problem on?

Chrome

Relevant log output

The problem occurs before the browser is involved.

Anything else?

No response

CBenghi commented 1 year ago

I've now realized that I might be missing cmake on that machine. I'll go check and feed-back here.

CBenghi commented 1 year ago

That was it... I was missing cmake... I was so hung-up with the forward-reverse-slash compatibility risk in my WSL that I did not even think of cmake missing on a clean windows machine.