Our package management system allows appending to path variables when packages are being set up. I used this functionality to set LD_LIBRARY_PATH.
Thanks again for your help! It’s much appreciated! Michael ------------------------------------------------------------------------ Michael Graber, PhD [email protected] On 15 December 2016 at 20:28:56, Graham Dumpleton ( [email protected]) wrote: Which of the two approaches did you use? Graham On 16 Dec 2016, at 3:11 AM, Michael Graber <[email protected]> wrote: Thanks Graham! All worked out fine now! Michael On Tuesday, December 13, 2016 at 12:05:21 AM UTC+1, Graham Dumpleton wrote: > > You can try setting it as environment variable on the Docker image itself. > > ENV LD_LIBRARY_PATH=/eeups/eups/packages/Linux64/modWSGI/4.5. > 7+0/lib/python2.7/site-packages/mod_wsgi_httpd-2.4. > 23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/lib > > On a Mac with the equivalent of DYLD_LIBRARY_PATH that will not work > though as for Mac at least it will not pass DYLD_LIBRARY_PATH through to > scripts properly. Only option on Mac in this situation is to use envvars > file. Am not sure what will happen on Linux. > > It still shouldn’t be required if you are relocating packages as the path > should be encoded into the binaries. You could also try setting: > > export LD_RUN_PATH=/eeups/eups/packages/Linux64/modWSGI/4.5. > 7+0/lib/python2.7/site-packages/mod_wsgi_httpd-2.4. > 23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/lib > > when building/installing the packages. The setup.,py script should already > do that for your, to at least for path where it believes things are > installed to. > > Graham > > > On 13 Dec 2016, at 2:03 AM, Michael Graber <[email protected]> wrote: > > ok, great! like this it now seems to work properly: > > > [eyoups@18fd7fd781bf ~]$ cat envvars > LD_LIBRARY_PATH=/eeups/eups/packages/Linux64/modWSGI/4.5. > 7+0/lib/python2.7/site-packages/mod_wsgi_httpd-2.4. > 23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/lib > export LD_LIBRARY_PATH > [eyoups@18fd7fd781bf ~]$ mod_wsgi-express start-server --envvars-script > envvars > Server URL : http://localhost:8000/ > Server Root : /tmp/mod_wsgi-localhost:8000:1000 > Server Conf : /tmp/mod_wsgi-localhost:8000:1000/httpd.conf > Error Log File : /tmp/mod_wsgi-localhost:8000:1000/error_log (warn) > Environ Variables : /home/eyoups/envvars > Request Capacity : 5 (1 process * 5 threads) > Request Timeout : 60 (seconds) > Startup Timeout : 15 (seconds) > Queue Backlog : 100 (connections) > Queue Timeout : 45 (seconds) > Server Capacity : 20 (event/worker), 20 (prefork) > Server Backlog : 500 (connections) > Locale Setting : en_US.UTF-8 > > [eyoups@18fd7fd781bf ~]$ ls -la /tmp/mod_wsgi-localhost\:8000\:1000/ > total 60 > drwxr-xr-x 4 eyoups users 4096 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> . > drwxrwxrwt 9 root root 4096 Dec 7 14:02 > <http://airmail.calendar/2016-12-07%2014:02:00%20GMT+1> .. > -rwxr-xr-x 1 eyoups users 2898 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> apachectl > -rw-r--r-- 1 eyoups users 1007 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> default.wsgi > -rw-r--r-- 1 eyoups users 24 Dec > <http://airmail.calendar/2016-12-24%2012:00:00%20GMT+1> 8 07:51 > <http://airmail.calendar/2016-12-12%2007:51:00%20GMT+1> envvars > -rw-r--r-- 1 eyoups users 210 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> error_log > -rw-r--r-- 1 eyoups users 2973 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> handler.wsgi > drwxr-xr-x 2 eyoups users 4096 Dec 7 14:02 > <http://airmail.calendar/2016-12-07%2014:02:00%20GMT+1> htdocs > -rw-r--r-- 1 eyoups users 17321 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> httpd.conf > drwxr-xr-x 2 eyoups users 4096 Dec 7 14:02 > <http://airmail.calendar/2016-12-07%2014:02:00%20GMT+1> python-eggs > -rw-r--r-- 1 eyoups users 180 Dec 8 07:51 > <http://airmail.calendar/2016-12-08%2007:51:00%20GMT+1> resource.wsgi > -rw-r--r-- 1 eyoups users 0 Dec 7 14:02 > <http://airmail.calendar/2016-12-07%2014:02:00%20GMT+1> rewrite.conf > > > how can I now set LD_LIBRARY_PATH by default? > > thanks! > michael > > > > > On Thursday, December 8, 2016 at 8:45:15 AM UTC+1, Graham Dumpleton wrote: >> >> If you aren’t moving stuff after being installed, then it shouldn’t be >> needed. It should go to that directory anyway. >> >> That you have those libraries in system lib still may be confusing things >> though. >> >> As a first test, create a file called ‘envvars’. Add to it: >> >> LD_LIBRARY_PATH=/eeups/eups/packages/Linux64/modWSGI/4.5. >> 7+0/lib/python2.7/site-packages/mod_wsgi_httpd-2.4. >> 23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/lib >> export LD_LIBRARY_PATH >> >> Make sure that directories does have the libraries in it and I haven’t >> got it wrong. >> >> Then run mod_wsgi-express as: >> >> mod_wsgi-express start-server --envars-script envvars >> >> See if that works. >> >> Graham >> >> On 8 Dec 2016, at 6:40 PM, Michael Graber <[email protected]> wrote: >> >> >> By installing I mean running the entire build script from scratch. There >> are no ‘precompiled' files moved. >> >> Does the LD_LIBRARY_PATH need to be set in the build instructions, before >> installing mod_wsgi, after the mod_wsgi-httpd installation has been >> completed? >> >> >> >> >> On 8 December 2016 at 08:31:26, Graham Dumpleton ([email protected]) >> wrote: >> >> Two issues. >> >> By installing it at a different directory, finding of shared libraries >> for Apache will be broken as can’t rely on the path embedded in the >> executables. >> >> You have the system packages for APR and PCRE installed on the system, so >> those are being found instead of the desired ones. >> >> You would likely need to set LD_LIBRARY_PATH environment variable to: >> >> LD_LIBRARY_PATH=/eeups/eups/packages/Linux64/modWSGI/4.5. >> 7+0/lib/python2.7/site-packages/mod_wsgi_httpd-2.4. >> 23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/lib >> >> That way will look in directory where the shared libraries for the custom >> Apache are located. >> >> Graham >> >> On 8 Dec 2016, at 6:27 PM, Michael Graber <[email protected]> wrote: >> >> >> I installed mod_wsgi inside a docker container. Do do so I used our >> package management system, like any other user in our collaboration could >> do, directly on his/her machine. >> >> The path where the packages go is configurable by the user. In the case >> of the docker container we chose it to be /eeups/eups/packages/ .. >> >> Here is what you asked me to figure out: >> >> >> [eyoups@18fd7fd781bf ~]$ ldd /eeups/eups/packages/Linux64/ >> modWSGI/4.5.7+0/lib/python2.7/site-packages/mod_wsgi_httpd- >> 2.4.23.1-py2.7-linux-x86_64.egg/mod_wsgi_packages/httpd/bin/httpd >> linux-vdso.so.1 => (0x00007ffdaa2fc000) >> libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fa1ab212000) >> libaprutil-1.so.0 => /lib64/libaprutil-1.so.0 (0x00007fa1aafe8000) >> libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fa1aadbe000) >> libapr-1.so.0 => /lib64/libapr-1.so.0 (0x00007fa1aab8f000) >> librt.so.1 => /lib64/librt.so.1 (0x00007fa1aa986000) >> libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa1aa74f000) >> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa1aa533000) >> libdl.so.2 => /lib64/libdl.so.2 (0x00007fa1aa32e000) >> libc.so.6 => /lib64/libc.so.6 (0x00007fa1a9f6c000) >> libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fa1a9d67000) >> libdb-5.3.so => /lib64/libdb-5.3.so (0x00007fa1a99a8000) >> /lib64/ld-linux-x86-64.so.2 (0x00005570756a1000) >> libfreebl3.so => /lib64/libfreebl3.so (0x00007fa1a97a5000) >> >> >> Thanks, >> Michael >> >> >> >> >> On 8 December 2016 at 00:20:52, Graham Dumpleton ([email protected]) >> wrote: >> >> Are you changing the location of where it gets installed when inside of >> the docker container? >> >> What do you get for: >> >> ldd /eeups/eups/packages/Linux64/modWSGI/4.5.7+0/lib/python2.7/ >> site-packages/mod_wsgi_httpd-2.4.23.1-py2.7-linux-x86_64. >> egg/mod_wsgi_packages/httpd/bin/httpd >> >> Graham >> >> On 8 Dec 2016, at 1:08 AM, Michael Graber <[email protected]> wrote: >> >> >> ok, i added the re.escape(prefix) command into the setup.py of >> mod_wsgi-httpd. >> >> now it compiles! great! thanks for your support Graham! >> >> >> .. however, if I now use our package management system to install >> mod_wsgi including mod_wsgi-httpd inside a docker container (centos7 base >> image) everything installs properly, BUT if i test the installation with >> >> $ mod_wsgi-express start-server >> <div style="font-family: Helvetica, Arial; font-size: 13px; font-style: >> normal; font-weight: normal; letter-s >> >> -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
