{"action":"created","issue":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/2818","repository_url":"https://api.github.com/repos/rakudo/rakudo","labels_url":"https://api.github.com/repos/rakudo/rakudo/issues/2818/labels{/name}","comments_url":"https://api.github.com/repos/rakudo/rakudo/issues/2818/comments","events_url":"https://api.github.com/repos/rakudo/rakudo/issues/2818/events","html_url":"https://github.com/rakudo/rakudo/issues/2818","id":430029731,"node_id":"MDU6SXNzdWU0MzAwMjk3MzE=","number":2818,"title":"Cannot run perl6 without using LD_LIBRARY_PATH on OpenBSD","user":{"login":"Kaiepi","id":34197615,"node_id":"MDQ6VXNlcjM0MTk3NjE1","avatar_url":"https://avatars1.githubusercontent.com/u/34197615?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaiepi","html_url":"https://github.com/Kaiepi","followers_url":"https://api.github.com/users/Kaiepi/followers","following_url":"https://api.github.com/users/Kaiepi/following{/other_user}","gists_url":"https://api.github.com/users/Kaiepi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaiepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaiepi/subscriptions","organizations_url":"https://api.github.com/users/Kaiepi/orgs","repos_url":"https://api.github.com/users/Kaiepi/repos","events_url":"https://api.github.com/users/Kaiepi/events{/privacy}","received_events_url":"https://api.github.com/users/Kaiepi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-04-06T12:37:25Z","updated_at":"2019-04-06T12:41:19Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--\r\n\r\n    The template below contains optional suggestions. You\r\n    can omit some information.\r\n\r\n-->\r\n\r\n## The Problem\r\nMoarVM can't find `libmoar.so` when it's compiled to be relocatable, but can't find its dependencies when it's compiled not to be. The only way I can get perl6 to run is to compile moar to be relocatable and export `LD_LIBRARY_PATH`, `NQP_HOME`, and `PERL6_HOME` manually before running it.\r\n\r\nI don't think this was an issue back when I originally tested relocatable MoarVM, but that was long before many commits related to it were added.\r\n\r\n## Expected Behavior\r\nperl6 and moar should be possible to compile to be relocatable or not relocatable.\r\n\r\n## Actual Behavior\r\nThey're not.\r\n\r\n## Steps to Reproduce\r\n<!-- Provide a set of steps to reproduce the problem.\r\n     If the program unexpectedly crashes, please run it with\r\n     `perl6 --ll-exception` and provide the produced output. -->\r\nInstall `moar` with a path given to `--prefix` and try to run it with the path in `PATH`:\r\n```\r\nbastille% moar\r\nld.so: moar: can't load library 'libmoar.so'\r\nzsh: killed     moar\r\n```\r\n\r\nThis the output of `readelf`:\r\n```\r\nbastille% readelf -d $HOME/.perl6/bin/moar \r\n\r\nDynamic section at offset 0x3098 contains 21 entries:\r\n  Tag        Type                         Name/Value\r\n 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../lib]\r\n 0x0000000000000001 (NEEDED)             Shared library: [libmoar.so]\r\n 0x0000000000000001 (NEEDED)             Shared library: [libc.so.95.0]\r\n 0x000000000000001e (FLAGS)              ORIGIN\r\n 0x000000006ffffffb (FLAGS_1)            Flags: ORIGIN\r\n 0x0000000000000015 (DEBUG)              0x0\r\n 0x0000000000000007 (RELA)               0x870\r\n 0x0000000000000008 (RELASZ)             240 (bytes)\r\n 0x0000000000000009 (RELAENT)            24 (bytes)\r\n 0x000000006ffffff9 (RELACOUNT)          8\r\n 0x0000000000000017 (JMPREL)             0x960\r\n 0x0000000000000002 (PLTRELSZ)           672 (bytes)\r\n 0x0000000000000003 (PLTGOT)             0x3200\r\n 0x0000000000000014 (PLTREL)             RELA\r\n 0x0000000000000006 (SYMTAB)             0x2c0\r\n 0x000000000000000b (SYMENT)             24 (bytes)\r\n 0x0000000000000005 (STRTAB)             0x6c8\r\n 0x000000000000000a (STRSZ)              424 (bytes)\r\n 0x000000006ffffef5 (GNU_HASH)           0x5a8\r\n 0x0000000000000004 (HASH)               0x5c8\r\n 0x0000000000000000 (NULL)               0x0\r\n```\r\n\r\nAnd with `LD_DEBUG=1`:\r\n```\r\nbastille% LD_DEBUG=1 moar\r\nld.so loading: 'moar'\r\nexe load offset:  0x231aa8d5000\r\n flags moar = 0x80\r\nhead moar\r\nobj moar has moar as head\r\norig_path $ORIGIN/../lib\r\nnew_path  /home/morfent/Documents/zef/../lib\r\n flags /usr/lib/libwcwidth-icons.so = 0x0\r\nobj /usr/lib/libwcwidth-icons.so has moar as head\r\nlinking dep /usr/lib/libwcwidth-icons.so as child of moar\r\nexamining: 'moar'\r\nloading: libc.so.95.0 required by moar\r\n flags /usr/lib/libc.so.95.0 = 0x0\r\nobj /usr/lib/libc.so.95.0 has moar as head\r\nloading: libmoar.so required by moar\r\nld.so: moar: can't load library 'libmoar.so'\r\nzsh: killed     LD_DEBUG=1 moar\r\n```\r\n\r\nIt looks like `$ORIGIN` is getting ignored entirely.\r\n\r\n## Environment\r\n* Operating system: \r\nOpenBSD bastille.kennel.qt 6.5 GENERIC.MP#839 amd64\r\n* Compiler version (`perl6 -v`): \r\nThis is Rakudo version 2019.03.1-150-gd5044de2f built on MoarVM version 2019.03-68-g25b486dee\r\nimplementing Perl 6.d."},"comment":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/comments/480501085","html_url":"https://github.com/rakudo/rakudo/issues/2818#issuecomment-480501085","issue_url":"https://api.github.com/repos/rakudo/rakudo/issues/2818","id":480501085,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MDUwMTA4NQ==","user":{"login":"patzim","id":6307078,"node_id":"MDQ6VXNlcjYzMDcwNzg=","avatar_url":"https://avatars3.githubusercontent.com/u/6307078?v=4","gravatar_id":"","url":"https://api.github.com/users/patzim","html_url":"https://github.com/patzim","followers_url":"https://api.github.com/users/patzim/followers","following_url":"https://api.github.com/users/patzim/following{/other_user}","gists_url":"https://api.github.com/users/patzim/gists{/gist_id}","starred_url":"https://api.github.com/users/patzim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patzim/subscriptions","organizations_url":"https://api.github.com/users/patzim/orgs","repos_url":"https://api.github.com/users/patzim/repos","events_url":"https://api.github.com/users/patzim/events{/privacy}","received_events_url":"https://api.github.com/users/patzim/received_events","type":"User","site_admin":false},"created_at":"2019-04-06T12:41:19Z","updated_at":"2019-04-06T12:41:19Z","author_association":"CONTRIBUTOR","body":"I'll have a look."}}
{"actor":{"display_login":"patzim"}}