Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006616OCaml~DO NOT USE (was: OCaml general)public2014-10-18 04:302016-12-07 11:49
Reporterwhitequark 
Assigned Towhitequark 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.02.1 
Target VersionFixed in Version4.02.2+dev / +rc1 
Summary0006616: -use-runtime is broken without -custom
Descriptionocamlc -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?..
Tagsjunior_job
Attached Filespatch file icon fix-use-runtime.patch [^] (1,059 bytes) 2014-12-19 06:04 [Show Content]

- Relationships

-  Notes
(0012842)
doligez (administrator)
2014-12-18 00:01

It worked on MacOS 9 with MPW, which didn't need the #!
As far as I know it was never even tried on anything else.

Feel free to write a patch.
(0012882)
whitequark (developer)
2014-12-19 05:09

Reminder sent to: gasche

gasche, can you please merge the attached patch?
(0012901)
gasche (administrator)
2014-12-21 11:47

Merged in trunk and 4.02.
(0013271)
whitequark (developer)
2015-02-12 04:43

@gasche, I've discovered this patch requires a bootstrap in order to be effective for the compiler itself. Could you bootstrap 4.02?
(0013273)
gasche (administrator)
2015-02-12 08:24

Yes, I will do that.
(0013783)
whitequark (developer)
2015-05-02 16:25

Bootstrap still needed...
(0013787)
gasche (administrator)
2015-05-02 17:31

Thanks for the reminder, this change had slipped out. It is done now.

- Issue History
Date Modified Username Field Change
2014-10-18 04:30 whitequark New Issue
2014-10-18 04:31 whitequark Description Updated View Revisions
2014-12-18 00:01 doligez Note Added: 0012842
2014-12-18 00:01 doligez Assigned To => doligez
2014-12-18 00:01 doligez Status new => confirmed
2014-12-18 00:01 doligez Tag Attached: junior_job
2014-12-18 00:10 doligez Assigned To doligez =>
2014-12-19 05:09 whitequark File Added: fix-use-runtime.patch
2014-12-19 05:09 whitequark Note Added: 0012882
2014-12-19 06:04 whitequark File Deleted: fix-use-runtime.patch
2014-12-19 06:04 whitequark File Added: fix-use-runtime.patch
2014-12-21 11:47 gasche Note Added: 0012901
2014-12-21 11:47 gasche Status confirmed => resolved
2014-12-21 11:47 gasche Fixed in Version => 4.02.2+dev / +rc1
2014-12-21 11:47 gasche Resolution open => fixed
2014-12-21 11:47 gasche Assigned To => whitequark
2015-02-12 04:43 whitequark Note Added: 0013271
2015-02-12 08:24 gasche Note Added: 0013273
2015-05-02 16:25 whitequark Note Added: 0013783
2015-05-02 17:31 gasche Note Added: 0013787
2016-12-07 11:49 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker