{"action":"created","issue":{"url":"https://api.github.com/repos/dbuenzli/mtime/issues/12","labels_url":"https://api.github.com/repos/dbuenzli/mtime/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dbuenzli/mtime/issues/12/comments","events_url":"https://api.github.com/repos/dbuenzli/mtime/issues/12/events","html_url":"https://github.com/dbuenzli/mtime/issues/12","id":123446793,"number":12,"title":"bytecode support","user":{"login":"edwintorok","id":721894,"avatar_url":"https://avatars.githubusercontent.com/u/721894?v=3","gravatar_id":"","url":"https://api.github.com/users/edwintorok","html_url":"https://github.com/edwintorok","followers_url":"https://api.github.com/users/edwintorok/followers","following_url":"https://api.github.com/users/edwintorok/following{/other_user}","gists_url":"https://api.github.com/users/edwintorok/gists{/gist_id}","starred_url":"https://api.github.com/users/edwintorok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwintorok/subscriptions","organizations_url":"https://api.github.com/users/edwintorok/orgs","repos_url":"https://api.github.com/users/edwintorok/repos","events_url":"https://api.github.com/users/edwintorok/events{/privacy}","received_events_url":"https://api.github.com/users/edwintorok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-22T09:31:02Z","updated_at":"2015-12-22T15:30:10Z","closed_at":null,"body":"I'm using `mtime` with `ocamlopt` but it would be nice to have `mtime` working with the toplevel or bytecode too.\r\nApparently it tries to load `rt` as a bytecode library and not the system `librt.so`:\r\n\r\n```\r\n$ ocamlc -version\r\n4.02.3\r\n$ ocamlfind ocamlc -package mtime.os x.ml -linkpkg  -verbose\r\nEffective set of compiler predicates: pkg_mtime.os,autolink,byte\r\n+ ocamlc.opt -verbose -I /home/edwin/.opam/4.02.3/lib/mtime/os /home/edwin/.opam/4.02.3/lib/mtime/os/mtime.cma x.ml\r\nFile \"x.ml\", line 1:\r\nError: Error on dynamically loaded library: dllrt.so: dllrt.so: cannot open shared object file: No such file or directory\r\nocamlc.opt returned with exit code 2\r\n\r\n$ utop\r\n[...]\r\nutop # #require \"mtime.os.top\";;\r\nCannot load required shared library dllrt.                                                                                                                                  Reason: dllrt.so: dllrt.so: cannot open shared object file: No such file or directory.                                                                                      File \"/home/edwin/.opam/4.02.3/lib/mtime/os/mtime_top_init.ml\", line 1:                                                                                                     \r\nError: Reference to undefined global `Mtime'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dbuenzli/mtime/issues/comments/166647189","html_url":"https://github.com/dbuenzli/mtime/issues/12#issuecomment-166647189","issue_url":"https://api.github.com/repos/dbuenzli/mtime/issues/12","id":166647189,"user":{"login":"edwintorok","id":721894,"avatar_url":"https://avatars.githubusercontent.com/u/721894?v=3","gravatar_id":"","url":"https://api.github.com/users/edwintorok","html_url":"https://github.com/edwintorok","followers_url":"https://api.github.com/users/edwintorok/followers","following_url":"https://api.github.com/users/edwintorok/following{/other_user}","gists_url":"https://api.github.com/users/edwintorok/gists{/gist_id}","starred_url":"https://api.github.com/users/edwintorok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwintorok/subscriptions","organizations_url":"https://api.github.com/users/edwintorok/orgs","repos_url":"https://api.github.com/users/edwintorok/repos","events_url":"https://api.github.com/users/edwintorok/events{/privacy}","received_events_url":"https://api.github.com/users/edwintorok/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T15:30:10Z","updated_at":"2015-12-22T15:30:10Z","body":"On 12/22/2015 05:20 PM, Daniel Bünzli wrote:\n> Mmmmh sorry about that. This comes at the right time since I'm working on finishing ptime_clock and was copying that build system. I tried to provide a fix could you please try to:\n> \n> |opam pin -kgit mtime https://github.com/dbuenzli/mtime.git cp $(opam config var mtime:doc)/min.ml /tmp/ cd /tmp ocamlfind ocamlc -package mtime.os -linkpkg -o min.byte min.ml ./min.byte ocamlfind ocamlopt -package mtime.os -linkpkg -o min.native min.ml ./min.native |\n> \n> and confirm me that this now works (I tried on Darwin and Ubuntu 14.04 64bits).\n\nThanks, works on Debian Jessie.\n\nNot sure if Linux is the only OS that needs -lrt though, but I don't have a Solaris machine to test now.\n"}}