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

libwinpthread-1.dll missing from release #82

Closed
wodim opened this issue Dec 20, 2022 · 9 comments
Closed

libwinpthread-1.dll missing from release #82

wodim opened this issue Dec 20, 2022 · 9 comments
Labels

Comments

@wodim
Copy link

wodim commented Dec 20, 2022

I downloaded drmingw-0.9.8-win64.7z and libwinpthread-1.dll was missing so it wouldn't run. I downloaded a copy from here but you might want to include it in the release archive.

@jrfonseca jrfonseca added the bug label Dec 20, 2022
@jrfonseca
Copy link
Owner

The libwinpthread-1.dll dependency is unintentional. DrMingw should either not depend on it (ie, use Win32 threads as opposed to Posix threads) or statically link libwinpthread-1.dll.

It happened between 0.9.7 and 0.9.8, likely due to the new MinGW compiler toolchain from d9a82b4.

I'll need to figure a solution, and add logic to prevent this from silently happening again.

@jrfonseca
Copy link
Owner

Going through git history, I'm starting to recollect: 3450a15 should have ensured winpthreads are statically linked...

@alvinhochun
Copy link
Contributor

Also worth noting that, when compiling with the llvm-mingw toolchain, it uses libc++ instead of libstdc++. The winpthread library is available in the toolchain, but libc++ does not actually use winpthreads.

@alvinhochun
Copy link
Contributor

If you would like to to stick to GCC, mingw-builds still provides toolchains without posix threads: https://github.com/niXman/mingw-builds-binaries/releases

@jrfonseca
Copy link
Owner

Thanks @alvinhochun

I'm building with LLVM/Clang for Arm, but still building with GCC for x86.

The odd thing here is that when I build locally libwinpthread-1.dll is statically linked. I need to dig further..

@jrfonseca
Copy link
Owner

After a few experiments, I've narrowed down the issue. It only happens on Release builds (only used for producing the binaries), and never on the Debug builds (used for continuous testing and integration.) Why, I haven't yet figured out. I need to reproduce locally first.

@jrfonseca
Copy link
Owner

@yuansunliang1988
Copy link

已修复https://github.com/jrfonseca/drmingw/releases/tag/0.9.9

Can you give me the complete process of how to build and compile a drmingw program?
I used mingw to compile it and found that it reports errors:

CMake Error at CMakeLists.txt:66 (message):
Win32 threads required.

Including what compiler should be used, for now I'm porting it inside my own project first, because the project with mingw64 can't generate pdb symbol files. I think it would also be helpful to analyze the problem if I can print out the stack of the crash at that time

@jrfonseca
Copy link
Owner

Can you give me the complete process of how to build and compile a drmingw program?

If you want to build DrMingw yourself, you can follow the steps in the GitHub Action:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants