{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/971","repository_url":"https://api.github.com/repos/ocaml/ocaml","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/971/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/971/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/971/events","html_url":"https://github.com/ocaml/ocaml/pull/971","id":195479196,"number":971,"title":"Compile the toplevel files with -opaque.","user":{"login":"bschommer","id":6874733,"avatar_url":"https://avatars.githubusercontent.com/u/6874733?v=3","gravatar_id":"","url":"https://api.github.com/users/bschommer","html_url":"https://github.com/bschommer","followers_url":"https://api.github.com/users/bschommer/followers","following_url":"https://api.github.com/users/bschommer/following{/other_user}","gists_url":"https://api.github.com/users/bschommer/gists{/gist_id}","starred_url":"https://api.github.com/users/bschommer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bschommer/subscriptions","organizations_url":"https://api.github.com/users/bschommer/orgs","repos_url":"https://api.github.com/users/bschommer/repos","events_url":"https://api.github.com/users/bschommer/events{/privacy}","received_events_url":"https://api.github.com/users/bschommer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-14T09:23:00Z","updated_at":"2016-12-14T17:47:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/971","html_url":"https://github.com/ocaml/ocaml/pull/971","diff_url":"https://github.com/ocaml/ocaml/pull/971.diff","patch_url":"https://github.com/ocaml/ocaml/pull/971.patch"},"body":"For example ocamlfind, camlp4 complain about topdirs.cmi and toploop.cmi not being compiled with -opaque."},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/267103176","html_url":"https://github.com/ocaml/ocaml/pull/971#issuecomment-267103176","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/971","id":267103176,"user":{"login":"lpw25","id":2631210,"avatar_url":"https://avatars.githubusercontent.com/u/2631210?v=3","gravatar_id":"","url":"https://api.github.com/users/lpw25","html_url":"https://github.com/lpw25","followers_url":"https://api.github.com/users/lpw25/followers","following_url":"https://api.github.com/users/lpw25/following{/other_user}","gists_url":"https://api.github.com/users/lpw25/gists{/gist_id}","starred_url":"https://api.github.com/users/lpw25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpw25/subscriptions","organizations_url":"https://api.github.com/users/lpw25/orgs","repos_url":"https://api.github.com/users/lpw25/repos","events_url":"https://api.github.com/users/lpw25/events{/privacy}","received_events_url":"https://api.github.com/users/lpw25/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T17:47:26Z","updated_at":"2016-12-14T17:47:26Z","body":"Ok, so I guess `ocamlfind` is compiling its toplevel support (`topfind.ml`) for native code even when the native toplevel is not installed. Presumably it uses this to produce a `.cmxs` so it never actually tries to link it into an executable -- which is good because it can't without the `.cmx` files it is missing. I can see a few possible solutions to this, and I'm not sure which is the best:\r\n\r\n1. The patch in this PR. Toploop and Topdirs are unlikely to be used in performance sensitive code, so there is much downside. Although it feels a bit wrong to use `-opaque` for something which doesn't actually have multiple implementations.\r\n2. Change `ocamlfind`'s configure/build process so that it detects whether the native code version is actually needed.\r\n3. Add `-w -58` to that invocation of `ocamlopt` in the build of `ocamlfind`. It's just a warning after all."}}
{"actor":{"display_login":"lpw25"}}