{"action":"created","issue":{"url":"https://api.github.com/repos/tailhook/vagga/issues/85","labels_url":"https://api.github.com/repos/tailhook/vagga/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/tailhook/vagga/issues/85/comments","events_url":"https://api.github.com/repos/tailhook/vagga/issues/85/events","html_url":"https://github.com/tailhook/vagga/issues/85","id":110876291,"number":85,"title":"Fail to boot when system is based on musl","user":{"login":"piranna","id":532414,"avatar_url":"https://avatars.githubusercontent.com/u/532414?v=3","gravatar_id":"","url":"https://api.github.com/users/piranna","html_url":"https://github.com/piranna","followers_url":"https://api.github.com/users/piranna/followers","following_url":"https://api.github.com/users/piranna/following{/other_user}","gists_url":"https://api.github.com/users/piranna/gists{/gist_id}","starred_url":"https://api.github.com/users/piranna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piranna/subscriptions","organizations_url":"https://api.github.com/users/piranna/orgs","repos_url":"https://api.github.com/users/piranna/repos","events_url":"https://api.github.com/users/piranna/events{/privacy}","received_events_url":"https://api.github.com/users/piranna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-11T18:46:08Z","updated_at":"2015-10-11T20:21:45Z","closed_at":null,"body":"I'm trying to use NodeOS on vagga. NodeOS is a [musl](http://musl-libc.org/)-based operating system so it uses it's own `ld-linux` instead the usual one from `glibc`, like the one used on Ubuntu. For that reason, when executing `vagga run` it exits with error 127. Seems it's needed to exec the commands not only defining the `LD_LIBRARY_PATH` environment variable to use the vagrant lib folder (that seems it's being done correctly) but also using the correct ld-loader:\r\n\r\n```bash\r\n[piranna@Mabuk:~/Proyectos/NodeOS/node_modules/nodeos-barebones/.vagga/barebones]\r\n (vagga) > LD_LIBRARY_PATH=lib lib/libc.so bin/node\r\n> \r\n```"},"comment":{"url":"https://api.github.com/repos/tailhook/vagga/issues/comments/147242414","html_url":"https://github.com/tailhook/vagga/issues/85#issuecomment-147242414","issue_url":"https://api.github.com/repos/tailhook/vagga/issues/85","id":147242414,"user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T20:21:45Z","updated_at":"2015-10-11T20:21:45Z","body":"As far as I know it's handled by linux not by vagga. In particular the \"interpreter\" path has usually value hard-coded into binary itself.\r\n\r\nHere it is on NixOS (the last line is intepreter):\r\n```\r\n$ ldd $(which node)\r\n        linux-vdso.so.1 (0x00007ffc2cf94000)\r\n        libz.so.1 => /nix/store/31w31mc8immhpnmxvcl4l0fvc3i5iwh0-zlib-1.2.8/lib/libz.so.1 (0x00007f59cad93000)\r\n        libhttp_parser.so => /nix/store/k40zmqkmc8v61a4gj938z6xapnc3ijn2-http-parser-2.5.0/lib/libhttp_parser.so (0x00007f59cab8d000)\r\n        libuv.so.1 => /nix/store/npa67ryxavxs1rjid62wk81sbq10d527-libuv-1.7.5/lib/libuv.so.1 (0x00007f59ca96b000)\r\n        libcrypto.so.1.0.0 => /nix/store/arbd09p2cvj876rnymn9v7ziks4r2cb1-openssl-1.0.2d/lib/libcrypto.so.1.0.0 (0x00007f59ca517000)\r\n        libssl.so.1.0.0 => /nix/store/arbd09p2cvj876rnymn9v7ziks4r2cb1-openssl-1.0.2d/lib/libssl.so.1.0.0 (0x00007f59ca29e000)\r\n        libdl.so.2 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libdl.so.2 (0x00007f59ca09a000)\r\n        librt.so.1 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/librt.so.1 (0x00007f59c9e92000)\r\n        libstdc++.so.6 => /nix/store/i9nn1fkcy95dzf0hb9wi8gbkid3iw1sa-gcc-4.9.3/lib/libstdc++.so.6 (0x00007f59c9b87000)\r\n        libm.so.6 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libm.so.6 (0x00007f59c9884000)\r\n        libgcc_s.so.1 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libgcc_s.so.1 (0x00007f59c966e000)\r\n        libpthread.so.0 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libpthread.so.0 (0x00007f59c9451000)\r\n        libc.so.6 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libc.so.6 (0x00007f59c90b1000)\r\n        libnsl.so.1 => /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libnsl.so.1 (0x00007f59c8e99000)\r\n        /nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007f59cafab000)\r\n```\r\n\r\nHere it is on Alpine, which is also musl-libc based (here it is first line for some reason):\r\n```\r\n# ldd $(which node)\r\n        /lib/ld-musl-x86_64.so.1 (0x56204e71a000)\r\n        libz.so.1 => /lib/libz.so.1 (0x7f2f423fb000)\r\n        libcares.so.2 => /usr/lib/libcares.so.2 (0x7f2f421eb000)\r\n        libuv.so.0.10 => /usr/lib/libuv.so.0.10 (0x7f2f41fca000)\r\n        libssl.so.1.0.0 => /lib/libssl.so.1.0.0 (0x7f2f41d65000)\r\n        libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0x7f2f41982000)\r\n        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f2f41679000)\r\n        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f2f41467000)\r\n        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x56204e71a000)\r\n```\r\n\r\nHere it is on Ubuntu:\r\n```\r\n# ldd $(which node)\r\n        linux-vdso.so.1 =>  (0x00007ffd21b5d000)\r\n        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd3216d6000)\r\n        libcares.so.2 => /usr/lib/x86_64-linux-gnu/libcares.so.2 (0x00007fd3214c5000)\r\n        libv8.so.3.14.5 => /usr/lib/libv8.so.3.14.5 (0x00007fd320eba000)\r\n        libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fd320c5b000)\r\n        libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fd320880000)\r\n        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd32067b000)\r\n        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd320473000)\r\n        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd32016f000)\r\n        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd31ff50000)\r\n        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd31fb8b000)\r\n        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd31f885000)\r\n        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd31f66e000)\r\n        /lib64/ld-linux-x86-64.so.2 (0x0000562681820000)\r\n```\r\n\r\nTo run nixos binary on ubuntu you may use [patchelf](https://nixos.org/patchelf.html) utility:\r\n```\r\npatchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 node\r\n```\r\nOr vica versa. I've not tried to patch it to musl-based interpreter (I believe it may crash because of some binary incompatiblities).\r\n\r\nAnyway I think you run the node binary from other system and compiled with different interpreter path."}}