linking errors with debug build of Python2.4.3

2006-05-24 Thread Martin Wiechert
Hi list,

I've created a fresh build of Python 2.4.3 using the following configuration

$ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared 
--with-fpectl --with-signal-module

in particular I used --with-pydebug.

Now when I start the interpreter some dynamically loaded modules do not see 
debug-related symbols:

$ /usr/local/debug/bin/python
Python 2.4.3 (#1, May 12 2006, 05:35:54)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in ?
import readline
ImportError: /usr/local/debug/lib/python2.4/lib-dynload/readline.so: undefined 
symbol: _Py_RefTotal
>>>

I've attached a shell session with the outputs of ldd and nm on readline.so

What did I do wrong?
My System is SuSE Linux 10.1 on Intel.

Any help would be much appreciated.

Thanks, Martin.
[EMAIL PROTECTED]:~> ldd /usr/local/debug/lib/python2.4/lib-dynload/readline.so
linux-gate.so.1 =>  (0xe000)
libreadline.so.5 => /lib/libreadline.so.5 (0xb7edd000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0xb7e9)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e7c000)
libc.so.6 => /lib/libc.so.6 (0xb7d5c000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7d14000)
libdl.so.2 => /lib/libdl.so.2 (0xb7d1)
/lib/ld-linux.so.2 (0x8000)
[EMAIL PROTECTED]:~> nm /usr/local/debug/lib/python2.4/lib-dynload/readline.so
 U add_history
4e68 b begidx
4e30 A __bss_start
1780 t call_gmon_start
2bb7 t call_readline
 U clear_history
4e40 b completed.5751
4e64 b completer
 U completion_matches
4004 d __CTOR_END__
4000 d __CTOR_LIST__
 w __cxa_finalize@@GLIBC_2.1.3
4840 d doc_add_history
4b60 d doc_clear_history
4640 d doc_get_begidx
49e0 d doc_get_completer
4880 d doc_get_completer_delims
4aa0 d doc_get_current_history_length
46a0 d doc_get_endidx
4a40 d doc_get_history_item
4b00 d doc_get_line_buffer
4ba0 d doc_insert_text
4c60 d doc_module
4260 d doc_parse_and_bind
4340 d doc_read_history_file
42c0 d doc_read_init_file
4be0 d doc_redisplay
4760 d doc_remove_history
47c0 d doc_replace_history
48e0 d doc_set_completer
4700 d doc_set_completer_delims
4580 d doc_set_startup_hook
43c0 d doc_write_history_file
2e10 t __do_global_ctors_aux
17b0 t __do_global_dtors_aux
4240 d __dso_handle
400c d __DTOR_END__
4008 d __DTOR_LIST__
4014 a _DYNAMIC
4e30 A _edata
 U emacs_meta_keymap
4f1c A _end
4e6c b endidx
 U __errno_location@@GLIBC_2.0
2e44 T _fini
286e t flex_complete
1810 t frame_dummy
31ac r __FRAME_END__
 U free@@GLIBC_2.0
1e6a t get_begidx
22a1 t get_completer
2242 t get_completer_delims
23c1 t get_current_history_length
1ea2 t get_endidx
231f t get_history_item
1bf3 t get_history_length
4500 d get_history_length_doc
2404 t get_line_buffer
4148 a _GLOBAL_OFFSET_TABLE_
 w __gmon_start__
 U history_get
 U history_get_history_state
433c d _history_length
 U history_truncate_file
1847 t __i686.get_pc_thunk.bx
2e09 t __i686.get_pc_thunk.cx
13e8 T _init
2da9 T initreadline
2477 t insert_text
4e80 b jbuf
4010 d __JCR_END__
4010 d __JCR_LIST__
 w _Jv_RegisterClasses
 U longjmp@@GLIBC_2.0
 U malloc@@GLIBC_2.0
26d7 t on_completion
2542 t on_hook
2ad8 t onintr
26b1 t on_startup_hook
4244 d p.5749
184c t parse_and_bind
21c2 t py_add_history
 U PyArg_ParseTuple
 U PyCallable_Check
