[gevent] undefined symbol: evhttp_accept_socket

130 views
Skip to first unread message

Phillip B Oldham

unread,
May 17, 2010, 10:55:46 AM5/17/10
to gevent: coroutine-based Python network library
I'm trying to install gevent on a fresh EC2 CentOS 5.3 64-bit system.

Since the libevent version available in yum was too old for another
package (beanstalkd) I compiled/installed libevent-1.4.13-stable
manually using the following command:

./configure --prefix=/usr && make && make install
This is the output from installing gevent:

[gevent-0.12.2]# python setup.py build --libevent /usr/lib
Using libevent 1.4.13-stable: libevent.so
running build
running build_py
running build_ext
Linking /usr/src/gevent-0.12.2/build/lib.linux-x86_64-2.6/gevent/
core.so to
/usr/src/gevent-0.12.2/gevent/core.so
[gevent-0.12.2]# cd /path/to/my/project
[project]# python myscript.py
Traceback (most recent call last):
File "myscript.py", line 9, in <module>
from gevent.wsgi import WSGIServer as GeventServer
File "/usr/lib/python2.6/site-packages/gevent/__init__.py", line 32,
in <module>
from gevent.core import reinit
ImportError: /usr/lib/python2.6/site-packages/gevent/core.so:
undefined symbol: evhttp_accept_socket

I've followed exactly the same steps on a local VirtualBox instance
(32-bit) and I'm not seeing any errors.

How would I fix this?

Ralf Schmitt

unread,
May 17, 2010, 11:22:04 AM5/17/10
to gev...@googlegroups.com
Phillip B Oldham <phillip...@gmail.com> writes:

> I'm trying to install gevent on a fresh EC2 CentOS 5.3 64-bit system.
>
> Since the libevent version available in yum was too old for another
> package (beanstalkd) I compiled/installed libevent-1.4.13-stable
> manually using the following command:
>
> ./configure --prefix=/usr && make && make install
> This is the output from installing gevent:
>
> [gevent-0.12.2]# python setup.py build --libevent /usr/lib
> Using libevent 1.4.13-stable: libevent.so
> running build
> running build_py
> running build_ext
> Linking /usr/src/gevent-0.12.2/build/lib.linux-x86_64-2.6/gevent/
> core.so to
> /usr/src/gevent-0.12.2/gevent/core.so

gevent.core is not being compiled here. any chance that you still had an old
version? try running rm -rf build and run setup again....

> [gevent-0.12.2]# cd /path/to/my/project
> [project]# python myscript.py
> Traceback (most recent call last):
> File "myscript.py", line 9, in <module>
> from gevent.wsgi import WSGIServer as GeventServer
> File "/usr/lib/python2.6/site-packages/gevent/__init__.py", line 32,
> in <module>
> from gevent.core import reinit
> ImportError: /usr/lib/python2.6/site-packages/gevent/core.so:
> undefined symbol: evhttp_accept_socket
>

"ldd /usr/lib/python2.6/site-packages/gevent/core.so" should tell you
which version of libevent was linked in.

> I've followed exactly the same steps on a local VirtualBox instance
> (32-bit) and I'm not seeing any errors.
>
> How would I fix this?

You could also try my git mirror from http://github.com/schmir/gevent.
The wip-all branch contains some code which download and compiles
libevent statically.
"python setup.py build_libevent build install" should give you a working
installation...
Reply all
Reply to author
Forward
0 new messages