Skip to content

can't build ole32-sys with nightly-gnu #41589

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Eh2406 opened this issue Apr 27, 2017 · 3 comments
Closed

can't build ole32-sys with nightly-gnu #41589

Eh2406 opened this issue Apr 27, 2017 · 3 comments
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@Eh2406
Copy link
Contributor

Eh2406 commented Apr 27, 2017

HI,

Setup:
Cargo.toml

[package]
name = "test"
version = "0.1.0"
authors = ["Eh2406 <YeomanYaacov@gmail.com>"]

[dependencies]
ole32-sys = "0.2.0"

src/main.rs

extern crate ole32;
fn main() {
    println!("");
}

Expected output:
No errors, as there are no errors when I run cargo +nightly-msvc build

Actual output:

C:\test>cargo +nightly-gnu build
   Compiling winapi v0.2.8
   Compiling winapi-build v0.1.1
   Compiling ole32-sys v0.2.0
error: linking with `gcc` failed: exit code: 3221225781
  |
  = note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\crt2.o" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "C:\\test\\target\\debug\\build\\ole32-sys-6a9f3e9c54364a93\\build_script_build-6a9f3e9c54364a93.0.o" "-o" "C:\\test\\target\\debug\\build\\ole32-sys-6a9f3e9c54364a93\\build_script_build-6a9f3e9c54364a93.exe" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "C:\\test\\target\\debug\\deps" "-L" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\test\\target\\debug\\deps\\libbuild-24835e0f0d5a822a.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-e2451a256f66ac19.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librand-c279a51d66700350.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcollections-d7bf31a4ca1ea637.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_unicode-d367c3ba0db49600.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-2d4bf02140c11dcb.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-add7a84d7e82d084.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-84688accbc86d6b7.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-fe2e68b21f0bdd7a.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc_system-7fc0381594c93f56.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-ea9d77e7c23fe65c.rlib" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-91b619d34dd1f5aa.rlib" "-Wl,-Bdynamic" "-l" "advapi32" "-l" "ws2_32" "-l" "userenv" "-l" "shell32" "-Wl,-Bstatic" "-l" "gcc_eh" "-l" "pthread" "-Wl,-Bdynamic" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\Users\\finkelman.SEMCOGDOM\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note:

error: aborting due to previous error

error: Could not compile `ole32-sys`.
Build failed, waiting for other jobs to finish...
error: build failed

1.18.0-nightly (0369832 2017-04-26), on windows.

Note: that it works with:

  • cargo +nightly-2017-04-20 build
  • cargo +nightly-2017-04-24 build
  • cargo +nightly-2017-04-25 build

does not work with:

  • cargo +nightly-2017-04-26 build
@TimNN
Copy link
Contributor

TimNN commented Apr 27, 2017

I gonna take a wild guess and say that this is likely related to the LLVM 4.0 upgrade (#40123) or more specifically the switch from MinGW-with-win32-threads to MinGW-with-posix-threads.

@Eh2406: Could you tell us the the MinGW / gcc --version you are using?

(I'm also gonna assume this works on stable)

@TimNN TimNN added O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-tools labels Apr 27, 2017
@ollie27
Copy link
Member

ollie27 commented Apr 27, 2017

Looks like this is the same as #31840 (comment) and so should be fixed by #41571.

@Eh2406
Copy link
Contributor Author

Eh2406 commented Apr 29, 2017

Works with the new nightlies, so guess you got it perfect! Thanks!

@Eh2406 Eh2406 closed this as completed Apr 29, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

3 participants