242c t py_clear_history
 U _Py_Dealloc
 U PyErr_Clear
 U PyErr_Format
 U PyErr_NoMemory
 U PyErr_Occurred
 U PyErr_SetFromErrno
 U PyErr_SetString
 U PyExc_IOError
 U PyExc_TypeError
 U PyExc_ValueError
 U Py_FatalError
 U PyGILState_Ensure
 U PyGILState_Release
 U Py_InitModule4TraceRefs
 U PyInt_AsLong
 U PyInt_FromLong
 U PyMem_Malloc
 U _Py_NegativeRefcount
 U _Py_NoneStruct
 U PyObject_CallFunction
 U PyOS_InputHook
 U PyOS_ReadlineFunctionPointer
 U PyOS_setsig
 U PyOS_snprintf
 U _Py_RefTotal
1f74 t py_remove_history
2090 t py_replace_history
 U PyString_AsString
 U PyString_FromString
 U read_history
19db t read_history_file
1929 t read_init_file
 U readline
4cc0 d readline_methods
2b00 t readline_until_enter_or_signal
24f7 t redisplay
 U remove_history
 U replace_history_entry
 U rl_attempted_completion_function
 U rl_attempted_completion_over
 U rl_bind_key
 U rl_bind_key_in_map
 U rl

Re: linking errors with debug build of Python2.4.3

2006-06-04 Thread Martin Wiechert
You were right, leaving out --with-pydebug did the trick.

Thanks, Martin


On Sunday 28 May 2006 03:53, [EMAIL PROTECTED] wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > I've created a fresh build of Python 2.4.3 using the following
> > configuration
> >
> > $ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared
> > --with-fpectl --with-signal-module
> >
> > What did I do wrong?
>
> Try with just:  ./configure --with-pydebug --prefix=/usr/local/debug
>
> I think the problem is --enable-shared.  I'm not sure what you are
> doing, but you probably don't need the other options.  The signal
> module should always be built, I've never even seen the
> --with-signal-module option. :-)
>
> n
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: linking errors with debug build of Python2.4.3

2006-06-05 Thread Martin Wiechert
Nonsense! I meant leaving out --enable-shared.

On Sunday 04 June 2006 16:17, Martin Wiechert wrote:
> You were right, leaving out --with-pydebug did the trick.
>
> Thanks, Martin
>
> On Sunday 28 May 2006 03:53, [EMAIL PROTECTED] wrote:
> > Martin Wiechert wrote:
> > > Hi list,
> > >
> > > I've created a fresh build of Python 2.4.3 using the following
> > > configuration
> > >
> > > $ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared
> > > --with-fpectl --with-signal-module
> > >
> > > What did I do wrong?
> >
> > Try with just:  ./configure --with-pydebug --prefix=/usr/local/debug
> >
> > I think the problem is --enable-shared.  I'm not sure what you are
> > doing, but you probably don't need the other options.  The signal
> > module should always be built, I've never even seen the
> > --with-signal-module option. :-)
> >
> > n
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Simple SVN/CVS-like library in Python?

2007-02-08 Thread Martin Wiechert
On Wednesday 07 February 2007 21:29, Andrea Gavana wrote:
> Hi All,
>
> in our office we work with quite complex input files for a
> reservoir simulator. Those files have thousands of keywords, switches,
> sub-keywords and whatever. Every time a modification is requested, we
> modify the input file and re-run the simulator. Obviously, the
> possible modifications are innumerable: so, after few months, we lose
> the records of all the changes we made during time and we don't have
> anymore a clear history of our work. This can be a problem, as
> sometimes it happens that an old input file is requested by
> collegues/sub-companies, and it is a pain to retrieve the correct file
> and results.
> So, I have written a GUI in wxPython that could help us in tracking
> the history, but I was wondering if there exists a small and simple
> SVN/CVS-like library in Python that may help us in a better way,
> storing modifications/changes and showing which input file are the
> "children" of (are derived from) another input file (older).
> But I am open to all possible suggestions to improve/modify the
> software, as this is an area in which my experience is about nothing
> above zero.
>
> Thank you very much for every hint.

http://www.selenic.com/mercurial/wiki/
http://www.selenic.com/mercurial/wiki/index.cgi/HgkExtension

>
> Andrea.
>
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.virgilio.it/infinity77/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Where is documentation for +=

2006-06-14 Thread Martin Wiechert
http://docs.python.org/ref/augassign.html


On Wednesday 14 June 2006 15:39, Marco Wahl wrote:
> Hello,
>
> by accident I found that += exists in python.
> E.g.
>
> >>> a = 0
> >>> a += 42
> >>> a
>
> 42
>
> >>> a += 0.42
> >>> a
>
> 42.422
>
>
> But I can't find any documentation for +=.
> Any hints?
>
>
> Best wishes
-- 
http://mail.python.org/mailman/listinfo/python-list