{"action":"created","issue":{"url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/341","repository_url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap","labels_url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/341/comments","events_url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/341/events","html_url":"https://github.com/BinaryAnalysisPlatform/bap/issues/341","id":135506323,"number":341,"title":"Trouble because bitstring lib has no unix.cma. ","user":{"login":"caiannello","id":10247237,"avatar_url":"https://avatars.githubusercontent.com/u/10247237?v=3","gravatar_id":"","url":"https://api.github.com/users/caiannello","html_url":"https://github.com/caiannello","followers_url":"https://api.github.com/users/caiannello/followers","following_url":"https://api.github.com/users/caiannello/following{/other_user}","gists_url":"https://api.github.com/users/caiannello/gists{/gist_id}","starred_url":"https://api.github.com/users/caiannello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiannello/subscriptions","organizations_url":"https://api.github.com/users/caiannello/orgs","repos_url":"https://api.github.com/users/caiannello/repos","events_url":"https://api.github.com/users/caiannello/events{/privacy}","received_events_url":"https://api.github.com/users/caiannello/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-22T18:50:31Z","updated_at":"2016-02-22T19:10:05Z","closed_at":null,"body":"I hope this is the proper forum for this. If not, apologies, and please advise.\r\n\r\nIn Ubuntu 14.04 LTS x64, I installed opam, ocaml, and BAP per the instructions:\r\n\r\n$ opam init --comp=4.02.1\r\n$ eval `opam config env`\r\n$ opam install depext\r\n$ opam depext bap\r\n$ opam install bap\r\n\r\nI had a failure with that regarding some packages:\r\n\r\n[ERROR] The compilation of piqilib failed at \"make\". \r\n[ERROR] The compilation of ezjsonm failed at \"make\".\r\n\r\n...but after looking through closed issues, I found that I could make those go away with the following:\r\n\r\nopam upgrade 'lwt>=2.5.0' cohttp\r\nopam install optcomp\r\nopam install bap\r\n\r\nwhich seems to have worked.\r\n\r\nUsing the python bindings, I am able to show disassembly of an aarch64 function from bionic libc, which is very cool to me. I want to try to work with BIL too.\r\n\r\nI try to get started using utop:\r\n\r\nutop\r\n#use \"topfind\";;\r\n...ok...\r\nutop # #require \"bap.top\";;\r\nCannot find file /home/ubuntu/.opam/4.02.1/lib/bitstring/unix.cma.              Cannot load required shared library dllllvm_stubs.                              Reason: /home/ubuntu/.opam/4.02.1/lib/stublibs/dllllvm_stubs.so: /home/ubuntu/.opam/4.02.1/lib/stublibs/dllllvm_stubs.so: undefined symbol: del_curterm.\r\nCannot load required shared library dllllvm_loader_stubs.\r\nReason: /home/ubuntu/.opam/4.02.1/lib/stublibs/dllllvm_loader_stubs.so: /home/ubuntu/.opam/4.02.1/lib/stublibs/dllllvm_loader_stubs.so: undefined symbol: del_curterm.\r\nError: Reference to undefined global `Bap_llvm_loader'\r\n\r\n\r\n\"baptop\" gives similar error.\r\n\r\nShould I roll back the version of bitstring lib to the one you guys are expecting? If so, how can I do that?\r\n\r\nThanks,\r\nCraig Iannello\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/comments/187323961","html_url":"https://github.com/BinaryAnalysisPlatform/bap/issues/341#issuecomment-187323961","issue_url":"https://api.github.com/repos/BinaryAnalysisPlatform/bap/issues/341","id":187323961,"user":{"login":"ivg","id":2336698,"avatar_url":"https://avatars.githubusercontent.com/u/2336698?v=3","gravatar_id":"","url":"https://api.github.com/users/ivg","html_url":"https://github.com/ivg","followers_url":"https://api.github.com/users/ivg/followers","following_url":"https://api.github.com/users/ivg/following{/other_user}","gists_url":"https://api.github.com/users/ivg/gists{/gist_id}","starred_url":"https://api.github.com/users/ivg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivg/subscriptions","organizations_url":"https://api.github.com/users/ivg/orgs","repos_url":"https://api.github.com/users/ivg/repos","events_url":"https://api.github.com/users/ivg/events{/privacy}","received_events_url":"https://api.github.com/users/ivg/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T19:10:04Z","updated_at":"2016-02-22T19:10:04Z","body":"That is kind of a very surprising output. I suspect, that you've done something very weird with your system, to get it. But lets move in a slower pace:\r\n\r\n1. bitstring is innoncent here, this `unix.cma` is a confusing warning message, just ignore it  (it is already fixed in a new comming version)\r\n\r\n2. `opam install optcomp` is not needed, it was a totally wrong advice (although not harmful), looks like that whoever advised it, thought that `optcomp` stands for optimized compiler, but it is `cpp` like preprocessor, that we have never used. The line that actually helped was the first one (`opam upgrade 'lwt>=2.5.0' cohttp`), although it is still kind of a weird advice...\r\n\r\n3. Now to the problem itself. Are you absolutely sure, that you didn't mess with your `/lib` or `/usr/lib` folder? Like linking the `libncurses` or `libcurses` library? In particular do you have `/usr/lib/libncurses.so` file? (that you shouldn't have in normal Ubuntu installation). \r\n\r\nIf not, then I can only suggest you to cleanup everything, and start accurately from scratch. Just removing your `.opam` folder will work. Then do the following:\r\n\r\n```\r\nopam init --comp=4.02.2\r\neval `opam config env`\r\nopam install depext\r\nopam depext bap\r\nopam install 'lwt>=2.5.0' bap\r\n```\r\n\r\nP.S.\r\n\r\n> Using the python bindings, I am able to show disassembly of an aarch64 function from bionic libc, which is very cool to me. I want to try to work with BIL too.\r\n\r\nYou will not see the BIL for aarch64, unfortunately. We support lifting only for ARM, x86 and x86-64."}}