Author Topic: Latest msys2/mingw64's gdb failed to start under Windows 7 and its solution  (Read 10516 times)

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5931
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I just update my msys2 packages, and I soon found gdb.exe can't start by missing a dll named: api-ms-win-core-path-l1-1-0.dll

I have found a solution, and it works fine, see:

msys2: msys2/mingw's gdb.exe failed to start under Windows 7 for missing api-ms-win-core-path-l1-1-0.dll and the solution Issue #4119 msys2/MSYS2-packages

and

api-ms-win-core-path-HACK: Thanks for supplying this dll, which make msys2/mingw64 gdb works under Windows 7 64bit

I hope this can help you.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
Hello, how can you compile gdb without python? And why does gdb need a python? It was because of the python version that support for Windows 7 was thrown out.
  • python 3.9 and higher do not support Windows 7
  • python 3.8 and lower support Windows 7
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?
« Last Edit: October 26, 2023, 02:42:51 pm by omlk »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?

Likely because the added complexity was not worth the effort. It was easier to drop support of Windows 7.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?

Likely because the added complexity was not worth the effort. It was easier to drop support of Windows 7.

Tim S.
That is, msys2 maintainers are not able to compile gdb without python? And they could also offer gdb with python <=3.8 for Windows 7, gdb with python >=3.9 for Windows 10,11 and higher, gdb with python <=3.4 for Windows XP
https://www.python.org/downloads/windows/
« Last Edit: October 26, 2023, 05:13:48 pm by omlk »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?

Likely because the added complexity was not worth the effort. It was easier to drop support of Windows 7.

Tim S.
That is, msys2 maintainers are not able to compile gdb without python? And they could also offer gdb with python <=3.8 for Windows 7, gdb with python >=3.9 for Windows 10,11 and higher, gdb with python <=3.4 for Windows XP

Are you incapable of compiling the packages? Are you offering to pay money to the MSys2 team?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?

Likely because the added complexity was not worth the effort. It was easier to drop support of Windows 7.

Tim S.
That is, msys2 maintainers are not able to compile gdb without python? And they could also offer gdb with python <=3.8 for Windows 7, gdb with python >=3.9 for Windows 10,11 and higher, gdb with python <=3.4 for Windows XP

Are you incapable of compiling the packages? Are you offering to pay money to the MSys2 team?

Tim S.
I suggest you stop donating to msys2 altogether because they are promoting their vision with donor money, not what the money was intended for.
« Last Edit: October 26, 2023, 05:12:18 pm by omlk »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
Why didn't the maintainers of msys2 make it possible to choose a gdb with python and without python?

Likely because the added complexity was not worth the effort. It was easier to drop support of Windows 7.

Tim S.
That is, msys2 maintainers are not able to compile gdb without python? And they could also offer gdb with python <=3.8 for Windows 7, gdb with python >=3.9 for Windows 10,11 and higher, gdb with python <=3.4 for Windows XP

Are you incapable of compiling the packages? Are you offering to pay money to the MSys2 team?

Tim S.
I suggest you stop donating to msys2 altogether because they are pushing their politics with donor money, not what the money was intended for.

I suggest we both stop posting off topic posts and I suggest you read this website rules if you have not already read them!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5931
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I don't want to blame msys2 developers to drop supporting win7, because they supply us so many useful library packages and compilers.

About the gdb,  I use gdb Python pretty printer when debugging.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline nenin

  • Almost regular
  • **
  • Posts: 227
I don't want to blame msys2 developers to drop supporting win7, because they supply us so many useful library packages and compilers.

About the gdb,  I use gdb Python pretty printer when debugging.
Do you have ucrt installed? I`m asking because such named dlls are present in ucrt, so may be there are less "hack-like" solution.

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
I don't want to blame msys2 developers to drop supporting win7, because they supply us so many useful library packages and compilers.

About the gdb,  I use gdb Python pretty printer when debugging.
Do you have ucrt installed? I`m asking because such named dlls are present in ucrt, so may be there are less "hack-like" solution.
Such named dlls are present in (Windows 8.0) ...\System32\*.dll , but "hack-like" solution maybe better :)

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5931
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I don't want to blame msys2 developers to drop supporting win7, because they supply us so many useful library packages and compilers.

About the gdb,  I use gdb Python pretty printer when debugging.
Do you have ucrt installed? I`m asking because such named dlls are present in ucrt, so may be there are less "hack-like" solution.

I don't use ucrt library, I think it doesn't work under Windows 7.  :)

Look at this: MSYS2: What's the difference between UCRT 64 and x64?

Am I correct?
« Last Edit: October 27, 2023, 01:38:52 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
I don't want to blame msys2 developers to drop supporting win7, because they supply us so many useful library packages and compilers.

About the gdb,  I use gdb Python pretty printer when debugging.
That is, in order to conveniently output data specifically for "c++" ("c" does not apply), you need python, is it impossible to write in "c++" a python script replacement for data output in codeblocks? Of course, "c++" can't help but create problems on the same place :( Drags python, which in turn destroys support for XP, 7 and later 8, 10, etc. The best thing to do is to compile gdb without compiled python support (let python free-swim) and write programs in "c" and you will have no problems with supporting different versions of Windows starting with XP  ;)
We don't need crutches and dirty hacks.
« Last Edit: October 27, 2023, 02:25:36 pm by omlk »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline omlk

  • Multiple posting newcomer
  • *
  • Posts: 110
I don't use ucrt library, I think it doesn't work under Windows 7.  :)

Look at this: MSYS2: What's the difference between UCRT 64 and x64?

Am I correct?

IIRC, there is an UCRT download for Windows 7.
https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-322bf30f-4735-bb94-3949-49f5c49f4732

Tim S.
Have you checked if your option works? Did you just read the title of the post and immediately express your opinion on the forum?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7607
    • My Best Post
I don't use ucrt library, I think it doesn't work under Windows 7.  :)

Look at this: MSYS2: What's the difference between UCRT 64 and x64?

Am I correct?

IIRC, there is an UCRT download for Windows 7.
https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-322bf30f-4735-bb94-3949-49f5c49f4732

Tim S.
Have you checked if your option works? Did you just read the title of the post and immediately express your opinion on the forum?

Have you read the rules?
Did you read the post I replied to?

If you did not the butt out; I am about to ask that you be banned!!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org