> On 27 Jan 2016, at 12:20 PM, 温明超 <[email protected]> wrote:
> 
>  Hi,
> 
> When I install mod_msgi on Centos7 with command pip install mod_msgi, an 
> error was reported as the following infomation. 
> Could you help solve this problem?
> 
> 
> 
> gcc -pthread -shared build/temp.linux-x86_64-3.5/src/server/wsgi_buckets.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_restrict.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_stream.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_convert.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_apache.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_daemon.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_logger.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_validate.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_metrics.o 
> build/temp.linux-x86_64-3.5/src/server/mod_wsgi.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_interp.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_server.o 
> build/temp.linux-x86_64-3.5/src/server/wsgi_memory.o -o 
> build/lib.linux-x86_64-3.5/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so
>  -L/usr/local/lib -L/usr/local/lib/python3.5/config-3.5m -lpython3.5m
>     /usr/bin/ld: /usr/local/lib/libpython3.5m.a(abstract.o): relocation 
> R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a 
> shared object; recompile with -fPIC
>     /usr/local/lib/libpython3.5m.a: could not read symbols: Bad value
>     collect2: error: ld returned 1 exit status
>     error: command 'gcc' failed with exit status 1
> 
>     ----------------------------------------
> Command "/usr/local/bin/python3.5 -u -c "import setuptools, 
> tokenize;__file__='/tmp/pip-build-03f5xxo4/mod-wsgi/setup.py';exec(compile(getattr(tokenize,
>  'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
> install --record /tmp/pip-l0p4prnj-record/install-record.txt 
> --single-version-externally-managed --compile" failed with error code 1 in 
> /tmp/pip-build-03f5xxo4/mod-wsgi

Likely issue is that your custom Python installation when configured during 
install, did not have ‘—enable-shared’ supplied to the ‘configure’ script in 
the Python source code.

This is indicated by the 'can not be used when making a shared object; 
recompile with -fPIC’ error and the fact that it is trying to link 
'/usr/local/lib/libpython3.5m.a’ which is not a shared library.

So you will need to reinstall your Python installation such that it has a 
shared library.

I have written a lot of stuff about doing Python installations from source code 
in:

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

Graham


-- 
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.

Reply via email to