[OpenSIPS-Users] Mediaproxy 2.1.0 on Red Hat/CentOS

Dan Pascu dan at ag-projects.com
Thu Nov 27 13:01:47 CET 2008


On Thursday 27 November 2008, John Quick wrote:
> Dan
>
> Your explanation makes a lot of sense - getting the correct version of
> the gnutls libraries has been a big problem and I downloaded 2.4.2 and
> installed from source after I had installed the Python libraries.
> However, I now have problems re-installing packages/libraries so the
> old ones are properly replaced. For example, "./setup clean" does not
> remove the old .so files in the build directory for my Python packages
> - I had to manually delete them. I also had to manually delete the .pyc
> files in the mediaproxy directory and mediaproxy/interfaces.

You do not need to delete the .pyc files. setup clean only cleans files 
from builds that were not done in-place. if you did ./build_inplace then 
you need to delete the .so yourself to rebuild it.

>
> Have just tried rebuilding/installing:
> python-gnutls-1.1.6, then
> Twisted-8.1.0, then
> build_inplace mediaproxy
> and I still get the same error when I run media-dispatcher.

The order to install them is:

libtasn1 (libgnutls dependency)
libgcrypt11 (libgnutls dependency)
libgnutls26 (version 2.4.2)
python-gnutls (build it only after the above had been installed)
other deps
mediaproxy

unfortunately, gnutls has some dependencies of its own (libtasn1 and 
libgcrypt), and the version you use (2.4.2) needs a certain version of 
these companion libraries (for gnutls-2.4.x I have libgcrypt-1.4.1 and 
libtasn1-1.4). It may be possible that you still get the error because 
libtasn1 and/or libgcrypt are still old versions.

To check that libraries you use:

run a python interpreter and execute the statement below:

python
>>> from gnutls.library import functions

then find the pid of that python interpreter (ps ax | grep python) and run 
lsof on it:

lsof -p pid_of_python_interpreter

then run

ldd gnutls/library/_gnutls_init.so

Compare the versions and paths for libgnutls, libgcrypt and libtasn1 from 
the outputs of lsof and ldd. They must be the same.

>
> Two things that are probably relevant:
> 1. The usual ./configure; make; make install process that I used for
> the source package of gnutls failed to copy gnutls-extra.so file to the
> Linux lib path - I eventually copied it manually, but don't feel happy
> about having to do that.

I don't think that's a problem.

> 2. When I rebuild Twisted-8.1.0, it gives the following error during
> the "install" process, but the install script still completes:

I do not know about that. You should ask the twisted developers about it.
I guess a simple solution would be to remove the offending files, since 
they're only tests. Aren't they ignored anyways, since the error is just 
in byte compiling them?

>
> [root at opensips02 Twisted-8.1.0]# ./setup.py install
> running install
> running build
> running build_py
> running build_ext
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC
> -I/usr/include/python2.4 -c conftest.c -o conftest.o
> running build_scripts
> running install_lib
> copying build/lib.linux-x86_64-2.4/twisted/python/_epoll.so ->
> /usr/lib64/python2.4/site-packages/twisted/python
> copying build/lib.linux-x86_64-2.4/twisted/test/raiser.so ->
> /usr/lib64/python2.4/site-packages/twisted/test
> copying build/lib.linux-x86_64-2.4/twisted/protocols/_c_urlarg.so ->
> /usr/lib64/python2.4/site-packages/twisted/protocols
> copying build/lib.linux-x86_64-2.4/twisted/runner/portmap.so ->
> /usr/lib64/python2.4/site-packages/twisted/runner
> byte-compiling
> /usr/lib64/python2.4/site-packages/twisted/test/generator_failure_tests
>.py to generator_failure_tests.pyc
>   File
> "/usr/lib64/python2.4/site-packages/twisted/test/generator_failure_test
>s.py" , line 66
>     yield
>          ^
> SyntaxError: invalid syntax
>
>
> I haven't rebuilt/installed python-application or cjson packages since
> upgrading gnutls - are they relevant? If so, what is the correct order

no. pyhton-application and python-cjson are standalone, so you can install 
them whenever you like.

> for building the various python packages?

See above.

-- 
Dan



More information about the Users mailing list