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
-use-runtime is broken without -custom #6616
Comments
Comment author: @damiendoligez It worked on MacOS 9 with MPW, which didn't need the #! Feel free to write a patch. |
Comment author: @whitequark gasche, can you please merge the attached patch? |
Comment author: @gasche Merged in trunk and 4.02. |
Comment author: @whitequark @gasche, I've discovered this patch requires a bootstrap in order to be effective for the compiler itself. Could you bootstrap 4.02? |
Comment author: @gasche Yes, I will do that. |
Comment author: @whitequark Bootstrap still needed... |
Comment author: @gasche Thanks for the reminder, this change had slipped out. It is done now. |
Original bug ID: 6616
Reporter: @whitequark
Assigned to: @whitequark
Status: closed (set by @xavierleroy on 2016-12-07T10:49:01Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.1
Fixed in version: 4.02.2+dev / +rc1
Category: ~DO NOT USE (was: OCaml general)
Tags: junior_job
Monitored by: @gasche
Bug description
ocamlc -use-runtime without -custom simply embeds the value as the path to the runtime interpreter at the beginning of the file. However, it doesn't prepend '#!', and as a result the executables can't be ran, at least not without directly invoking ocamlrun (which sort of defeats the point of using -use-runtime). It's possible to pass a path starting with #!, but this fails when Symtable tries to autodetect the primitive list. This can be worked around using -use-prims, but then Bytelink tries to absolutize a path starting with #! and breaks it.
This couldn't possibly ever work, and based on
git blame
, it was never changed since 2001 (!) Am I the first one using it?..File attachments
The text was updated successfully, but these errors were encountered: