Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running npm run build fails on OS X #10

Open
feihong opened this issue Jul 2, 2018 · 6 comments
Open

Running npm run build fails on OS X #10

feihong opened this issue Jul 2, 2018 · 6 comments

Comments

@feihong
Copy link

feihong commented Jul 2, 2018

Here's the output I see in my terminal:

> reprocessing-example@ build /Users/fhsu/reference/reprocessing-example
> bsb -make-world

[2/2] Building fake_src/sdl_index.mlast.d
[2/2] Building lib.cma
[4/4] Building run_build_script
FAILED: run_build_script
/Users/fhsu/reference/reprocessing-example/node_modules/Tsdl/lib/bs/bytecode/build_script.exe /Users/fhsu/reference/reprocessing-example/node_modules/bs-platform/vendor /Users/fhsu/reference/reprocessing-example/node_modules/bs-platform/vendor/ocaml/lib/ocaml /Users/fhsu/reference/reprocessing-example/node_modules/Tsdl /Users/fhsu/reference/reprocessing-example
Fatal error: cannot load shared library dllunix
Reason: dlopen(/usr/local/lib/ocaml/stublibs/dllunix.so, 138): Symbol not found: _caml_ba_compare
  Referenced from: /usr/local/lib/ocaml/stublibs/dllunix.so
  Expected in: flat namespace
 in /usr/local/lib/ocaml/stublibs/dllunix.so
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: /Users/fhsu/reference/reprocessing-example/node_modules/bs-platform/lib/ninja.exe
 Location: /Users/fhsu/reference/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!     /Users/fhsu/.npm/_logs/2018-07-02T18_39_59_156Z-debug.log
@bsansouci
Copy link
Owner

bsansouci commented Jul 2, 2018

You wouldn't happen to have a global version of ocaml installed by any chance?

Asking because idk why it'd be using a global path like /usr/local/lib/ocaml/stublibs/dllunix.so

@feihong
Copy link
Author

feihong commented Jul 3, 2018

Ah, yes, that was the problem. I wasn't using ocaml so I just uninstalled it and the build succeeds. Is this a common problem that people are running into? If so then it might be nice to put a note about it in the README. If not, then I'll just close this issue.

@bsansouci
Copy link
Owner

No this isn't suppose to happen. I'll fix this bug when I come back home. Thanks for finding it.

@joshmhanson
Copy link

I ran into this as well on Ubuntu Linux. I didn't have to uninstall OCaml, however, to fix it; I only had to switch the installed OCaml compiler to the BuckleScript fork.

@sjqtentacles
Copy link

Can confirm this is still an issue. Running linux mint. It worked after uninstalling opam/ocaml and also removing the hidden ~/.opam directory.

@bsansouci
Copy link
Owner

@Nixonite @hanjiexi Could you guys re-try now. We published a new version of bsb-native (4.0.1100) which should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants