-
Notifications
You must be signed in to change notification settings - Fork 437
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
How can I build the OCaml executable with bytecode? #762
Comments
This may be due to an incomplete build of |
Interesting - I recently tried to get the debugger working, and I actually didn't run into this problem on the bytecode executable, but I did run into it if I tried to use ocamldebug. At any rate I agree that a missing dynamically linked library from errpy is probably the root cause, we should try to get that working. |
I added a first PR for this here: facebook/errpy#5 I'm not sure if this is the right approach for distribution of the binaries but it's a first step. It solves the first stage of the issue for me locally. The next issue I get is:
but I haven't tried to fix this one yet. I'm also interested in this so that we can eventually be able to run this under |
Added this issue to LWT for my second error: ocsigen/lwt#999 I'm not sure if this is macOS specific. |
The above was a red-herring. I managed to build this library as bytecode and once grievejia/pyre-ast#7 and facebook/errpy#5 are done I will add a PR to fix this library as well. I haven't tested how helpful the OCaml debugger is for this codebase yet but it will at least work. |
Update on this, I managed to run the debugger and it's fairly useful. The issue that I have is that sometimes it might just crash with a segfault (probably related to the unix.fork code). The steps I've had to follow if anyone else is interested are:
This should allow debugging with ocamldebug. I used earlybird as my front-end in VSCode. Also, note that even though you can get segfaults when breaking in program flow when running in forward mode, I didn't get any segfaults when running in the time-travelling mode of the debugger. (ie running the program until the end and then adding breakpoints and stepping back) |
I tried by:
(ie the byte mode in the main executable stanza of the generated
dune
file)Once I try to run the bytecode executable I get the following:
The text was updated successfully, but these errors were encountered: