Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ray Donnelly
Hi John,

Not sure you'll be interested but I build my own version of Python
into some Android NDKs, and this Python is cross compilable/compiled.
From a Linux box, 12 variants can be built (Windows, Mac, Linux) *
(x86, x86_64) * (2.7.3, 3.3.0b1). Native shouldn't be much of a
stretch too but it's not something I've tried. Here are the some 2.7.3
Windows builds I made.

http://mingw-and-ndk.googlecode.com/files/python-2.7.3-windows-x86.7z
http://mingw-and-ndk.googlecode.com/files/python-2.7.3-windows-x86_64.7z

As these were built specifically for GDB, part of my changes are to
output a shell script (bin/python-config.sh) the path to which can be
passed in as --with-python= ... with one caveat, you should modify in
that script the bit that says:
prefix=/tmp/cr-build/install/windows-x86_64/python-2.7.3 to mirror
where you extracted it to.

The sources for this project are currently on my Dropbox (as I'm not
100% ready to release - e.g. I'd want to update from 3.3.0b1 to a
non-beta and also make tcl/tk work for Idle first):

https://dl.dropbox.com/u/17108768/crucifixion-freedom.7z

Cheers,

Ray.

On Sat, Sep 15, 2012 at 4:32 AM, John E. / TDM tdra...@tdragon.net wrote:
 Hi all,

 Having finally gotten what may be a decent build of GCC 4.7.1, I'm
 moving on to GDB and looking at the possibility of bringing in Python
 support this time. However, I'm having trouble finding the appropriate
 headers and libraries to point GDB at for the build (x86_64-w64-mingw32
 host, x86_64-w64-mingw32 target).

 The best thing I've found so far is a file named
 python-x86_64-w64-mingw32.zip within rubenvb's 4.7.1 source tarball.
 However, I'm extremely hesitant to use it because it doesn't contain any
 sources, or build instructions, for the libraries it contains. Oh, and
 if I have to download MSVC and build Python myself, forget it.

 Ruben, do you have any clarifying information on your source? Or does
 anyone else have notes on how to create a 64-bit Python-enabled GDB?

 Thanks in advance,
 John E. / TDM

 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ruben Van Boxem
2012/9/15 John E. / TDM tdra...@tdragon.net

 Hi all,

 Having finally gotten what may be a decent build of GCC 4.7.1, I'm
 moving on to GDB and looking at the possibility of bringing in Python
 support this time. However, I'm having trouble finding the appropriate
 headers and libraries to point GDB at for the build (x86_64-w64-mingw32
 host, x86_64-w64-mingw32 target).


The best thing I've found so far is a file named
 python-x86_64-w64-mingw32.zip within rubenvb's 4.7.1 source tarball.
 However, I'm extremely hesitant to use it because it doesn't contain any
 sources, or build instructions, for the libraries it contains. Oh, and
 if I have to download MSVC and build Python myself, forget it.

 Ruben, do you have any clarifying information on your source? Or does
 anyone else have notes on how to create a 64-bit Python-enabled GDB?


Hi,

These files are just the stuff needed by Python/GDB to work and build.
Check my scripts for python and gdb here:
https://github.com/rubenvb/MinGW-w64-build-scripts/tree/master/scripts

These files are from the official Python 2.7.3 installation exetables. They
are the only official python builds available. You cannot build vanilla
Python 2.7 with MinGW. I opted for the official release to not conflict
with any existing installation users might have installed (as the python
DLL will be in PATH)

The 32-bit files are all directly extracted from the installer exe, the
64-bit package was missing an import libpython2.7.dll.a, which I generated
using the usual steps. I think I also renamed the libraries so the gdb
build can find it.

If you need any more information, feel free to ask.

Ruben



 Thanks in advance,
 John E. / TDM


 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ray Donnelly
I explicitly set my path at the top of main in my gdb so that it finds
my Python every time. It's never failed. I also renamed python27.dll
to python2.7.dll to make sure that dll hell doesn't bite me.

In ~1.5 years I've had 0 complaints of problems with Python.

Vanilla is boring ;-)

Cheers,

Ray.

On Sat, Sep 15, 2012 at 3:41 PM, Ruben Van Boxem
vanboxem.ru...@gmail.com wrote:
 2012/9/15 John E. / TDM tdra...@tdragon.net

 Hi all,

 Having finally gotten what may be a decent build of GCC 4.7.1, I'm
 moving on to GDB and looking at the possibility of bringing in Python
 support this time. However, I'm having trouble finding the appropriate
 headers and libraries to point GDB at for the build (x86_64-w64-mingw32
 host, x86_64-w64-mingw32 target).


 The best thing I've found so far is a file named
 python-x86_64-w64-mingw32.zip within rubenvb's 4.7.1 source tarball.
 However, I'm extremely hesitant to use it because it doesn't contain any
 sources, or build instructions, for the libraries it contains. Oh, and
 if I have to download MSVC and build Python myself, forget it.

 Ruben, do you have any clarifying information on your source? Or does
 anyone else have notes on how to create a 64-bit Python-enabled GDB?


 Hi,

 These files are just the stuff needed by Python/GDB to work and build. Check
 my scripts for python and gdb here:
 https://github.com/rubenvb/MinGW-w64-build-scripts/tree/master/scripts

 These files are from the official Python 2.7.3 installation exetables. They
 are the only official python builds available. You cannot build vanilla
 Python 2.7 with MinGW. I opted for the official release to not conflict with
 any existing installation users might have installed (as the python DLL will
 be in PATH)

 The 32-bit files are all directly extracted from the installer exe, the
 64-bit package was missing an import libpython2.7.dll.a, which I generated
 using the usual steps. I think I also renamed the libraries so the gdb build
 can find it.

 If you need any more information, feel free to ask.

 Ruben



 Thanks in advance,
 John E. / TDM


 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread niXman
2012/9/15 Ray Donnelly:
 I explicitly set my path at the top of main in my gdb so that it finds
 my Python every time. It's never failed. I also renamed python27.dll
 to python2.7.dll to make sure that dll hell doesn't bite me.

Hi,

Where can I find this patch? ;)
Thank tou!


-- 
Regards,
niXman
___
Dual-target(32  64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ray Donnelly
In the Google NDK git repo:

https://android-review.googlesource.com/#/c/39651/

build/tools/toolchain-patches/gdb/0007-find-python.patch

Now that I re-read it, it's all about setting PYTHONHOME env var; the
dll is of course found by being in the same folder as gdb.exe (and
differently named from CPython's one).

For determining PYTHONHOME it expects a certain relative layout but
also does some searching (I wanted to be a bit defensive in case the
install prefix got modified).

Did you try to build Python yet using
https://dl.dropbox.com/u/17108768/crucifixion-freedom.7z ?

Cheers,

Ray.

On Sat, Sep 15, 2012 at 4:29 PM, niXman i.nix...@gmail.com wrote:
 2012/9/15 Ray Donnelly:
 I explicitly set my path at the top of main in my gdb so that it finds
 my Python every time. It's never failed. I also renamed python27.dll
 to python2.7.dll to make sure that dll hell doesn't bite me.

 Hi,

 Where can I find this patch? ;)
 Thank tou!


 --
 Regards,
 niXman
 ___
 Dual-target(32  64 bit) MinGW compilers for 32 and 64 bit Windows:
 http://sourceforge.net/projects/mingwbuilds/

 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread xunxun
于 2012/9/15 23:44, Ray Donnelly 写道:
 In the Google NDK git repo:

 https://android-review.googlesource.com/#/c/39651/

 build/tools/toolchain-patches/gdb/0007-find-python.patch

 Now that I re-read it, it's all about setting PYTHONHOME env var; the
 dll is of course found by being in the same folder as gdb.exe (and
 differently named from CPython's one).

 For determining PYTHONHOME it expects a certain relative layout but
 also does some searching (I wanted to be a bit defensive in case the
 install prefix got modified).

 Did you try to build Python yet using
 https://dl.dropbox.com/u/17108768/crucifixion-freedom.7z ?

 Cheers,

 Ray.
I use another patch to make python built by mingw two years ago : 
http://bugs.python.org/file19587/python-2.7-20101112-MINGW.patch

But why not to use official python dll? There is no problem.

 On Sat, Sep 15, 2012 at 4:29 PM, niXman i.nix...@gmail.com wrote:
 2012/9/15 Ray Donnelly:
 I explicitly set my path at the top of main in my gdb so that it finds
 my Python every time. It's never failed. I also renamed python27.dll
 to python2.7.dll to make sure that dll hell doesn't bite me.
 Hi,

 Where can I find this patch? ;)
 Thank tou!


 --
 Regards,
 niXman



-- 
Best Regards,
xunxun

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread niXman
2012/9/15 Ray Donnelly:

 Did you try to build Python yet using
 https://dl.dropbox.com/u/17108768/crucifixion-freedom.7z ?

No.
I get an error 404.


-- 
Regards,
niXman
___
Dual-target(32  64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ray Donnelly
Weird. Dropbox playing up.

I uploaded it to my google code page instead:

http://mingw-and-ndk.googlecode.com/files/crucifixion-freedom.7z

Cheers,

Ray.

On Sat, Sep 15, 2012 at 5:01 PM, niXman i.nix...@gmail.com wrote:
 2012/9/15 Ray Donnelly:

 Did you try to build Python yet using
 https://dl.dropbox.com/u/17108768/crucifixion-freedom.7z ?

 No.
 I get an error 404.


 --
 Regards,
 niXman
 ___
 Dual-target(32  64 bit) MinGW compilers for 32 and 64 bit Windows:
 http://sourceforge.net/projects/mingwbuilds/

 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread John E. / TDM
On 9/15/2012 8:41 AM, Ruben Van Boxem wrote:
 These files are from the official Python 2.7.3 installation exetables. 
 They are the only official python builds available. You cannot build 
 vanilla Python 2.7 with MinGW. I opted for the official release to not 
 conflict with any existing installation users might have installed (as 
 the python DLL will be in PATH)

 The 32-bit files are all directly extracted from the installer exe, 
 the 64-bit package was missing an import libpython2.7.dll.a, which I 
 generated using the usual steps. I think I also renamed the libraries 
 so the gdb build can find it.

Thanks for the info. Experience has taught me to be skeptical toward any 
binary distribution that doesn't include the sources themselves or at 
least a link to them -- and for me, even licensing concerns are 
secondary to ensuring a verifiable and repeatable process.

-John E. / TDM

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread John E. / TDM
On 9/15/2012 1:30 AM, Ray Donnelly wrote:
 Hi John,

 Not sure you'll be interested but I build my own version of Python
 into some Android NDKs, and this Python is cross compilable/compiled.
 From a Linux box, 12 variants can be built (Windows, Mac, Linux) *
 (x86, x86_64) * (2.7.3, 3.3.0b1). Native shouldn't be much of a
 stretch too but it's not something I've tried. Here are the some 2.7.3
 Windows builds I made.

Thanks for the input. Ultimately it seems to me that Ruben's method will 
prove the most stable, as it compiles directly against the Python 
project's own released binaries. Can you tell me what advantage(s) your 
version would have for Windows native users?

-John E. / TDM

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-15 Thread Ray Donnelly
 Can you tell me what advantage(s) your version would have for Windows native 
 users?

I'm not sure Python integration into GDB is something that users are
going to really notice. Mostly they're going to see their QStrings
displayed nicely and the same for their STL containers and not think
twice about how it's happening!

Well it's like you said, binary vs source and also the usual msvc dll
debuggability issues.

My method compiles the Python project's sources (with a few patches,
granted) using compilers I trust.

There's always the test-suite if you want some extra re-assurance that
things are working correctly. I'm not going to pretend that there
aren't differences, but for the task of embedding into GDB (and any
other task I've put them to) I've never had any problems, both with Qt
Creator's pretty-printers, and the STL ones.

I'm starting to repeat myself a bit, but in terms of stability, my NDK
releases have had this GDB integration for ages now - the recent
difference is that now it is cross compiled and updated to 2.7.3 and
3.3.0b2. The Windows version of the Necessitas Android Qt SDK has had
 13,000 downloads (and that was a few months ago - so likely nearer
20,000 now) and not a single issue has come up with the Python GDB
integration. It just works.

The patches have been tested and merged by Google too and down the
line I'll be trying to get them into CPython.

I guess in some ways it seems a bit like debating whether to take some
msvc compiled expat libraries or to compile them from source. They'll
both parse XML, but I know I'd rather build the software I release
myself so I can investigate and fix it if it ever goes wrong.

Cheers,

Ray.

On Sat, Sep 15, 2012 at 9:55 PM, John E. / TDM tdra...@tdragon.net wrote:
 On 9/15/2012 1:30 AM, Ray Donnelly wrote:
 Hi John,

 Not sure you'll be interested but I build my own version of Python
 into some Android NDKs, and this Python is cross compilable/compiled.
 From a Linux box, 12 variants can be built (Windows, Mac, Linux) *
 (x86, x86_64) * (2.7.3, 3.3.0b1). Native shouldn't be much of a
 stretch too but it's not something I've tried. Here are the some 2.7.3
 Windows builds I made.

 Thanks for the input. Ultimately it seems to me that Ruben's method will
 prove the most stable, as it compiles directly against the Python
 project's own released binaries. Can you tell me what advantage(s) your
 version would have for Windows native users?

 -John E. / TDM

 --
 How fast is your code?
 3 out of 4 devs don\\\'t know how their code performs in production.
 Find out how slow your code is with AppDynamics Lite.
 http://ad.doubleclick.net/clk;262219672;13503038;z?
 http://info.appdynamics.com/FreeJavaPerformanceDownload.html
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] Building a 64-bit Python-enabled GDB

2012-09-14 Thread John E. / TDM
Hi all,

Having finally gotten what may be a decent build of GCC 4.7.1, I'm 
moving on to GDB and looking at the possibility of bringing in Python 
support this time. However, I'm having trouble finding the appropriate 
headers and libraries to point GDB at for the build (x86_64-w64-mingw32 
host, x86_64-w64-mingw32 target).

The best thing I've found so far is a file named 
python-x86_64-w64-mingw32.zip within rubenvb's 4.7.1 source tarball. 
However, I'm extremely hesitant to use it because it doesn't contain any 
sources, or build instructions, for the libraries it contains. Oh, and 
if I have to download MSVC and build Python myself, forget it.

Ruben, do you have any clarifying information on your source? Or does 
anyone else have notes on how to create a 64-bit Python-enabled GDB?

Thanks in advance,
John E. / TDM

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public