Git Product home page Git Product logo

Comments (9)

LaMavia avatar LaMavia commented on July 25, 2024 1

Sure thing, here you go /home/tomasz/.opam/4.06.1/lib/stublibs:/home/tomasz/.opam/4.06.1/lib/ocaml/stublibs:/home/tomasz/.opam/4.06.1/lib/ocaml

from reprocessing-example.

Schmavery avatar Schmavery commented on July 25, 2024

@bsansouci looks like that global ocaml issue again?
@LastShadowPL you said you went through #8, do you have a global ocaml/opam install?

from reprocessing-example.

LaMavia avatar LaMavia commented on July 25, 2024

To make sure I reinstalled both opam and ocaml.
First I installed the ocaml with sudo apt install ocaml, then I downloaded the opam's source code from https://github.com/ocaml/opam/releases and built it according to the guide

./configure --prefix=/home/tomasz/.opam
make lib-ext
make
sudo make install
opam init

I used sudo with the make install, because I ran into errors:

Creating directory /home/tomasz/.opam/doc/opam-core
[ERROR] Failure during install
./opam-installer: "mkdir" failed on /home/tomasz/.opam/doc/opam-core: Permission denied
make: *** [Makefile:133: installlib-core] Error 1
rm opam-core.install

Now when running the npm run build I get something like this:

> reprocessing-example@ build /home/tomasz/Desktop/projects/cp-flow
> bsb -make-world

ninja: no work to do.
[1/1] Building run_build_script
[1/1] Building run_build_script
[1/1] Building run_build_script
[1/1] Building run_build_script
Fatal error: exception Unix.Unix_error(Unix.EPERM, "utimes", "/home/tomasz/Desktop/projects/cp-flow/node_modules/Tgls/lib/ocaml/bytecode/tgls_new.cmi")

from reprocessing-example.

LaMavia avatar LaMavia commented on July 25, 2024

Now I followed this guide from http://ocaml.org/docs/install.html#OPAM :

# environment setup
opam init
eval `opam env`
# install given version of the compiler
opam switch create 4.06.1
eval `opam env`
# check you got what you want
which ocaml
ocaml -version

Here's the which ocaml output: /home/tomasz/.opam/4.06.1/bin/ocaml
And here's the the error:

> reprocessing-example@ build /home/tomasz/Desktop/projects/cp-flow
> bsb -make-world

ninja: no work to do.
[1/1] Building run_build_script
[1/1] Building run_build_script
[1/1] Building run_build_script
[1/1] Building run_build_script
[1/4] Building src/RGLInterface.mlast
FAILED: src/RGLInterface.mlast 
/home/tomasz/Desktop/projects/cp-flow/node_modules/bs-platform/lib/bsc.exe -pp "/home/tomasz/Desktop/projects/cp-flow/node_modules/bs-platform/lib/refmt3.exe --print binary"    -bs-super-errors -w -30-40+6+7+27+32..39+44+45+101-44 -bs-D BSB_BACKEND="bytecode" -nostdlib -I '/home/tomasz/Desktop/projects/cp-flow/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -c -o src/RGLInterface.mlast -bs-syntax-only -bs-simple-binary-ast -bs-binary-ast -impl /home/tomasz/Desktop/projects/cp-flow/node_modules/Reasongl/src/RGLInterface.re
File "/home/tomasz/Desktop/projects/cp-flow/node_modules/Reasongl/src/RGLInterface.re", line 217, characters 6-7:
Error: 337: <UNKNOWN SYNTAX ERROR>

  We've found a bug for you!
  /home/tomasz/Desktop/projects/cp-flow/node_modules/Reasongl/src/RGLInterface.re
  
  There's been an error running Reason's refmt parser on a file.
  This was the command:
  
  /home/tomasz/Desktop/projects/cp-flow/node_modules/bs-platform/lib/refmt3.exe --print binary '/home/tomasz/Desktop/projects/cp-flow/node_modules/Reasongl/src/RGLInterface.re' > /tmp/ocamlpp534e7d
  
  Please file an issue on github.com/facebook/reason. Thanks!
  
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: /home/tomasz/Desktop/projects/cp-flow/node_modules/bs-platform/lib/ninja.exe 
 Location: /home/tomasz/Desktop/projects/cp-flow/node_modules/Reasongl/lib/bs/bytecode

from reprocessing-example.

bsansouci avatar bsansouci commented on July 25, 2024

Hey! Awesome that you got this far, I think turning off opam is the simplest way to get around this issue. That being said, the project you forked uses an older version of bsb-native. If you bump that to be โ€œbsb-nativeโ€: โ€œ4.0.7000โ€ and also make reprocessing be the latest version, it should build better.

from reprocessing-example.

Schmavery avatar Schmavery commented on July 25, 2024

Sorry about the misunderstanding! To be more clear, as ben said, the current release of bsb-native has a known issue where it sometimes doesn't work with a global opam install because of some env vars that opam shoves in your env that confuse the compiler :) (we actually found a fix last night and we're working on making a release)

from reprocessing-example.

LaMavia avatar LaMavia commented on July 25, 2024

Hi there. I'm sorry to bother you again, but I updated the bsb-native (global install) to the version 4.0.7000 and linked it in the cloned dir (npm link bsb-native). Now I'm getting this error when running npm run build:

> reprocessing-example@ build /home/tomasz/Desktop/projects/cp-flow
> bsb -make-world

[2/2] Building fake_src/sdl_index.mlast.d
[2/2] Building lib.cma
[4/4] Running build_script
Fatal error: cannot load shared library dllunix
Reason: /home/tomasz/.opam/4.06.1/lib/ocaml/stublibs/dllunix.so: undefined symbol: caml_ba_element_size
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: /home/tomasz/.npm/lib/node_modules/bsb-native/lib/ninja.exe 
 Location: /home/tomasz/Desktop/projects/cp-flow/node_modules/Tsdl/lib/bs/bytecode

from reprocessing-example.

LaMavia avatar LaMavia commented on July 25, 2024

I got rid of the last error by installing the flexdll lib. sudo apt install flexdll.
Thanks for the help :)

from reprocessing-example.

bsansouci avatar bsansouci commented on July 25, 2024

Wow ok, that's interesting! Could you print out the value of your env variable: CAML_LD_LIBRARY_PATH from where you were building the app?

I'm going to re-open because this is the issue that we're working on fixing, so you don't have to install anything else. I'm glad you were able to make it work though haha.

from reprocessing-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.