bsansouci / reprocessing-example

79 stars 27 forks source link

Unable to run `npm run build` on Ubuntu 17.10 #8

Closed JasoonS closed 6 years ago

JasoonS commented 6 years ago

Hi

I'm getting the following error when I run: npm run build, npm run build:web or npm run build:native:

✗ npm run build                 

> reprocessing-example@ build /home/jasoon/Documents/adhara/test/reprocessing-example
> bsb -make-world

ninja: no work to do.
[1/1] Building run_build_script
FAILED: run_build_script 
/home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/Tsdl/lib/bs/bytecode/build_script.exe /home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/bs-platform/vendor /home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/bs-platform/vendor/ocaml/lib/ocaml /home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/Tsdl /home/jasoon/Documents/adhara/test/reprocessing-example
Fatal error: cannot load shared library dllunix
Reason: /usr/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_string_is_c_safe
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: /home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/bs-platform/lib/ninja.exe 
 Location: /home/jasoon/Documents/adhara/test/reprocessing-example/node_modules/Tsdl/lib/bs/bytecode
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! reprocessing-example@ build: `bsb -make-world`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the reprocessing-example@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jasoon/.npm/_logs/2018-04-24T20_19_38_157Z-debug.log

The same thing happened when I ran this command on this repo https://github.com/ekosz/reprocessing-example-flow-field (well after I capitalised Reprocessing in the bsconfig.json).

bsansouci commented 6 years ago

@JasoonS Mmnmhm do you have OCaml installed globally? If so do you need it to be? Because it seems like it might be a different version than the one bsb-native uses and it seems to interfere...

If you don't need it you should try to remove it all and reinstall. This package comes with everything you need.

JasoonS commented 6 years ago

@bsansouci I do, I'll try remove it and let you know how that goes. Thanks for the help.

JasoonS commented 6 years ago

Working perfectly :)

Initially got a /usr/bin/ld: cannot find -lasound error, but a simple sudo apt install libasound2-dev solved that.

Would it be useful for me to add this to some kind of trouble shooting section?

bsansouci commented 6 years ago

@JasoonS Great! No need to open an issue, that's the same as https://github.com/bsansouci/reprocessing-example/issues/7