{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33465","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33465/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33465/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33465/events","html_url":"https://github.com/rust-lang/rust/issues/33465","id":153485393,"number":33465,"title":"Linker error on cross compile to x86_64-pc-windows-gnu","user":{"login":"Kimundi","id":2903206,"avatar_url":"https://avatars.githubusercontent.com/u/2903206?v=3","gravatar_id":"","url":"https://api.github.com/users/Kimundi","html_url":"https://github.com/Kimundi","followers_url":"https://api.github.com/users/Kimundi/followers","following_url":"https://api.github.com/users/Kimundi/following{/other_user}","gists_url":"https://api.github.com/users/Kimundi/gists{/gist_id}","starred_url":"https://api.github.com/users/Kimundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kimundi/subscriptions","organizations_url":"https://api.github.com/users/Kimundi/orgs","repos_url":"https://api.github.com/users/Kimundi/repos","events_url":"https://api.github.com/users/Kimundi/events{/privacy}","received_events_url":"https://api.github.com/users/Kimundi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-06T16:10:13Z","updated_at":"2016-05-06T17:41:03Z","closed_at":null,"body":"Attempting to cross compile from 64Bit Arch after doing\r\n```\r\nrustup target add x86_64-pc-windows-gnu\r\ncargo build --release --target=x86_64-pc-windows-gnu --verbose\r\n```\r\n\r\nErrors with an linker error:\r\n\r\n```\r\nmarvin@tp-marvin-arch ~/d/r/g/fun1> cargo build --release --target=x86_64-pc-windows-gnu --verbose\r\n       Fresh winapi v0.2.6\r\n       [...]\r\n       Fresh cgmath v0.9.1\r\n   Compiling fun1 v0.1.0 (file:///home/marvin/dev/rust/graphics_fun_2016-05-05/fun1)\r\n     Running `rustc src/main.rs --crate-name fun1 --crate-type bin -C opt-level=3 --out-dir /home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release --emit=dep-info,link --target x86_64-pc-windows-gnu -L dependency=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release -L dependency=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps --extern chrono=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libchrono-086951ef1dea2712.rlib --extern specs=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libspecs-5ca5e24705e76ffe.rlib --extern gfx_device_gl=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_device_gl-6f378e292a444005.rlib --extern glutin=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libglutin-fe8847f8e5c48a8d.rlib --extern cgmath=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libcgmath-76ab5db7eccfb351.rlib --extern gfx_window_glutin=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_window_glutin-d2f847aed3bc91f3.rlib --extern gfx=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx-dc2b98d25789486e.rlib -L native=/home/marvin/.cargo/registry/src/github.com-88ac128001ac3a9a/dwmapi-sys-0.1.0/x86_64`\r\nerror: linking with `gcc` failed: exit code: 1\r\nnote: \"gcc\" \"-Wl,--enable-long-section-names\" \"-fno-use-linker-plugin\" \"-Wl,--nxcompat\" \"-nostdlib\" \"-m64\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o\" \"-L\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/fun1.0.o\" \"-o\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/fun1.exe\" \"-Wl,--gc-sections\" \"-nodefaultlibs\" \"-L\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release\" \"-L\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps\" \"-L\" \"/home/marvin/.cargo/registry/src/github.com-88ac128001ac3a9a/dwmapi-sys-0.1.0/x86_64\" \"-L\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib\" \"-Wl,-Bstatic\" \"-Wl,-Bdynamic\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx-dc2b98d25789486e.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libcgmath-76ab5db7eccfb351.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_window_glutin-d2f847aed3bc91f3.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libglutin-fe8847f8e5c48a8d.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libdwmapi-57add9827d7809cf.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libuser32-f952491ba4e166ee.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libshared_library-8a12fcda5e4d258b.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/liblazy_static-5e6d9f365bf63baa.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libshell32-f26d4446bb440430.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgdi32-cc8216356f37b045.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_device_gl-6f378e292a444005.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_core-aa43f82553171f18.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libdraw_state-419af1c9a7dd52da.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libbitflags-1b9f7576da940a38.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/liblog-342ffb7444a9471d.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libchrono-086951ef1dea2712.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum-98981edb917831dc.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_iter-5766581f7597a504.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_complex-c5081e842367373a.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_rational-ee2647e9984d6d27.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_bigint-d5ef62bdcef8e570.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_integer-8f7844108d7e0eab.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/librand-c724acb3942597d1.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libnum_traits-14a2d70fdb554c2a.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_gl-565a5966718c12a7.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/librustc_serialize-3bc953984ed46e7f.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/liblibc-38919d24e617a235.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libspecs-5ca5e24705e76ffe.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libpulse-15b434d908f5854b.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libtime-71756e48b8b5b73b.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libtuple_utils-c0b4d4d00df3deee.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libatom-3108378d22af7662.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libthreadpool-0bb5a6ba1d0b4f62.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libkernel32-757937e2863677bb.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libwinapi-42bc588a308ea664.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libfnv-bbd2700436e7e891.rlib\" \"/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libmopa-2d8ed479fbf9b863.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libstd-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcollections-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc_system-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liblibc-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librand-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_unicode-cb705824.rlib\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcore-cb705824.rlib\" \"-l\" \"opengl32\" \"-l\" \"dwmapi\" \"-l\" \"user32\" \"-l\" \"shell32\" \"-l\" \"gdi32\" \"-l\" \"advapi32\" \"-l\" \"kernel32\" \"-l\" \"gcc_eh\" \"-l\" \"ws2_32\" \"-l\" \"userenv\" \"-l\" \"shell32\" \"-l\" \"advapi32\" \"-l\" \"compiler-rt\" \"-lmingwex\" \"-lmingw32\" \"-lgcc\" \"-lmsvcrt\" \"-luser32\" \"-lkernel32\" \"/home/marvin/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsend.o\"\r\nnote: /usr/bin/ld: unrecognized option '--enable-long-section-names'\r\n/usr/bin/ld: use the --help option for usage information\r\ncollect2: error: ld returned 1 exit status\r\n\r\nerror: aborting due to previous error\r\nerror: Could not compile `fun1`.\r\n\r\nCaused by:\r\n  Process didn't exit successfully: `rustc src/main.rs --crate-name fun1 --crate-type bin -C opt-level=3 --out-dir /home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release --emit=dep-info,link --target x86_64-pc-windows-gnu -L dependency=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release -L dependency=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps --extern chrono=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libchrono-086951ef1dea2712.rlib --extern specs=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libspecs-5ca5e24705e76ffe.rlib --extern gfx_device_gl=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_device_gl-6f378e292a444005.rlib --extern glutin=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libglutin-fe8847f8e5c48a8d.rlib --extern cgmath=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libcgmath-76ab5db7eccfb351.rlib --extern gfx_window_glutin=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx_window_glutin-d2f847aed3bc91f3.rlib --extern gfx=/home/marvin/dev/rust/graphics_fun_2016-05-05/fun1/target/x86_64-pc-windows-gnu/release/deps/libgfx-dc2b98d25789486e.rlib -L native=/home/marvin/.cargo/registry/src/github.com-88ac128001ac3a9a/dwmapi-sys-0.1.0/x86_64` (exit code: 101)\r\n\r\n```\r\n\r\nCompiler version:\r\n\r\n```\r\nrustc 1.10.0-nightly (8da2bcac5 2016-04-28)\r\nbinary: rustc\r\ncommit-hash: 8da2bcac5db1e091b90cceb19d0496f0f7501c88\r\ncommit-date: 2016-04-28\r\nhost: x86_64-unknown-linux-gnu\r\nrelease: 1.10.0-nightly\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/217510244","html_url":"https://github.com/rust-lang/rust/issues/33465#issuecomment-217510244","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33465","id":217510244,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T17:41:03Z","updated_at":"2016-05-06T17:41:03Z","body":"Looks like the wrong linker is being used? The compiler is using \"gcc\""}}