ramkrishanbhatt / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

undefined symbol: rl_line_buffer #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With Apache 2.0.61 when I attempt to load the mod_wsgi (v1.1) module I get
this error:

mod_wsgi.so: undefined symbol: rl_line_buffer

What steps will reproduce the problem?
1. Add "LoadModule wsgi_module modules/mod_wsgi.so" to httpd.conf
2. Try to "apachectl start"
3.

If I load both mod_python & mod_wsgi then I don't get the error. I also
tried building from SVN and I receive the same error,

Original issue reported on code.google.com by jafcob...@gmail.com on 19 Oct 2007 at 2:26

GoogleCodeExporter commented 8 years ago
This symbol is actually a part of the readline library and not from either 
mod_python
or mod_wsgi. It is referenced in Python readline code as:

$ grep rl_line_buffer */*.c
Modules/readline.c:     return PyString_FromString(rl_line_buffer);

That you are getting this symbol possibly means that when the readline module 
was
compiled as part of your Python installation that it wasn't correctly linked 
against
the readline library.

What you should do is go into the Python library directory installed Python code
modules are installed, and run 'ldd' on the readline.so file to see what 
libraries it
links against. For example:

$ ldd lib-dynload/readline.so 
        libreadline.so.5 =>      /usr/local/lib/libreadline.so.5
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Fire-V445/lib/libc_psr.so.1

See how it links with libreadline.so.

If your module doesn't, that is the problem and you will need to rebuild Python
ensuring that when it is built that it is linking the readline module against 
the
readline library.

If you don't see the error when loading both mod_python and mod_wsgi, then 
mod_python
may have possibly been fiddled by a Linux distribution to link with readline 
library
directly when it is the readline module that should have fixed.

To work out what is going on, what are the sizes of your mod_python.so and
mod_wsgi.so files? What is the output from running 'ldd' on both of them? This 
will
also indicate whether they have been compiled to properly use a Python shared
library, or if not that the Python installation is possibly inadequate.

If confused, then take the discussion on to the mod_wsgi Google Group.

Original comment by Graham.Dumpleton@gmail.com on 19 Oct 2007 at 3:08

GoogleCodeExporter commented 8 years ago
Closing, as not an issue in mod_wsgi by way that Python was built.

Original comment by Graham.Dumpleton@gmail.com on 21 Oct 2007 at 1:32

GoogleCodeExporter commented 8 years ago
Problem was caused by readline module being compiled statically with Python 2.5.
Forcing it to build as a shared module fixed the problem.

Original comment by jafcob...@gmail.com on 24 Oct 2007 at 8:48