Hi,
Coming from
here<https://groups.google.com/d/topic/web2py/aDtJAIbl_kg/discussion>, I
am trying to build mod_wsgi-3.3 but I get a very strange error:
/tmp/mod_wsgi-3.3 # ./configure
checking for apxs2... /usr/bin/apxs2
checking Apache version... 2.2.14
checking for python... /home/myuser/.virtualenvs/python2.7.2/bin/python
configure: creating ./config.status
config.status: creating Makefile
/tmp/mod_wsgi-3.3 # make
/usr/bin/apxs2 -c -I/usr/local/python/2.7.2/include/python2.7 -DNDEBUG
mod_wsgi.c -L/usr/local/python/2.7.2/lib
-L/usr/local/python/2.7.2/lib/python2.7/config -lpython2.7 -lpthread -ldl
-lutil -lm
/usr/share/apr-1.0/build/libtool --silent --mode=compile
--tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -DLINUX=2
-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apr-1.0
-I/usr/include/openssl -I/usr/include/xmltok -pthread
-I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0
-I/usr/local/python/2.7.2/include/python2.7 -DNDEBUG -c -o mod_wsgi.lo
mod_wsgi.c && touch mod_wsgi.slo
In file included from /usr/local/python/2.7.2/include/python2.7/Python.h:8,
from mod_wsgi.c:135:
/usr/local/python/2.7.2/include/python2.7/pyconfig.h:1155:1: warning:
"_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
from /usr/include/apr-1.0/apr.h:131,
from /usr/include/apache2/ap_config.h:25,
from /usr/include/apache2/httpd.h:43,
from mod_wsgi.c:34:
/usr/include/features.h:158:1: warning: this is the location of the
previous definition
In file included from /usr/local/python/2.7.2/include/python2.7/Python.h:8,
from mod_wsgi.c:135:
/usr/local/python/2.7.2/include/python2.7/pyconfig.h:1177:1: warning:
"_XOPEN_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
from /usr/include/apr-1.0/apr.h:131,
from /usr/include/apache2/ap_config.h:25,
from /usr/include/apache2/httpd.h:43,
from mod_wsgi.c:34:
/usr/include/features.h:160:1: warning: this is the location of the
previous definition
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static
x86_64-linux-gnu-gcc -o mod_wsgi.la -rpath /usr/lib/apache2/modules
-module -avoid-version mod_wsgi.lo -L/usr/local/python/2.7.2/lib
-L/usr/local/python/2.7.2/lib/python2.7/config -lpython2.7 -lpthread -ldl
-lutil -lm
/usr/bin/ld: /usr/local/python/2.7.2/lib/libpython2.7.a(abstract.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making
a shared object; recompile with -fPIC
/usr/local/python/2.7.2/lib/libpython2.7.a: could not read symbols: Bad
value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
Just for reference, I am building with this fabfile, but this is actually
not very related to the problem:
from fabric.api import env, run, sudo, cd
from fabric.decorators import roles
env.roledefs.update({
'portal' : ['host1'],
})
env.use_ssh_config = True
env.user = 'myuser'
@roles('portal')
def install_wsgi():
sudo('apt-get install apache2-prefork-dev') # For apxs2
e = dict(wsgi_version = '3.3', python_location =
'/home/myuser/.virtualenvs/python2.7.2/bin/python')
with cd('/tmp'):
run('wget -nv
http://modwsgi.googlecode.com/files/mod_wsgi-{wsgi_version}.tar.gz'.format(**e))
run('tar xvfz mod_wsgi-{wsgi_version}.tar.gz'.format(**e))
with cd('/tmp/mod_wsgi-{wsgi_version}'.format(**e)):
run('./configure --with-python={python_location}'.format(**e))
#run('./configure')
run('make')
sudo('make install')
sudo('echo "LoadModule wsgi_module modules/mod_wsgi.so" >
{apachedir}/conf.d/wsgi.conf'.format(**env))
Can somebody provide some guidance?
Thanks,
Daniel Gonzalez
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/ylx5OpoZf68J.
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.