-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
how to build MinGW? #238
Comments
Hello mate ! I have not tested yet the latest crashpad merged version from the Sentry team (I'm the main contributor for the MinGW compatibility btw), so I am not surprised you encountered some issues. Let me investigate first so I may fix some unexpected incompatibilities. By the way, you need to use LLVM to compile sentry-native. Ninja is also kind of a must have for LLVM, so get it too from MSYS2. |
In the meantime, have a look at https://github.com/Amphaal/rpgrpz/blob/master/cmake/toolchains/msys.cmake. This is the toolchain file I use with CMake to build sentry-native, it might help you to setup the build. |
Alright, I managed to build it locally once the missing header issue is adressed getsentry/crashpad#13. The rest might be related to a CMake missconfiguration on your side. I will propose a pull request soon to help you setup this the right way ;) |
Thanks! I found my issue - i compile mingw32, it is broken build.
std::unique_ptr place in header file
proof: https://en.cppreference.com/w/cpp/memory/unique_ptr maybe fix mingw32 build too? ;) P.S. and i build gcc, and CMake Generator MinGW Makefiles |
Yeah, here is the awaiting patch : getsentry/crashpad#13.
Is 32bits a requirement for you ? I could take a look tomorrow.
You absolutely need to use Clang because only Clang is able to generate .pdb files which are required by sentry-native/Crashpad to create Sentry bug reports ! |
Good! Thanks!
Due to some libraries like astralax in old projects, I have to compile in mingw32.
thank you for saving a couple of days of my life ;) |
Alright, I have a bit of time ahead this afternoon, I'll give it a try ;) |
Well as expected, the 32bits headers definitions expected by sentry-native are [missing / outdated / plain wrong] on mingw-w64.
We could hack the assert declarations that find these errors, but IMO we should not. I think your best bet here is to wait from the sentry-native team to offer an alternative to Crashpad for Windows 😥 |
Is there any information or a roadmap? |
Not really. We discussed it briefly, but crashpad is the best option on windows. |
Thank you, and I’ll go pray for crashpad to support mingw clang x86 ^^ |
No, you can obtain syms from any dwarf debug info using tools from google breakpad. |
I tried to poke at the crashpad team about mingw compatibility, but without success yet... https://groups.google.com/a/chromium.org/forum/#!mydiscussions/crashpad-dev/Y2tt6dDNIBI any ideas on how to reach them ? |
I had no idea about that ! You should fix my modifications, I'd be interested to see how you make this work :) |
Use cv2pdb.exe to convert dwarf debug info from mingw/old clang to pdb, then use dump_syms.exe with this pdb to convert it to sym. Then upload all this to sentry as usual with sentry-cli. |
Ok, it just requires to compile cv2pdb as tool utility and then use it as a post build command. Seems doable. |
|
Alright, I checked |
@irov I've seen that the mingw-w64 headers have been updated few days ago, to a testing 8.0 version https://packages.msys2.org/package/mingw-w64-i686-headers-git?repo=mingw32. Still does not fix your requirements tho... |
@Amphaal Oh, can you tell me how to get 'pdb' with the help of the clang and mingw64 to send to the server? |
There are the 2 mandatory options you must set on your executable target when using Clang :
Theses ensure that Let me know if you succeded ;) |
Thanks! I did it! It's okey if i get on Release mode only top function name, without callstack? |
Yeah, i've had misformated reports before, but with the entire callstack and threads. Maybe try to set the CMake options to the subjacents libs your main executable may use to get their callstack too ? |
Oh, I tried several times and it worked! Thanks! P.S. I missclick and closed issue, sorry ^^ |
There have been some great contributions to MinGW support, but after all this is not something that we want to actively support. |
@Amphaal Have this been tested recently? I know that this is not actively supported but since the instructions have been added to the readme I thought I'd ask here. Following the instructions on Readme I get this:
Full log here: https://gist.github.com/zumoshi/6a0dee361a1293820f7fae102b3c85fa My goal is to add native-sdk to a rust program as per this article. But most of my native dependencies are from mingw64 and would be difficult to get them to work with msvc. Thanks for your time. |
besides this problem I have a number of problems for which I wrote a patch |
Hello guys, I haven't touched sentry-native for a while now, sorry for that... https://github.com/getsentry/crashpad might need a little tweek to make things work again, mostly missing header defines. @irov, can you make a pull request to push your patch to master ? |
Yes, tomorrow |
|
i try to compile MinGW and get many errors.
I tried to fix them, but to no avail.
-crashpad
/util/win/exception_handler_server.cc - miss include
/util/process/process_memory.h - double typedef ssize_t
/client/crash_report_database_win.cc - error with _wstat64
and other
i bassed on msys2.
Tell me how to do it and is it possible now?
Thanks!
The text was updated successfully, but these errors were encountered: