bsansouci / bsb-native

Build system for OCaml/Reason
Other
245 stars 10 forks source link

Error building vendored ocaml compiler when installing #9

Closed ryanartecona closed 6 years ago

ryanartecona commented 6 years ago

In a depending project, if I do npm install github:bsansouci/bsb-native, I get the following error (reproducibly, across several attempts).

File "_none_", line 1:
Error: I/O error: compilerlibs/ocamlbytecomp.cma: No such file or directory
make[4]: *** [compilerlibs/ocamlbytecomp.cma] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [coreall] Error 2
make[2]: *** [core] Error 2
make[1]: *** [opt.opt] Error 2
make: *** [world.opt] Error 2
child_process.js:635
    throw err;
    ^

Error: Command failed: /Users/ryanartecona/code/hodgkin/node_modules/bs-platform/scripts/buildocaml.sh

In trying to reproduce and investigate a fix, I cloned bsb-native locally and tried npm install ../bsb-native, and that worked just fine.


ryanartecona commented 6 years ago

I should probably add that this isn't super inconvenient for me so far, since depending on my local bsb-native works for now. I opened this in part in case someone else sees the same error.

bsansouci commented 6 years ago

This is an npm5 error. It's near the top of my todo list to fix, I would love help on that one though. I don't know much about npm...

bsansouci commented 6 years ago

With the little exploration I've done, it seems like npm5 actively removes things that are checked in the repository but are in the .gitignore. I've tried to fix it a bit but abandoned halfway because I don't know all the internals of ocaml, and removing the build artifacts from the .gitignore would mean I could accidentally update them on the repository.

bsansouci commented 6 years ago

Close in favor of #11