-
Notifications
You must be signed in to change notification settings - Fork 457
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
building playground on the fly #4372
Conversation
Note that running the
This has to be prefixed with |
you need prefix it with proper ocamlrun, see my changes in repl.js
Antonio Nuno Monteiro <[email protected]>于2020年5月11日 周一上午11:45写道:
$ ~/Downloads/js_of_ocaml.bc --help
zsh: /Users/anmonteiro/Downloads/js_of_ocaml.bc: bad interpreter: /Users/hongbozhang/.opam/4.06.1/bin/ocamlrun: no such file or directory
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4372 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFWMK7UJHCRFPGNEMIGJV3RQ5YFFANCNFSM4M5RPZ3Q>
.
--
Regards
-- Hongbo Zhang
|
Sorry, was just making a note in the PR documenting the edge case for running the bytecode file. I edited my message to provide more context (and your solution). |
hmm, just running the whole playground building workflow as stated in the CONTRIBUTING file, and I am getting this:
Looks like there's some hardcoded paths somewhere in the .bc file? To highlight the error from the logs above:
|
let me check, findlib.conf should not be needed
Patrick Stapfer <[email protected]>于2020年5月11日 周一下午12:35写道:
hmm, just running the whole playground building workflow as stated in the
CONTRIBUTING file, and I am getting this:
BS_PLAYGROUND=../playground node scripts/repl.js 1 ↵
building byte code version of the compiler
>>>>>> running command: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlc.opt -w -30-40 -no-check-prims -I /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable/js_refmt_compiler.mli /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable/js_refmt_compiler.ml -o jsc.byte
<<<<<<
building js version
>>>>>> running command: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlrun /Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc compile jsc.byte -o exports.js
/Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc: Error: Config file not found - neither /Users/hongbozhang/.opam/4.06.1/lib/findlib.conf nor the directory /Users/hongbozhang/.opam/4.06.1/lib/findlib.conf.d
child_process.js:660
throw err;
^
Error: Command failed: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlrun /Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc compile jsc.byte -o exports.js
at checkExecSyncError (child_process.js:621:11)
at Object.execSync (child_process.js:657:15)
at e (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:29:5)
at prepare (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:53:3)
at Object.<anonymous> (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:86:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 27778,
stdout: null,
stderr: null
}
Looks like there's some hardcoded paths somewhere in the .bc file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4372 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFWMK6D54UB74J7Y6THDELRQ56CTANCNFSM4M5RPZ3Q>
.
--
Regards
-- Hongbo Zhang
|
@ryyppy can confirm findlib is invoked -- will test on fresh linux box , thanks for trying |
findlib.conf disabled, I tested on linux box, it seems to work, can you
confirm it?
…On Mon, May 11, 2020 at 12:37 PM Bob Zhang ***@***.***> wrote:
let me check, findlib.conf should not be needed
Patrick Stapfer ***@***.***>于2020年5月11日 周一下午12:35写道:
> hmm, just running the whole playground building workflow as stated in the
> CONTRIBUTING file, and I am getting this:
>
> BS_PLAYGROUND=../playground node scripts/repl.js 1 ↵
>
> building byte code version of the compiler
>
> >>>>>> running command: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlc.opt -w -30-40 -no-check-prims -I /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable/js_refmt_compiler.mli /Users/ryyppy/Projects/bucklescript/lib/4.06.1/unstable/js_refmt_compiler.ml -o jsc.byte
>
> <<<<<<
>
> building js version
>
> >>>>>> running command: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlrun /Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc compile jsc.byte -o exports.js
>
> /Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc: Error: Config file not found - neither /Users/hongbozhang/.opam/4.06.1/lib/findlib.conf nor the directory /Users/hongbozhang/.opam/4.06.1/lib/findlib.conf.d
>
> child_process.js:660
>
> throw err;
>
> ^
>
>
>
> Error: Command failed: /Users/ryyppy/Projects/bucklescript/native/4.06.1/bin/ocamlrun /Users/ryyppy/Projects/bucklescript/vendor/js_of_ocaml.bc compile jsc.byte -o exports.js
>
> at checkExecSyncError (child_process.js:621:11)
>
> at Object.execSync (child_process.js:657:15)
>
> at e (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:29:5)
>
> at prepare (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:53:3)
>
> at Object.<anonymous> (/Users/ryyppy/Projects/bucklescript/scripts/repl.js:86:1)
>
> at Module._compile (internal/modules/cjs/loader.js:959:30)
>
> at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
>
> at Module.load (internal/modules/cjs/loader.js:815:32)
>
> at Function.Module._load (internal/modules/cjs/loader.js:727:14)
>
> at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
>
> status: 1,
>
> signal: null,
>
> output: [ null, null, null ],
>
> pid: 27778,
>
> stdout: null,
>
> stderr: null
>
> }
>
>
>
>
> Looks like there's some hardcoded paths somewhere in the .bc file?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#4372 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAFWMK6D54UB74J7Y6THDELRQ56CTANCNFSM4M5RPZ3Q>
> .
>
--
Regards
-- Hongbo Zhang
--
Regards
-- Hongbo Zhang
|
This worked on my machine |
awesome!
Patrick Stapfer <[email protected]>于2020年5月11日 周一下午1:52写道:
This worked on my machine
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4372 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFWMKZ32HGJ73FSLAEBFTLRQ6HDFANCNFSM4M5RPZ3Q>
.
--
Regards
-- Hongbo Zhang
|
For people who want get a version of jsoo without depending on findlib, check this ocsigen/js_of_ocaml#966 for more details |
we check in a bytecode version of jsoo.bc and call
ocamlrun jsoo.bc
, no external deps, lighting build on the ci