{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/dune/issues/715","repository_url":"https://api.github.com/repos/ocaml/dune","labels_url":"https://api.github.com/repos/ocaml/dune/issues/715/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/dune/issues/715/comments","events_url":"https://api.github.com/repos/ocaml/dune/issues/715/events","html_url":"https://github.com/ocaml/dune/issues/715","id":316597766,"number":715,"title":"Cross Compilation & C Stubs","user":{"login":"rgrinberg","id":139003,"avatar_url":"https://avatars3.githubusercontent.com/u/139003?v=4","gravatar_id":"","url":"https://api.github.com/users/rgrinberg","html_url":"https://github.com/rgrinberg","followers_url":"https://api.github.com/users/rgrinberg/followers","following_url":"https://api.github.com/users/rgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/rgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrinberg/subscriptions","organizations_url":"https://api.github.com/users/rgrinberg/orgs","repos_url":"https://api.github.com/users/rgrinberg/repos","events_url":"https://api.github.com/users/rgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/rgrinberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rgrinberg","id":139003,"avatar_url":"https://avatars3.githubusercontent.com/u/139003?v=4","gravatar_id":"","url":"https://api.github.com/users/rgrinberg","html_url":"https://github.com/rgrinberg","followers_url":"https://api.github.com/users/rgrinberg/followers","following_url":"https://api.github.com/users/rgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/rgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrinberg/subscriptions","organizations_url":"https://api.github.com/users/rgrinberg/orgs","repos_url":"https://api.github.com/users/rgrinberg/repos","events_url":"https://api.github.com/users/rgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/rgrinberg/received_events","type":"User","site_admin":false},"assignees":[{"login":"rgrinberg","id":139003,"avatar_url":"https://avatars3.githubusercontent.com/u/139003?v=4","gravatar_id":"","url":"https://api.github.com/users/rgrinberg","html_url":"https://github.com/rgrinberg","followers_url":"https://api.github.com/users/rgrinberg/followers","following_url":"https://api.github.com/users/rgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/rgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrinberg/subscriptions","organizations_url":"https://api.github.com/users/rgrinberg/orgs","repos_url":"https://api.github.com/users/rgrinberg/repos","events_url":"https://api.github.com/users/rgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/rgrinberg/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-04-22T17:35:33Z","updated_at":"2018-04-23T13:59:47Z","closed_at":null,"author_association":"MEMBER","body":"I'm investigating porting ocaml-ssl to dune and the new configurator and @toots has brought up some good points about supporting cross compilation in https://github.com/savonet/ocaml-ssl/issues/35\r\n\r\nIn particular, how the current cross compilation scheme works:\r\n\r\n> We're using the standard autoconf paradigm, so when passing --host=<triplet> option, all compilation binaries are prefixed with <triplet>, i.e. gcc becomes <triplet>-gcc, pkg-config becomes <triplet>-pkg-config etc. In most situations this is enough to make it work. Also, autoconf knows to disable checks such as running cross-compiled binaries and such.\r\n\r\nWhich points that our cross compilation scheme is ignores pkg-config entirely.\r\n\r\nand that our current assumptions about using ocaml's `CC` may be naive in the context of windows.\r\n\r\n> Sounds good. Using ocamlc configuration might be tricky for the linker, however. On windows, in particular, the linker for OCaml code is flexlink and will prolly not work as expected for straight-up C targets.\r\n\r\nPoints worth considering:\r\n\r\n* Should we support autoconf's scheme for binary selection when x compiling?\r\n\r\n* What's a good way to make configurator aware of x compilation? Should we pass the correct `pkg-config` binary to it? or should it somehow find it if it's in a cross compilation context?\r\n\r\n* The assertions about windows & `$(CC)` need to be verified.\r\n\r\nA successful port of ocaml-ssl to dune should be quite valuable. It's a widely used package, a key part of the lwt ecosystem, and a stepping stone to get any kind of uable http client running on windoze. Lastly, it will be a good test for our C stubs stack touching on cross compilation, configurator, macports, win32, etc.\r\n\r\ncc'ing:\r\n\r\n@diml for the first 2 points\r\n@dra27 as our windows oracle\r\n@avsm regarding pkg-config \r\n@whitequark as the general x compilation expert."},"comment":{"url":"https://api.github.com/repos/ocaml/dune/issues/comments/383585349","html_url":"https://github.com/ocaml/dune/issues/715#issuecomment-383585349","issue_url":"https://api.github.com/repos/ocaml/dune/issues/715","id":383585349,"user":{"login":"toots","id":871060,"avatar_url":"https://avatars1.githubusercontent.com/u/871060?v=4","gravatar_id":"","url":"https://api.github.com/users/toots","html_url":"https://github.com/toots","followers_url":"https://api.github.com/users/toots/followers","following_url":"https://api.github.com/users/toots/following{/other_user}","gists_url":"https://api.github.com/users/toots/gists{/gist_id}","starred_url":"https://api.github.com/users/toots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toots/subscriptions","organizations_url":"https://api.github.com/users/toots/orgs","repos_url":"https://api.github.com/users/toots/repos","events_url":"https://api.github.com/users/toots/events{/privacy}","received_events_url":"https://api.github.com/users/toots/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T13:59:47Z","updated_at":"2018-04-23T13:59:47Z","author_association":"NONE","body":"Maybe now :-)"}}
{"actor":{"display_login":"toots"}}