winlibs_mingw
winlibs_mingw copied to clipboard
the selected build of GDB does not support Python scripting. it cannot be used in qt creator.
the selected build of GDB does not support Python scripting. it cannot be used in qt creator.
in clion:
Error during pretty printers setup: Undefined info command: "pretty-printer". Try "help info".
I see now that GDB was built without python (and also without tcl and tk). I will try to build with them. Right now I'm compiling the new GCC 9.3, so I will see if I can get this sorted for GDB for the next winlibs personal build release.
I just tried with GDB included built with --with-python.
It now also contains a file pretty_printers.py
, but I'm not sure if the path in the package should be:
mingw64/share/gdb/share/gdb/python/gdb/command/pretty_printers.py
or:
mingw64/share/gdb/python/gdb/command/pretty_printers.py
Do you know this?
Also, if I make a release with this gdb will be broken for the users that download it as it will fail to start because the Python DLL file is missing, and I don't intend to distribute an entire Python in the package.
The second one mingw64/share/gdb/python/gdb/command/pretty_printers.py
should be the right path.
Also, if I make a release with this gdb will be broken for the users that download it as it will fail to start because the Python DLL file is missing, and I don't intend to distribute an entire Python in the package.
You can use the Embedded Python and copy only the python38.dll
and python38.zip
from the zip file to /bin
.
This is not that big ~6 MB.
I did it manually for my own GDB build and it worked. I do not know if a patch was needed, as i have no access to my PC...
The concept behind winlibs is that every dependancy is built from source. That way everything is built with the same compiler and linked with the same standard C/C++ libraries. So far I haven't build Python from source yet, but maybe I should give it another try.
As you mentioned the Python DLL is missing and must be copied by user:
After adding python.dll etc. GDB starts, but it misses the files, looks like path d:\r\winlibs64-9.3.0-7.0.0\inst_gdb-9.1\share\gdb\share\gdb/python
is hardcoded?
d:\git\s7p\work2\s7p.tools\win64_gcc_mingw64_9.3.0\bin>gdb
Python Exception <class 'ModuleNotFoundError'> No module named 'gdb':
d:\git\s7p\work2\s7p.tools\win64_gcc_mingw64_9.3.0\bin\gdb.exe: warning:
Could not load the Python gdb module from `d:\r\winlibs64-9.3.0-7.0.0\inst_gdb-9.1\share\gdb\share\gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
It also be good if it can be compiled with Python 3.7 (python3.7.dll) or 3.8 (python3.8.dll)...
I haven't tested this at all. It is very well possible that compiling this in uses absolute paths. For now I will not put any more effort in this as Python or CPython won't build yet in my environment, and the main focus of winlibs is compiled languages like C and C++ and the goal is to build every component in the same environment.
Once I get CPython to compile I may reavaluate. Currently I got 3.8.2 to compile, but linking fails with some undefined references.
Thank You for the effort! If you have a new version i would be happy to test it :)
Any news about python support?
I wonder why they require python support in QtCreator in the first place.
Is it possible to help with this issue? I can find no build or packaging scripts so I don't know how to experiment with solving this issue.
Is it possible to help with this issue? I can find no build or packaging scripts so I don't know how to experiment with solving this issue.
https://github.com/niXman/mingw-builds This repo provides build scripts with Python support. I've tried these scripts, and built MinGW with GCC 10.2.0 successfully.
@brechtsanders I'm currently in the process of adding Python support to the llvm-mingw toolchain. If you wanna add support for Python in your toolchain, check out the MSYS2 patchset for python3. It should allow you to build Python from source. Just apply all the patches, run autoreconf -fi
and configure
like usual. Have a look at the PKGBUILD file in the patchset for the configure options.
Any update on this issue? I would love to move from MinGW builds to your package, but missing Python support is a blocker.
Still unable to build python/cpython in my environment :-(
I need to find time to go through the patches in the links you sent...
You can have a look at our Python build script here
In short, we basically build a native cpython
, then we build libffi
and cpython
for mingw-w64, using the patchset from MSYS2. After that, we removed a few stuff to reduce the size of the package (namely the test
module and the bytecode cache).
As we don't build gdb
, I don't know what flags are required for Python support in gdb, but I think you can figure it out.
try to use this version of minGW https://nim-lang.org/install_windows.html
@hamidb80 What do you mean exactly? https://winlibs.com/ provides a standalone build of the latest MinGW-w64 version (currently 9.0.0). The download on the link you mention seems to be an older winlibs release (MinGW-w64 8.0.2).
@hamidb80 What do you mean exactly? https://winlibs.com/ provides a standalone build of the latest MinGW-w64 version (currently 9.0.0). The download on the link you mention seems to be an older winlibs release (MinGW-w64 8.0.2).
it supports GDB scripting [I think that's what you wanted, right? ]
it has pretty printing, ... - it meets my needs, maybe it fit for you also
@hamidb80 No, this question is specifically about Python support in GDB. Since the https://nim-lang.org/install_windows.html is an earlier download from https://winlibs.com/ that was renamed, it doesn't have this either.
@hamidb80 No, this question is specifically about Python support in GDB. Since the https://nim-lang.org/install_windows.html is an earlier download from https://winlibs.com/ that was renamed, it doesn't have this either.
They have a debugger that is based on gdb scripting with python
Guyutongxue made a perfect bundle with a complete mingw-w64 toolchain. It works perfectly with Qt Creator.
Any news on python support? LLVM 12.0.1 has been released.
Using your toolchain, I compiled clang with default targetting libc++ instead of libstdc++, using Win32 threads instead of pthreads and libc++abi instead of libgcc_s (the compilation process contains a flaw, libc++abi prefers pthreads, it needs to be set off explicitly).
With Guyutongxue's bundle I made clangless gcc and gccless clang (clang defaults to compiler-rt).
Any news on python support?
I have been trying to build the latest Python earlier this week, and while compiling works there are still some missing symbols when linking. I will only include Python support if I get Python to build with the same build tools.
Will python scripting in gdb & lldb be implemented before New Year's day?
No. Python still won't build due the winlibs way. But from time to time I try to get it to build (last time was last week when Python 3.11.0a1 came out).