bsansouci / reprocessing-example

79 stars 27 forks source link

Fresh install issues Ubuntu 18.04 #22

Open cedeerwe opened 5 years ago

cedeerwe commented 5 years ago

Hey,

I am trying my best to get this up & running, but I am really struggling. Here are few different tries.

1) Fresh start, nothing installed.

$ git clone https://github.com/bsansouci/reprocessing-example.git
Cloning into 'reprocessing-example'...
remote: Enumerating objects: 209, done.
remote: Total 209 (delta 0), reused 0 (delta 0), pack-reused 209
Receiving objects: 100% (209/209), 484.61 KiB | 1.34 MiB/s, done.
Resolving deltas: 100% (104/104), done.

$ cd reprocessing-example
$ npm install
> sdl2@2.0.5 postinstall /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/sdl2
> node postinstall.js

No pre-built binaries for linux, downloading source
Unzip successful.                          
Building from source, will take a minute or two.
Cloning into 'reprocessing-example'...
remote: Enumerating objects: 209, done.
remote: Total 209 (delta 0), reused 0 (delta 0), pack-reused 209
Receiving objects: 100% (209/209), 484.61 KiB | 1.34 MiB/s, done.
Resolving deltas: 100% (104/104), done.Looks like SDL2 built successfully.

> bsb-native@4.0.1100 postinstall /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/bsb-native
> node postinstall.js

Unzip successful.                            
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN reprocessing-example@ No repository field.
npm WARN reprocessing-example@ No license field.

added 11 packages from 8 contributors and audited 15 packages in 51.734s
found 0 vulnerabilities

$ npm run build

> reprocessing-example@ build /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example
> bsb -make-world

File "bsconfig.json", line 1
Error: package bs-platform is not found 
It's the basic, required package. If you have it installed globally,
Please run `npm link bs-platform` to make it available
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/cd/.npm/_logs/2019-09-10T17_43_03_339Z-debug.log

$ npm install -g bs-platform
/home/cd/.npm-packages/bin/bsb -> /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/bsb
/home/cd/.npm-packages/bin/bsrefmt -> /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/bsrefmt
/home/cd/.npm-packages/bin/bsc -> /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/bsc

> bs-platform@5.0.6 postinstall /home/cd/.npm-packages/lib/node_modules/bs-platform
> node scripts/install.js

ninja binary is copied from pre-distribution
checkoutput: The OCaml compiler, version BuckleScript 5.0.6 (Using OCaml4.02.3+BS )
Standard library directory: /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/ocaml

Prebuilt compiler works good
[5/5] cp refmt.linux refmt.exe
Cleaning... 0 files.
[2/307] runtime/js.ml -> runtime/js.cmj runtime/js.cmi
Building runtime/js.ml
... (lot of lines)
[307/307] stdlib-402/bigarray.ml -> stdlib-402/bigarray.cmj    
Building stdlib-402/bigarray.ml
Build finished
+ bs-platform@5.0.6
updated 1 package in 3.386s

$ npm link bs-platform
/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/bs-platform -> /home/cd/.npm-packages/lib/node_modules/bs-platform

$ npm run build

> reprocessing-example@ build /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example
> bsb -make-world

[3/3] Building fake_src/sdl_index.cmj
[3/3] Building src/tsdl_new.cmj
[3/3] Building src/tgls_new.cmj
[1/30] Building src/events.mlast
File "/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/src/events.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[2/30] Building src/reasongl.mlast
File "/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/src/reasongl.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[10/30] Building src/web/reasongl_web.mlast
Failure: /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/ninja.exe 
 Location: /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/lib/bs
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/cd/.npm/_logs/2019-09-10T17_46_02_871Z-debug.log

No idea what is wrong and how it can be fixed.

2) Globally installed bs-platform prior to start

$ git clone https://github.com/bsansouci/reprocessing-example.git && cd reprocessing-example && npm install
...(same output as before)

$ npm run build

> reprocessing-example@ build /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example
> bsb -make-world

