The easiest way to determine if Python shared library exists and is
being used by mod_wsgi module is to run 'ldd' on the mod_wsgi.so file.
An example of this is presented in:
http://code.google.com/p/modwsgi/wiki/InstallationIssues
For example:
$ ldd mod_wsgi.so
linux-vdso.so.1 => (0x00007fffeb3fe000)
libpython2.5.so.1.0 => /usr/local/lib/libpython2.5.so.1.0 (0x00002adebf94d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00002adebfcba000)
libdl.so.2 => /lib/libdl.so.2 (0x00002adebfed6000)
libutil.so.1 => /lib/libutil.so.1 (0x00002adec00da000)
libc.so.6 => /lib/libc.so.6 (0x00002adec02dd000)
libm.so.6 => /lib/libm.so.6 (0x00002adec0635000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
If you do not see a dependency on libpythonX.Y.so, then mod_wsgi isn't
using a Python shared library.
If not using shared library, it can still work, but to avoid conflicts
and problems with mod_python you should disable mod_python and not use
it in Apache at the same time. Ensure that when disabling mod_python
to fully 'stop' Apache as mod_python doesn't shutdown properly and so
it may not unload properly and for a 'restart' may still cause
problems.
Graham
It may already provide a shared library, but default Python
installation isn't friendly to people linking against it and put the
static and shared versions of Python libraries in different locations
when by rights they should be available in the same location. Most
distributions fix this problem, but looks like SUSE doesn't.
It might be argued that mod_wsgi could look in both locations, but
problem is that can only be sure about the location of the static
library as where the shared library may be may not be obvious,
especially on platforms where they try and separate 32 bit and 64 bit
Python installations.
What you should do is search for libpythonX.Y.so on your system,
substituting actual Python major/minor Python version for X.Y. On a
single architecture Linux install, this would normally be in
'/usr/lib'. That should then be symlinked to appear in the Python
'config' directory, ie., '/usr/lib/pythonX.Y/config' where the static
library exists.
Do that and when compiling mod_wsgi from source code, it should then
find the shared library along side the static library and used shared
library in preference to static library.
Graham
Hello!
~/.pyenv/versions/3.8.3/envs/venv_3.8.3/lib/python3.8/site-packages/mod_wsgi/server$ ldd mod_wsgi-py38.cpython-38-x86_64-linux-gnu.so
linux-vdso.so.1 => (0x00007ffd997fd000)
libpython3.8.so.1.0 => /home/directory/.pyenv/versions/3.8.3/lib/libpython3.8.so.1.0 (0x00007fe199a12000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe1997f5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe19942b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe199227000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fe199024000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe198d1b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe19a1fc000)Is this something that I should take care of?
P.S I saw the older post [modwsgi] Size of mod_wsgi.so when built with python shared library but the difference in size is big enough so to think that might be a good reason to ask about it.
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/7d416377-bdd2-4245-8cbb-71551bc1ae9fo%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mod...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/147b71fd-4e9e-44fc-82f3-3f813801457ao%40googlegroups.com.
Oh sorry,
mod_wsgi.so size in my situation is 1157792 bytes
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/B5A000D6-7C51-4459-B950-0BEB96D22951%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/0bb701d652df%2440575c20%24c1061460%24%40gmail.com.