public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* issue about building windows version of gdb with python support
@ 2010-06-14 12:58 asmwarrior
  2010-06-16 17:37 ` Tom Tromey
  0 siblings, 1 reply; 7+ messages in thread
From: asmwarrior @ 2010-06-14 12:58 UTC (permalink / raw)
  To: gdb

Hi, all.

Today, I have build a gdb.exe with python support under windows(i'm 
using TDMMinGW 4.5 dw2 version, I use the latest gdb snapshot 7.1.5 
20100613, python 2.6.5).

I have released in Codeblocks'forum, I love the "pretty print" function 
supplied by python.
http://forums.codeblocks.org/index.php/topic,11301.msg86240.html#msg86240

But I found that the build configuration has some problems when linking 
to python header files and libs.

By the default, the configuration step will test if python can be used. 
It expect that the python header file was under some folders like

For searching python header files, it use some folder path like:
The test python code has some code like:
#include "python2.6/include"
For searching lib files, it will search some path like:
python_folder/lib/libpython2.6.a

But, In fact, when I install the python2.6.5 in windows, the folder 
structure was like below:

E:\XXXX\python this is the root folder.
Then E:\XXXX\python\include, this is the header directory.
Then, the lib foldee was: E:\XXXX\python\libs        (please note that 
the path name is"libs" not lib.)
Also, the library file is E:\XXXX\python\libs\libpython26.a (please note 
that, there is no "dot" between the number 2 and 6.


To solve this mismatch, I just change the lib name and copy a header 
file to make the configure happy (otherwize, I can't pass the python 
test in the configuration step).

But I think this is not a good way, I would like suggestion you can 
solve the configuration issue.( mostly, I think some thing in the 
automake script).

thanks

asmwarrior (ollydbg from codeblocks' forum)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-14 12:58 issue about building windows version of gdb with python support asmwarrior
@ 2010-06-16 17:37 ` Tom Tromey
  2010-06-16 18:09   ` Doug Evans
  2010-06-18  0:34   ` asmwarrior
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Tromey @ 2010-06-16 17:37 UTC (permalink / raw)
  To: asmwarrior; +Cc: gdb

>>>>> ">" == Asm gmail <asmwarrior@gmail.com> writes:

>> Today, I have build a gdb.exe with python support under windows(i'm
>> using TDMMinGW 4.5 dw2 version, I use the latest gdb snapshot 7.1.5
>> 20100613, python 2.6.5).
[...]
>> E:\XXXX\python this is the root folder.
>> Then E:\XXXX\python\include, this is the header directory.
>> Then, the lib foldee was: E:\XXXX\python\libs        (please note that
>> the path name is"libs" not lib.)

Hmm, I would have thought that the python-config.py stuff (in
gdb/python/) would do the right thing here.

What is the output on your machine when you run that with --ldflags?
I'm wondering if configure is somehow falling through to the old code,
or if Python itself is somehow misconfigured, or if it is an upstream
Python bug.

Even if it is a Python bug, maybe we can work around it somehow.

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-16 17:37 ` Tom Tromey
@ 2010-06-16 18:09   ` Doug Evans
  2010-06-18  0:34   ` asmwarrior
  1 sibling, 0 replies; 7+ messages in thread
From: Doug Evans @ 2010-06-16 18:09 UTC (permalink / raw)
  To: tromey; +Cc: asmwarrior, gdb

On Wed, Jun 16, 2010 at 10:36 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> ">" == Asm gmail <asmwarrior@gmail.com> writes:
>
>>> Today, I have build a gdb.exe with python support under windows(i'm
>>> using TDMMinGW 4.5 dw2 version, I use the latest gdb snapshot 7.1.5
>>> 20100613, python 2.6.5).
> [...]
>>> E:\XXXX\python this is the root folder.
>>> Then E:\XXXX\python\include, this is the header directory.
>>> Then, the lib foldee was: E:\XXXX\python\libs        (please note that
>>> the path name is"libs" not lib.)
>
> Hmm, I would have thought that the python-config.py stuff (in
> gdb/python/) would do the right thing here.

It should for ldflags I think, but the include files assume pythonX.Y/*.h.
I didn't want to bubble up all of python's headers to the top level
(crikey!) so I kept gdb's original way of including them.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-16 17:37 ` Tom Tromey
  2010-06-16 18:09   ` Doug Evans
@ 2010-06-18  0:34   ` asmwarrior
  2010-06-18 13:09     ` Doug Evans
  1 sibling, 1 reply; 7+ messages in thread
From: asmwarrior @ 2010-06-18  0:34 UTC (permalink / raw)
  To: tromey; +Cc: gdb

On 2010-6-17 1:36, Tom Tromey wrote:
> Hmm, I would have thought that the python-config.py stuff (in
> gdb/python/) would do the right thing here.
>
> What is the output on your machine when you run that with --ldflags?
>    

Thanks for your reply. Infact, I'm quite new to "Python", so I even 
don't know what does "--ldflags" means... Sorry. I have tried the 
snapshot 0616, but build process failed due to some errors related to 
python. I guess you have change the python-configure related code.

BTW:
Now, I'm concerning the python pretty print issue on uninitialized 
variables, this always make my gdb.exe crashed. The only bug report I 
found is here:

http://sourceware.org/bugzilla/show_bug.cgi?id=11407

Does this issue is quite hard to solve?

Thanks

Asmwarrior
ollydbg from Codeblocks forum


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-18  0:34   ` asmwarrior
@ 2010-06-18 13:09     ` Doug Evans
  2010-06-19  3:11       ` asmwarrior
  0 siblings, 1 reply; 7+ messages in thread
From: Doug Evans @ 2010-06-18 13:09 UTC (permalink / raw)
  To: asmwarrior; +Cc: tromey, gdb

On Thu, Jun 17, 2010 at 5:34 PM, asmwarrior <asmwarrior@gmail.com> wrote:
> On 2010-6-17 1:36, Tom Tromey wrote:
>>
>> Hmm, I would have thought that the python-config.py stuff (in
>> gdb/python/) would do the right thing here.
>>
>> What is the output on your machine when you run that with --ldflags?
>>
>
> Thanks for your reply. Infact, I'm quite new to "Python", so I even don't
> know what does "--ldflags" means... Sorry. I have tried the snapshot 0616,
> but build process failed due to some errors related to python. I guess you
> have change the python-configure related code.

In the gdb source tree, run

python python/python-config.py --ldflags

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-18 13:09     ` Doug Evans
@ 2010-06-19  3:11       ` asmwarrior
  2010-06-19  3:18         ` Doug Evans
  0 siblings, 1 reply; 7+ messages in thread
From: asmwarrior @ 2010-06-19  3:11 UTC (permalink / raw)
  To: Doug Evans; +Cc: tromey, gdb

On 2010-6-18 21:09, Doug Evans wrote:
> On Thu, Jun 17, 2010 at 5:34 PM, asmwarrior<asmwarrior@gmail.com>  wrote:
>    
>> On 2010-6-17 1:36, Tom Tromey wrote:
>>      
>>> Hmm, I would have thought that the python-config.py stuff (in
>>> gdb/python/) would do the right thing here.
>>>
>>> What is the output on your machine when you run that with --ldflags?
>>>
>>>        
>> Thanks for your reply. Infact, I'm quite new to "Python", so I even don't
>> know what does "--ldflags" means... Sorry. I have tried the snapshot 0616,
>> but build process failed due to some errors related to python. I guess you
>> have change the python-configure related code.
>>      
> In the gdb source tree, run
>
> python python/python-config.py --ldflags
>    
Thanks, I have download the latest snapshot then, run this command, here 
is the command log output

E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python>python-
config.py --ldflags
Traceback (most recent call last):
   File 
"E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python
\python-config.py", line 47, in <module>
     libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
AttributeError: 'NoneType' object has no attribute 'split'

E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python>


Python2.6.5 was installed in E:\code\python265
The include header was: E:\code\python265\include  (all the xxxx.h files)
the lib was: E:\code\python265\libs                (all the xxxx.lib and 
libpython26.a )


So, I think these information can help you to solve the python issue on 
Windows.
Thanks

asmwarrior ollydbg from codeblocks forum.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: issue about building windows version of gdb with python support
  2010-06-19  3:11       ` asmwarrior
@ 2010-06-19  3:18         ` Doug Evans
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Evans @ 2010-06-19  3:18 UTC (permalink / raw)
  To: asmwarrior; +Cc: tromey, gdb

On Fri, Jun 18, 2010 at 8:12 PM, asmwarrior <asmwarrior@gmail.com> wrote:
>> In the gdb source tree, run
>>
>> python python/python-config.py --ldflags
>>
>
> Thanks, I have download the latest snapshot then, run this command, here is
> the command log output
>
> E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python>python-
> config.py --ldflags
> Traceback (most recent call last):
>  File
> "E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python
> \python-config.py", line 47, in <module>
>    libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
> AttributeError: 'NoneType' object has no attribute 'split'
>
> E:\code\cb\gdb_python\gdb-7.1.50.20100619\gdb-7.1.50.20100619\gdb\python>
>
>
> Python2.6.5 was installed in E:\code\python265
> The include header was: E:\code\python265\include  (all the xxxx.h files)
> the lib was: E:\code\python265\libs                (all the xxxx.lib and
> libpython26.a )
>
>
> So, I think these information can help you to solve the python issue on
> Windows.

Well, I wish it did, but alas it doesn't.
It seems like windows's python is incompatible with the unix's
python's python-config.py script.  Seems odd though.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-19  3:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14 12:58 issue about building windows version of gdb with python support asmwarrior
2010-06-16 17:37 ` Tom Tromey
2010-06-16 18:09   ` Doug Evans
2010-06-18  0:34   ` asmwarrior
2010-06-18 13:09     ` Doug Evans
2010-06-19  3:11       ` asmwarrior
2010-06-19  3:18         ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).