Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Windows] libpthread missing exports, so I can not link #42194

Closed
ctaggart opened this issue May 24, 2017 · 4 comments
Closed

[Windows] libpthread missing exports, so I can not link #42194

ctaggart opened this issue May 24, 2017 · 4 comments
Labels
O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows

Comments

@ctaggart
Copy link
Contributor

ctaggart commented May 24, 2017

I posted How do I use a different libstdc++.a with Rust?, but after some more debugging, it looks like libpthread doesn't have any exports. Why doesn't it?

dumpbin /exports "C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libpthread.a"

I was expecting it to have exports like other libraries in the directory do:

dumpbin /exports "C:\Users\camer\.rustup\toolchains\nightly-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib\libcrypt32.a"

I was expecting it to have the same exports as other libpthread libraries:

dumpbin /exports "C:\Octave\Octave-4.2.1\lib\libpthread.dll.a"

Looking around at the issues here, it looks like it may be related to:

@steveklabnik steveklabnik added O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows labels May 24, 2017
@alexcrichton
Copy link
Member

cc @vadimcn

@vadimcn
Copy link
Contributor

vadimcn commented May 25, 2017

@ctaggart: that one is a static lib, did you try dumpbin /symbols ...?

@ctaggart
Copy link
Contributor Author

@vadimcn, that would explain it. dumpbin /symbols does show the functions that the linker complains about. I'm still not sure why I can't link, but I'll now take a closer look at static vs dynamic dependencies with the "-Wl,-Bstatic" and "-Wl,-Bdynamic" options being passed in to see if I can figure out these errors.

@vadimcn
Copy link
Contributor

vadimcn commented May 25, 2017

I'd try setting RUSTFLAGS=-Clink-arg=-v to see what switches gcc gives to ld.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows O-windows-gnu Toolchain: GNU, Operating system: Windows
Projects
None yet
Development

No branches or pull requests

4 participants