Re: [modwsgi] mod_wsgi and Apache 2.4 on Centos 6.8 - undefined symbol: ap_accept_lock_mech

2017-11-09 Thread Graham Dumpleton
The --enable-shared option only relates to Python installation, not Apache. The 
option would have been ignored by Apache configure script, if it didn't 
actually error due to the unknown option.

Graham

> On 9 Nov 2017, at 10:38 pm, O haya  wrote:
> 
> Oops - I have one more question:  I think that in the attempt just made, I 
> had re-built the Apache and used the "--enable-shared" on the Apache 
> configure.  Is that (using --enable-shared) necessary when building the 
> Apache, in order for the mod_wsgi to work with the Apache?  I have to try 
> later tonight, but just was wondering if you knew the answer to that?
> 
> The reason for this question is I am pretty sure they don't use 
> "--enable-shared" when they build our Apaches.
> 
> Thanks for ALL of your help!
> 
> Jim
> 
> On Thursday, November 9, 2017 at 6:35:34 AM UTC-5, O haya wrote:
> Cool!  Worked!
> 
> On Wednesday, November 8, 2017 at 7:04:46 PM UTC-5, Graham Dumpleton wrote:
> Running 'python setup.py install' with APXS environment variable set should 
> also work.
> 
>> On 9 Nov 2017, at 11:03 am, O haya > wrote:
>> 
>> YES!!  That did it and I was able to start Apache 2.4.29 after I added:
>> 
>> LoadModule wsgi_module 
>> "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
>>  "
>> 
>> to the httpd.conf, and this was even without needing to export 
>> LD_LIBRARY_PATH!
>> 
>> 
>> Now that I was able to do that, do you think that if I had exported the APXS 
>> that I could've used:
>> 
>> python3.6 setup.py install
>> 
>> instead of the "pip3.6 install mod_wsgi"?
>> 
>> The reason I ask is that, at work, I don't think I'll be able to use pip3.6 
>> since it looks like it needs to connect out.
>> 
>> Thanks!
>> 
>> Jim
>> 
>> 
>> 
>> On Wednesday, November 8, 2017 at 6:38:40 PM UTC-5, Graham Dumpleton wrote:
>> 
>>> On 9 Nov 2017, at 10:37 am, O haya gmail.com 
>>> > wrote:
>>> 
>>> Hi,
>>> 
>>> I got this when I ran that:
>>> 
>>> export AXPS=/apps/httpd-2.4.29/bin/apxs
>>> 
>>> pip3.6 install --no-cache-dir mod_wsgi
>>> Requirement already satisfied: mod_wsgi in 
>>> /apps/python-3.6.3/lib/python3.6/site-packages
>> 
>> Run:
>> 
>> pip uninstall mod_wsgi
>> 
>> first, or use:
>> 
>> pip3.6 install --no-cache-dir --update mod_wsgi
>> 
>>> 
>>> 
>>> On Wednesday, November 8, 2017 at 6:10:12 AM UTC-5, Graham Dumpleton wrote:
>>> Do not use code.google.com  site for docs. The 
>>> docs can be found by going to www.modwsgi.org .
>>> 
>>> For creating a working Python installation read:
>>> 
>>> 
>>> http://blog.dscpl.com.au/2015/06/installing-custom-python-version-into.html 
>>> 
>>> 
>>> Ignore that it talks about Docker. Information still relevant.
>>> 
>>> Your 'ap_accept_lock_mech' issue is then likely due to using the wrong apxs 
>>> program for the Apache install you want to use.
>>> 
>>> Find the 'apxs' program for the Apache you want to use and then run 'pip' 
>>> as:
>>> 
>>> APXS=/some/path/apxs pip install --no-cache-dir mod_wsgi 
>>> 
>>> You likely have a broken mod_wsgi compiled version cached and need for it 
>>> to be skipped.
>>> 
>>> Graham
>>> 
 On 8 Nov 2017, at 5:17 pm, O haya gmail.com 
 > wrote:
 
 Oh oh, problem :(
 
 I added:
 
 LoadModule wsgi_module 
 "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
  "
 
 to the new Apache 2.4.29 httpd.conf and then tried to start the Apache and 
 I think that I am back to the same error from before:
 
 [oracle@apache1 bin]$ /apps/httpd-2.4.29/bin/apachectl start
 httpd: Syntax error on line 168 of /apps/httpd-2.4.29/conf/httpd.conf: 
 Cannot load 
 /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
   into server: 
 /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so
  : undefined 
 symbol: ap_accept_lock_mech
 
 
 :(  ???
 
 Jim
 
 
 
 
 On Wednesday, November 8, 2017 at 1:08:53 AM UTC-5, O haya wrote:
 Ok, I am re-reading your page:
 
 https://code.google.com/archive/p/modwsgi/wikis/InstallationIssues.wiki 
 
 
 When I read before, I couldn't find any "config" directory under my new 
 python dir, but I think that you mean this directory?
 
 [root@apache1 

Re: [modwsgi] mod_wsgi and Apache 2.4 on Centos 6.8 - undefined symbol: ap_accept_lock_mech

2017-11-09 Thread O haya
Oops - I have one more question:  I think that in the attempt just made, I 
had re-built the Apache and used the "--enable-shared" on the Apache 
configure.  Is that (using --enable-shared) necessary when building the 
Apache, in order for the mod_wsgi to work with the Apache?  I have to try 
later tonight, but just was wondering if you knew the answer to that?

The reason for this question is I am pretty sure they don't use 
"--enable-shared" when they build our Apaches.

Thanks for ALL of your help!

Jim

On Thursday, November 9, 2017 at 6:35:34 AM UTC-5, O haya wrote:
>
> Cool!  Worked!
>
> On Wednesday, November 8, 2017 at 7:04:46 PM UTC-5, Graham Dumpleton wrote:
>>
>> Running 'python setup.py install' with APXS environment variable set 
>> should also work.
>>
>> On 9 Nov 2017, at 11:03 am, O haya  wrote:
>>
>> YES!!  That did it and I was able to start Apache 2.4.29 after I added:
>>
>> LoadModule wsgi_module 
>> "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
>> mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
>>
>> to the httpd.conf, and this was even without needing to export 
>> LD_LIBRARY_PATH!
>>
>>
>> Now that I was able to do that, do you think that if I had exported the 
>> APXS that I could've used:
>>
>> python3.6 setup.py install
>>
>> instead of the "pip3.6 install mod_wsgi"?
>>
>> The reason I ask is that, at work, I don't think I'll be able to use 
>> pip3.6 since it looks like it needs to connect out.
>>
>> Thanks!
>>
>> Jim
>>
>>
>>
>> On Wednesday, November 8, 2017 at 6:38:40 PM UTC-5, Graham Dumpleton 
>> wrote:
>>>
>>>
>>> On 9 Nov 2017, at 10:37 am, O haya  wrote:
>>>
>>> Hi,
>>>
>>> I got this when I ran that:
>>>
>>> export AXPS=/apps/httpd-2.4.29/bin/apxs
>>>
>>> pip3.6 install --no-cache-dir mod_wsgi
>>> Requirement already satisfied: mod_wsgi in 
>>> /apps/python-3.6.3/lib/python3.6/site-packages
>>>
>>>
>>> Run:
>>>
>>> pip uninstall mod_wsgi
>>>
>>> first, or use:
>>>
>>> pip3.6 install --no-cache-dir --update mod_wsgi
>>>
>>>
>>>
>>> On Wednesday, November 8, 2017 at 6:10:12 AM UTC-5, Graham Dumpleton 
>>> wrote:

 Do not use code.google.com site for docs. The docs can be found by 
 going to www.modwsgi.org.

 For creating a working Python installation read:

 
 http://blog.dscpl.com.au/2015/06/installing-custom-python-version-into.html

 Ignore that it talks about Docker. Information still relevant.

 Your 'ap_accept_lock_mech' issue is then likely due to using the wrong 
 apxs program for the Apache install you want to use.

 Find the 'apxs' program for the Apache you want to use and then run 
 'pip' as:

 APXS=/some/path/apxs pip install --no-cache-dir mod_wsgi 

 You likely have a broken mod_wsgi compiled version cached and need for 
 it to be skipped.

 Graham

 On 8 Nov 2017, at 5:17 pm, O haya  wrote:

 Oh oh, problem :(

 I added:

 LoadModule wsgi_module 
 "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
 mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"

 to the new Apache 2.4.29 httpd.conf and then tried to start the Apache 
 and I think that I am back to the same error from before:

 [oracle@apache1 bin]$ /apps/httpd-2.4.29/bin/apachectl start
 httpd: Syntax error on line 168 of /apps/httpd-2.4.29/conf/httpd.conf: 
 Cannot load /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
 mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so into server: 
 /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
 mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so: undefined symbol: 
 ap_accept_lock_mech


 :(  ???

 Jim




 On Wednesday, November 8, 2017 at 1:08:53 AM UTC-5, O haya wrote:
>
> Ok, I am re-reading your page:
>
> https://code.google.com/archive/p/modwsgi/wikis/InstallationIssues.wiki
>
> When I read before, I couldn't find any "config" directory under my 
> new python dir, but I think that you mean this directory?
>
> [root@apache1 config-3.6m-x86_64-linux-gnu]# pwd
> /apps/python-3.6.3/lib/python3.6/config-3.6m-x86_64-linux-gnu
> [root@apache1 config-3.6m-x86_64-linux-gnu]# ls -al
> total 15644
> drwxr-xr-x  2 root root 4096 Nov  8 00:43 .
> drwxr-xr-x 35 root root 4096 Nov  8 00:33 ..
> -rw-r--r--  1 root root 3302 Nov  8 00:33 config.c
> -rw-r--r--  1 root root 1621 Nov  8 00:33 config.c.in
> -rwxr-xr-x  1 root root 7122 Nov  8 00:33 install-sh
> -rw-r--r--  1 root root 15874060 Nov  8 00:33 libpython3.6m.a
> lrwxrwxrwx  1 root root   19 Nov  8 00:43 libpython3.so -> 
> ../../libpython3.so
> -rw-r--r--  1 root root67977 Nov  8 00:33 Makefile
> -rwxr-xr-x  1 root root 7521 Nov  8 00:33 makesetup
> -rwxr-xr-x  1 

Re: [modwsgi] mod_wsgi and Apache 2.4 on Centos 6.8 - undefined symbol: ap_accept_lock_mech

2017-11-09 Thread O haya
Cool!  Worked!

On Wednesday, November 8, 2017 at 7:04:46 PM UTC-5, Graham Dumpleton wrote:
>
> Running 'python setup.py install' with APXS environment variable set 
> should also work.
>
> On 9 Nov 2017, at 11:03 am, O haya  wrote:
>
> YES!!  That did it and I was able to start Apache 2.4.29 after I added:
>
> LoadModule wsgi_module 
> "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
> mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
>
> to the httpd.conf, and this was even without needing to export 
> LD_LIBRARY_PATH!
>
>
> Now that I was able to do that, do you think that if I had exported the 
> APXS that I could've used:
>
> python3.6 setup.py install
>
> instead of the "pip3.6 install mod_wsgi"?
>
> The reason I ask is that, at work, I don't think I'll be able to use 
> pip3.6 since it looks like it needs to connect out.
>
> Thanks!
>
> Jim
>
>
>
> On Wednesday, November 8, 2017 at 6:38:40 PM UTC-5, Graham Dumpleton wrote:
>>
>>
>> On 9 Nov 2017, at 10:37 am, O haya  wrote:
>>
>> Hi,
>>
>> I got this when I ran that:
>>
>> export AXPS=/apps/httpd-2.4.29/bin/apxs
>>
>> pip3.6 install --no-cache-dir mod_wsgi
>> Requirement already satisfied: mod_wsgi in 
>> /apps/python-3.6.3/lib/python3.6/site-packages
>>
>>
>> Run:
>>
>> pip uninstall mod_wsgi
>>
>> first, or use:
>>
>> pip3.6 install --no-cache-dir --update mod_wsgi
>>
>>
>>
>> On Wednesday, November 8, 2017 at 6:10:12 AM UTC-5, Graham Dumpleton 
>> wrote:
>>>
>>> Do not use code.google.com site for docs. The docs can be found by 
>>> going to www.modwsgi.org.
>>>
>>> For creating a working Python installation read:
>>>
>>> 
>>> http://blog.dscpl.com.au/2015/06/installing-custom-python-version-into.html
>>>
>>> Ignore that it talks about Docker. Information still relevant.
>>>
>>> Your 'ap_accept_lock_mech' issue is then likely due to using the wrong 
>>> apxs program for the Apache install you want to use.
>>>
>>> Find the 'apxs' program for the Apache you want to use and then run 
>>> 'pip' as:
>>>
>>> APXS=/some/path/apxs pip install --no-cache-dir mod_wsgi 
>>>
>>> You likely have a broken mod_wsgi compiled version cached and need for 
>>> it to be skipped.
>>>
>>> Graham
>>>
>>> On 8 Nov 2017, at 5:17 pm, O haya  wrote:
>>>
>>> Oh oh, problem :(
>>>
>>> I added:
>>>
>>> LoadModule wsgi_module 
>>> "/apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
>>> mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
>>>
>>> to the new Apache 2.4.29 httpd.conf and then tried to start the Apache 
>>> and I think that I am back to the same error from before:
>>>
>>> [oracle@apache1 bin]$ /apps/httpd-2.4.29/bin/apachectl start
>>> httpd: Syntax error on line 168 of /apps/httpd-2.4.29/conf/httpd.conf: 
>>> Cannot load /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
>>> mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so into server: 
>>> /apps/python-3.6.3/lib/python3.6/site-packages/mod_wsgi/server/
>>> mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so: undefined symbol: 
>>> ap_accept_lock_mech
>>>
>>>
>>> :(  ???
>>>
>>> Jim
>>>
>>>
>>>
>>>
>>> On Wednesday, November 8, 2017 at 1:08:53 AM UTC-5, O haya wrote:

 Ok, I am re-reading your page:

 https://code.google.com/archive/p/modwsgi/wikis/InstallationIssues.wiki

 When I read before, I couldn't find any "config" directory under my new 
 python dir, but I think that you mean this directory?

 [root@apache1 config-3.6m-x86_64-linux-gnu]# pwd
 /apps/python-3.6.3/lib/python3.6/config-3.6m-x86_64-linux-gnu
 [root@apache1 config-3.6m-x86_64-linux-gnu]# ls -al
 total 15644
 drwxr-xr-x  2 root root 4096 Nov  8 00:43 .
 drwxr-xr-x 35 root root 4096 Nov  8 00:33 ..
 -rw-r--r--  1 root root 3302 Nov  8 00:33 config.c
 -rw-r--r--  1 root root 1621 Nov  8 00:33 config.c.in
 -rwxr-xr-x  1 root root 7122 Nov  8 00:33 install-sh
 -rw-r--r--  1 root root 15874060 Nov  8 00:33 libpython3.6m.a
 lrwxrwxrwx  1 root root   19 Nov  8 00:43 libpython3.so -> 
 ../../libpython3.so
 -rw-r--r--  1 root root67977 Nov  8 00:33 Makefile
 -rwxr-xr-x  1 root root 7521 Nov  8 00:33 makesetup
 -rwxr-xr-x  1 root root 2050 Nov  8 00:33 python-config.py
 -rw-r--r--  1 root root10096 Nov  8 00:33 python.o
 -rw-r--r--  1 root root15322 Nov  8 00:33 Setup
 -rw-r--r--  1 root root  327 Nov  8 00:33 Setup.config
 -rw-r--r--  1 root root   41 Nov  8 00:33 Setup.local

 So I re-built Python 3.6.3, with the "--enable-shared" and I think I 
 figured out where the 'config' dir you were referring to (above).

 As you can see, I have now added a softlink for libpython3.so but now I 
 am still getting an error, even if run just "python3.6 -V":

 [root@apache1 config-3.6m-x86_64-linux-gnu]# python3.6 -V
 python3.6: error while loading shared libraries: