{"action":"created","issue":{"url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/1136","repository_url":"https://api.github.com/repos/rustwasm/wasm-bindgen","labels_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/1136/labels{/name}","comments_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/1136/comments","events_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/1136/events","html_url":"https://github.com/rustwasm/wasm-bindgen/issues/1136","id":394825440,"node_id":"MDU6SXNzdWUzOTQ4MjU0NDA=","number":1136,"title":"Unable to build first example in \"Basic Usage\"","user":{"login":"rycwo","id":4828793,"node_id":"MDQ6VXNlcjQ4Mjg3OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/4828793?v=4","gravatar_id":"","url":"https://api.github.com/users/rycwo","html_url":"https://github.com/rycwo","followers_url":"https://api.github.com/users/rycwo/followers","following_url":"https://api.github.com/users/rycwo/following{/other_user}","gists_url":"https://api.github.com/users/rycwo/gists{/gist_id}","starred_url":"https://api.github.com/users/rycwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rycwo/subscriptions","organizations_url":"https://api.github.com/users/rycwo/orgs","repos_url":"https://api.github.com/users/rycwo/repos","events_url":"https://api.github.com/users/rycwo/events{/privacy}","received_events_url":"https://api.github.com/users/rycwo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-29T21:20:59Z","updated_at":"2018-12-30T08:41:38Z","closed_at":null,"author_association":"NONE","body":"Hello, I'm not too familiar with the Rust/WASM eco-system so this might be a silly issue, but I've been trying to get the very first example in the book to build without success. I've built a provisioned a VM using Vagrant and am trying to run `cargo build` whilst ssh'd in.\r\n\r\nI'm running into the following error.\r\n\r\n```\r\n> cargo build --target wasm32-unknown-unknown --verbose\r\n       Fresh unicode-xid v0.1.0\r\n       Fresh cfg-if v0.1.6\r\n       Fresh lazy_static v1.2.0\r\n       Fresh log v0.4.6\r\n       Fresh proc-macro2 v0.4.24\r\n       Fresh wasm-bindgen-shared v0.2.29\r\n       Fresh quote v0.6.10\r\n       Fresh syn v0.15.23\r\n       Fresh wasm-bindgen-backend v0.2.29\r\n       Fresh wasm-bindgen-macro-support v0.2.29\r\n       Fresh wasm-bindgen-macro v0.2.29\r\n       Fresh wasm-bindgen v0.2.29\r\n   Compiling colormap v0.1.0 (/vagrant)\r\n     Running `rustc --edition=2018 --crate-name colormap src/lib.rs --color always --crate-type cdylib --emit=dep-info,link -C debuginfo=2 -C metadata=bae851322f19a06d --out-dir /vagrant/target/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -C incremental=/vagrant/target/wasm32-unknown-unknown/debug/incremental -L dependency=/vagrant/target/wasm32-unknown-unknown/debug/deps -L dependency=/vagrant/target/debug/deps --extern wasm_bindgen=/vagrant/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-d5c375595d526f5c.rlib`\r\nerror: linking with `rust-lld` failed: exit code: 1\r\n  |\r\n  = note: \"rust-lld\" \"-flavor\" \"wasm\" \"-L\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.13k17v8e4f88k07q.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.1twf20wipw2o6j71.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.2n8voq6eg5z6bzup.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.3376557lo0jlb5mp.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.38n8iiz97gf9a188.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.3cf4t33aecxzfs23.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.3etm3y4ssqlp8g5y.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.40ucp5fciql9bq9n.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.415wgnu86mi2osyg.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.4f8qpmbp53wh81ti.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.4k5s3cx7dchgogqh.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.51911haxf6ddp48r.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.5fe375dgmcb296pq.rcgu.o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.biecf0khta96lea.rcgu.o\" \"-o\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.wasm\" \"--export\" \"greet\" \"--export\" \"__wbindgen_describe___wbg_alert_784255b767c74791\" \"--export\" \"__wbindgen_describe_greet\" \"--export\" \"__wbindgen_free\" \"--export\" \"__wbindgen_global_argument_ptr\" \"--export\" \"__wbindgen_malloc\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.1g8qapulbl4a9k0r.rcgu.o\" \"--gc-sections\" \"-O0\" \"-L\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps\" \"-L\" \"/vagrant/target/debug/deps\" \"-L\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib\" \"/vagrant/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-d5c375595d526f5c.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libstd-abe145ba76171775.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-96005f604f7dbd6e.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-ed3f28cdc088f8c3.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libbacktrace_sys-5bc11286719e2ece.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-d068423794124d61.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-f04c7eda49d54f2c.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-86eba1c052850cdc.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-54d5eed3884d8bd6.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-f298ce55474b8b8e.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libcore-58a74e26059c2878.rlib\" \"/home/vagrant/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-04d6453cdba92f37.rlib\" \"--no-threads\" \"-z\" \"stack-size=1048576\" \"--stack-first\" \"--allow-undefined\" \"--no-entry\" \"--export-table\" \"--fatal-warnings\" \"--export-dynamic\" \"--no-demangle\"\r\n  = note: rust-lld: error: failed to open /vagrant/target/wasm32-unknown-unknown/debug/deps/colormap.wasm: Invalid argument\r\n\r\n\r\nerror: aborting due to previous error\r\n\r\nerror: Could not compile `colormap`.\r\n\r\nCaused by:\r\n  process didn't exit successfully: `rustc --edition=2018 --crate-name colormap src/lib.rs --color always --crate-type cdylib --emit=dep-info,link -C debuginfo=2 -C metadata=bae851322f19a06d --out-dir /vagrant/target/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -C incremental=/vagrant/target/wasm32-unknown-unknown/debug/incremental -L dependency=/vagrant/target/wasm32-unknown-unknown/debug/deps -L dependency=/vagrant/target/debug/deps --extern wasm_bindgen=/vagrant/target/wasm32-unknown-unknown/debug/deps/libwasm_bindgen-d5c375595d526f5c.rlib` (exit code: 1)\r\n```\r\n\r\nThe VM is running Ubuntu 18.04 (64-bit). For more details I've pushed the latest changes to my [repo](https://gitlab.com/rycwo/colormap/tree/920e71da06555f845067579eb9f797332a2c4fd0).\r\n\r\nAny help would be much appreciated! :bowing_man:"},"comment":{"url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/comments/450546816","html_url":"https://github.com/rustwasm/wasm-bindgen/issues/1136#issuecomment-450546816","issue_url":"https://api.github.com/repos/rustwasm/wasm-bindgen/issues/1136","id":450546816,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDU0NjgxNg==","user":{"login":"rycwo","id":4828793,"node_id":"MDQ6VXNlcjQ4Mjg3OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/4828793?v=4","gravatar_id":"","url":"https://api.github.com/users/rycwo","html_url":"https://github.com/rycwo","followers_url":"https://api.github.com/users/rycwo/followers","following_url":"https://api.github.com/users/rycwo/following{/other_user}","gists_url":"https://api.github.com/users/rycwo/gists{/gist_id}","starred_url":"https://api.github.com/users/rycwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rycwo/subscriptions","organizations_url":"https://api.github.com/users/rycwo/orgs","repos_url":"https://api.github.com/users/rycwo/repos","events_url":"https://api.github.com/users/rycwo/events{/privacy}","received_events_url":"https://api.github.com/users/rycwo/received_events","type":"User","site_admin":false},"created_at":"2018-12-30T08:41:38Z","updated_at":"2018-12-30T08:41:38Z","author_association":"NONE","body":"Just a note that running the equivalent in a Docker container seems to work fine. I wanted to avoid using Docker as a single container for my development environment will be a bit of a hack/bloated if I were to include all the dependencies (node, etc). :thinking:"}}
{"actor":{"display_login":"rycwo"}}