Hi Graham,
The replies to your questions are included below. At this point, my
sysadmin and I have things working, albeit in a hacky, haphazard way.
The problem all along was that Apache was looking into /usr/lib64 to
find libstdc++.so.6. That library was quite a bit older, however,
than the one available in the new GCC install. So, predictably,
installing a new GCC in a strange way AND compiling Python and
mod_wsgi with it led to issues. To solve the problem, my sysadmin
created a symbolic link to /home/install-gcc-4.4.2/usr/local/lib64/
libstdc++.so.6.0.13 in /usr/lib64. This is not ideal, but, then
again, nothing about this poor little LINUX box is ideal right now.
> > Yesterday, I emailed Graham (Dumpleton) about a problem I've been
> > having with matplotlib, django and mod_wsgi. He suggested that the
> > issue was that my Python installation was built using the 64 bit
> > GNU C/C++ compiler, but that my system only has runtime libraries for
> > the 32 bit GNU C/C++ compiler installed. I went back and checked it,
> > and discovered that I do, in fact, have the runtime libraries for the
> > 64 bit GNU C/C++ compiler installed.
>
> > One oddity: My sysadmin has installed software in weird places
> > (because he is afraid of letting a user have any control over his or
> > her system). So, I am running my apache server in test mode as myself
> > (not root, not apache).
>
> When you say 'test mode', what exactly do you mean?
>
> Do you mean you are just running it on non privileged port, but still
> using 'apachectl' to stop and start it, or did you really mean you are
> running it in one of Apache's test modes. In respect of the latter, do
> you mean you are running 'httpd' directly such as:
>
> httpd -X
Sorry -- that was unclear. I'm running as user 'jroy', and I am using
apachectl to stop and start the process. I am not running httpd
directly.
> > I have been meticulous about setting my PATH
> > and LD_LIBRARY_PATH environment variables (e.g. /usr/lib64 as well /
> > home/install-gcc-4.4.2/usr/local/lib64 is on LD_LIBRARY_PATH).
>
> Where are you setting these though, in the environment of your person
> user account, or in the startup files of Apache?
I am setting them in the environment of my personal user account,
which is clearly not sufficient.
> BTW, the PATH variable has no relevance to library search paths on
> UNIX like it does on Windows.
Right. My mistake to mention it -- I am concerned with setting
LD_LIBRARY_PATH correctly.
> > I am
> > wondering, however, if it is necessary to use mod_env to explicitly
> > set these paths in httpd.conf. Perhaps apache is not inheriting my
> > environment?
>
> Possibly not, but mod_env isn't the solution. For a standard ASF
> Apache installation, there is a file called 'envvars' located in same
> directory as 'httpd'. Any settings of LD_LIBRARY_PATH should go in
> there. Ensure you export the variables, it is treated as a shell
> script.
That makes all the difference.
> > The full text of the error reads:
>
> > [Mon Mar 15 11:32:51 2010] [error] [client 172.18.42.130] mod_wsgi
> > (pid=15075): Exception occurred processing WSGI script '/home/www/
> > margins_profiler/margins_profiler.wsgi'.
> > ...
> > [Mon Mar 15 11:32:51 2010] [error] [client 172.18.42.130]
> > ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not
> > found (required by /home/Python-2.6.4/install/lib/python2.6/site-
> > packages/matplotlib/_path.so)
>
> > Has anyone else run into a similar error? Any advice would be
> > welcome!
>
> What do you get when you run:
>
> echo $LD_LIBRARY_PATH
I get /home/Python-2.6.4/install/lib:/home/oras/u01/app/ora10g2/
product/10.2.0/lib:/home/install-gcc-4.4.2/usr/local/lib:/home/install-
gcc-4.4.2/usr/local/lib64
> ldd
> /home/Python-2.6.4/install/lib/python2.6/site-packages/matplotlib/_path.so
[0938][j...@jasper:~]$ ldd /home/Python-2.6.4/install/lib/python2.6/
site-packages/matplotlib/_path.so
libstdc++.so.6 => /home/install-gcc-4.4.2/usr/local/lib64/
libstdc++.so.6 (0x0000002a9569e000)
libpython2.6.so.1.0 => /home/Python-2.6.4/install/lib/
libpython2.6.so.1.0 (0x0000002a958ab000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95b82000)
libgcc_s.so.1 => /home/install-gcc-4.4.2/usr/local/lib64/
libgcc_s.so.1 (0x0000002a95d09000)
libpthread.so.0 => /lib64/tls/libpthread.so.0
(0x0000002a95e1f000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95f34000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a96169000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000002a9626c000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
> unsetenv LD_LIBRARY_PATH
>
> ldd
> /home/Python-2.6.4/install/lib/python2.6/site-packages/matplotlib/_path.so
[0940][j...@jasper:~]$ ldd /home/Python-2.6.4/install/lib/python2.6/
site-packages/matplotlib/_path.so
libstdc++.so.6 => /usr/lib64/libstdc++.so.6
(0x0000002a956c4000)
libpython2.6.so.1.0 => not found
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a958d1000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a95a58000)
libpthread.so.0 => /lib64/tls/libpthread.so.0
(0x0000002a95b63000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95c78000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
> Did you compile matplotlib yourself?
Yes, I did.
> Also provide:
>
> ldd mod_wsgi.so
>
> for the compiled mod_wsgi.so file you are using.
N.B. the following is AFTER LD_LIBRARY_PATH is set.
[0942][j...@jasper:~]$ ldd /home/apache2/modules/mod_wsgi.so
libpython2.6.so.1.0 => /home/Python-2.6.4/install/lib/
libpython2.6.so.1.0 (0x0000002a9567d000)
libpthread.so.0 => /lib64/tls/libpthread.so.0
(0x0000002a95954000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a95a69000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000002a95b6d000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95c70000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95df6000)
/lib64/ld-linux-x86-64.so.2 (0x000000552aaaa000)
[0942][j...@jasper:~]$
> Based on that I'll likely ask you to do ldd on parts of Python
> installation as well.
Will do. Just let me know what you need to see.
> Graham
Thanks so much for your help!
Joann
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.