bs-platform version mismatch Running bsb 4.0.11 (/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/bsb-native) vs vendored 5.0.6 (/home/cd/.npm-packages/lib/node_modules/bs-platform)
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/cd/.npm/_logs/2019-09-10T17_48_25_556Z-debug.log

Apparently there is a version mismatch, so I have tried to install a lower version of bs-platform.

3) Global installation of bs-platform vs. 4.0.11

$ npm install -g bs-platform@4.0.11
$ npm link bs-platform
$ npm build
$ npm run build

> reprocessing-example@ build /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example
> bsb -make-world

[2/2] Building fake_src/sdl_index.mlast.d
[1/1] Building fake_src/sdl_index.cmj
[2/2] Building src/tsdl_new.mlast.d
[1/1] Building src/tsdl_new.cmj
File "/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Tsdl/src/tsdl_new.re", line 187, characters 21-28:
Warning: Unimplemented primitive used:TSDL_GetError 

[2/2] Building src/tgls_new.mlast.d
[1/1] Building src/tgls_new.cmj
[1/20] Building src/events.mlast
File "/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/src/events.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[2/20] Building src/reasongl.mlast
File "/home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/src/reasongl.ml", line 1, characters 18-22:
Error: Conditional expression type mismatch (bool,string)
[10/20] Building src/native/reasongl_native.mlast
ninja: error: rebuilding 'build.ninja': subcommand failed
Failure: /home/cd/.npm-packages/lib/node_modules/bs-platform/lib/ninja.exe 
 Location: /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/Reasongl/lib/bs
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/cd/.npm/_logs/2019-09-10T17_52_31_742Z-debug.log

Some error again.

I would appreciate anything that would point me in the correct direction.

cedeerwe commented 5 years ago

I have tried installing bs-platform also locally in the package

$ npm install bs-platform
$ npm run build

> reprocessing-example@ build /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example
> bsb -make-world

ninja: no work to do.
ninja: no work to do.
ninja: no work to do.
ninja: no work to do.
[3/15] Building src/bytecode/Reprocessing_Hotreload_Bytecode.cmj

  We've found a bug for you!
  /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/reprocessing/src/bytecode/Reprocessing_Hotreload_Bytecode.re 2:15-36

  1 │ let load_plug = fname => {
  2 │   let fname = Dynlink.adapt_filename(fname);
  3 │   if (Sys.file_exists(fname)) {
  4 │     try (Dynlink.loadfile(fname)) {

  The module or file Dynlink can't be found.
  - If it's a third-party dependency:
    - Did you list it in bsconfig.json?
    - Did you run `bsb` instead of `bsb -make-world`
      (latter builds third-parties)?
  - Did you include the file's directory in bsconfig.json?

[4/15] Building src/Reprocessing_Constants.cmj
Failure: /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/bs-platform/lib/ninja.exe 
 Location: /home/cd/Scripts/Tutorials/ReasonReprocessing/reprocessing-example/node_modules/reprocessing/lib/bs
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/cd/.npm/_logs/2019-09-10T20_10_11_419Z-debug.log

I have no luck googling up what is Dynlink and how can I fix this.

Schmavery commented 5 years ago

Sorry about this rabbit hole you found yourself in. Unfortunately the first error message you got was very misleading.

This project actually relies on bsb-native rather than bs-platform but it seems that due to some error in a new version of the former, something on linux is breaking -- Usually bsb-native attempts to release linux and windows builds along with the mac one, which seems to have been missed this time. We still need to try and find the time to automate some of that stuff to make the updates smoother.

The takeaway is.. you don't need to install bs-platform, but it appears there's some bug in bsb-native that's causing an issue in install (I'm not 100% what it is).

cedeerwe commented 5 years ago

Thanks for the explanation. Is there any potential work-around? I do not need the newest version, I just want to try out Reprocessing.

Schmavery commented 5 years ago

You might have some luck downgrading bsb-native in the package.json to 4.0.7000?

cedeerwe commented 5 years ago

I have managed to build it by downgrading to 4.0.7000, thanks for the workaround tip!

Schmavery commented 5 years ago

Good to hear, we'll try to get the 4.0.1100 situation sorted out soon :)