{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/51304","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/51304/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/51304/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/51304/events","html_url":"https://github.com/rust-lang/rust/issues/51304","id":328754057,"node_id":"MDU6SXNzdWUzMjg3NTQwNTc=","number":51304,"title":"WASM doesn't work on NixOS","user":{"login":"P-E-Meunier","id":17021304,"node_id":"MDQ6VXNlcjE3MDIxMzA0","avatar_url":"https://avatars1.githubusercontent.com/u/17021304?v=4","gravatar_id":"","url":"https://api.github.com/users/P-E-Meunier","html_url":"https://github.com/P-E-Meunier","followers_url":"https://api.github.com/users/P-E-Meunier/followers","following_url":"https://api.github.com/users/P-E-Meunier/following{/other_user}","gists_url":"https://api.github.com/users/P-E-Meunier/gists{/gist_id}","starred_url":"https://api.github.com/users/P-E-Meunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P-E-Meunier/subscriptions","organizations_url":"https://api.github.com/users/P-E-Meunier/orgs","repos_url":"https://api.github.com/users/P-E-Meunier/repos","events_url":"https://api.github.com/users/P-E-Meunier/events{/privacy}","received_events_url":"https://api.github.com/users/P-E-Meunier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-02T15:44:05Z","updated_at":"2018-06-02T15:44:05Z","closed_at":null,"author_association":"NONE","body":"I can't compile WASM on NixOS, using the binaries from Rustup, patched (with `patchelf`) to work on NixOS.\r\n\r\nThe problem seems to be that some files aren't linked properly. Comparing with wasm code produced on Ubuntu with the same version of Rustc shows that the wasm I get is smaller and contains many references to a variable named `env`, along with functions supposedly imported from `env`.\r\n\r\nThis sounds a lot like a link problem, but I don't know how to debug these, since the temporary files produced by Rustc before calling `lld` seem to get wiped off as soon as `lld` finishes its job.\r\n\r\nSome NixOS-specific problems include the path to `lld`, but it seems the patched version supplied by rustup is the first in the path (at least from the command-line, I hope `rustc` looks for its linker in the same order as the shell)."}}
{"actor":{"display_login":"P-E-Meunier"}}