-
Notifications
You must be signed in to change notification settings - Fork 632
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
Coq shouldn't require -linkall
#9547
Comments
@ejgallego can I assign this issue to you? |
I can't commit to fix this in the short term as it needs some deep coqpp modification; note that I already track issues I've submitted myself anyways. |
@ejgallego Are these coqpp modifications described somewhere? Would it be appropriate to describe them here or should there be another issue opened about them. If there is such an issue or it is created, then we can label this one as "needs" something (how to put the label name is not yet clear to me though, it doesn't seem to be any of the ones that we already have, or it would have to be generalized). |
So basically you need Not difficult, but time consuming. |
No label needed IMHO, what to do is pretty clear [have all the right initializers called in the dep chain] |
But is this something that you are considering implementing yourself or for which you would prefer to request the help of someone else in @coq/parsing-maintainers? And if so, do they understand the idea? |
If I have time I'll implement myself but I cannot give a bound now, so anyone is free to take on it of course. |
This PR is a draft to request for more comments, likely far from final form yet. See issue coq#9547 This is also related to PR coq#10951 and coq#7698 We seem to save half to one megabyte in the binaries: ``` -rwxr-xr-x 1 egallego egallego 31651662 janv. 31 00:05 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 32467231 janv. 31 00:08 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 23781840 janv. 31 00:05 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 24395352 janv. 31 00:08 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 23751520 janv. 31 00:05 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 24395608 janv. 31 00:08 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 41996191 janv. 31 00:05 coqtop_byte_bin.bc -rwxr-xr-x 1 egallego egallego 43020328 janv. 31 00:08 coqtop_byte_bin.bc ```
This PR is a draft to request for more comments, likely far from final form yet. See issue coq#9547 This is also related to PR coq#10951 and coq#7698 We seem to save half to one megabyte in the binaries: ``` -rwxr-xr-x 1 egallego egallego 31651662 janv. 31 00:05 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 32467231 janv. 31 00:08 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 23781840 janv. 31 00:05 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 24395352 janv. 31 00:08 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 23751520 janv. 31 00:05 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 24395608 janv. 31 00:08 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 41996191 janv. 31 00:05 coqtop_byte_bin.bc -rwxr-xr-x 1 egallego egallego 43020328 janv. 31 00:08 coqtop_byte_bin.bc ```
This PR is a draft to request for more comments, likely far from final form yet. See issue coq#9547 This is also related to PR coq#10951 and coq#7698 We seem to save half to one megabyte in the binaries: ``` -rwxr-xr-x 1 egallego egallego 31651662 janv. 31 00:05 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 32467231 janv. 31 00:08 coqc_bin.bc -rwxr-xr-x 1 egallego egallego 23781840 janv. 31 00:05 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 24395352 janv. 31 00:08 coqc_bin.exe -rwxr-xr-x 1 egallego egallego 23751520 janv. 31 00:05 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 24395608 janv. 31 00:08 coqtop_bin.exe -rwxr-xr-x 1 egallego egallego 41996191 janv. 31 00:05 coqtop_byte_bin.bc -rwxr-xr-x 1 egallego egallego 43020328 janv. 31 00:08 coqtop_byte_bin.bc ```
We introduce new syntax ``` Require ML Module pkg1 ... pkgn. ``` that uses findlib to locate and load a Coq plugin and its dependencies. This makes feasible to actually develop Coq plugins that depend on OCaml libraries not linked into the Coq main binaries without hitting problems. Fixes coq#5028, fixes coq#7698 . This provides a workaround for coq#12607 , and helps with coq#9547 .
We introduce new syntax ``` Require ML Module pkg1 ... pkgn. ``` that uses findlib to locate and load a Coq plugin and its dependencies. This makes feasible to actually develop Coq plugins that depend on OCaml libraries not linked into the Coq main binaries without hitting problems. Fixes coq#5028, fixes coq#7698 . This provides a workaround for coq#12607 , and helps with coq#9547 .
Note that #15220 and in general proper plugin linking in OCaml seems to require This is very unfortunate, but we don't have a short term fix for now :S |
As of today, any executable linking to Coq has to specify
-linkall
as to properly initialize the parser and some other structures.IMHO, we should fix our static initialization system so this is not the case.
cc for some discussion: ocaml/dune#1819
The text was updated successfully, but these errors were encountered: