The problem is that your Python installation was not configured to
install a shared library for Python. That is, when 'configure' was run
in Python source code when it was being installed, the
'--enable-shared' option was not used.

If you are using a binary Python installation then there isn't
anything you can do but complain to the people who make the binary
distribution.

If you compiled Python from source code, you need to reinstall it from
virgin source code (make distclean) and this time also use
'--enable-shared' when running 'configure' on Python source code
before running 'make'.

So, it is all about your Python installation. Once you have fixed the
Python installation, do a 'make distclean' in mod_wsgi source code and
try rebuilding it against the reinstalled Python.

Graham

On 9 July 2012 00:41, Alan Kesselmann <[email protected]> wrote:
> Hello.
>
> My long search
> (https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/bGuAfqa76W8,
> http://stackoverflow.com/questions/11382024/python-version-virtualenvwrapper-and-django)
> has brought me here. Long story short - it seems i need to install mod_wsgi
> for my 2nd python installation which is 2.7.3 ucs 2.
>
> What i did was:
> alan@alan:~/python/modwsgi$ wget
> http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
> --2012-07-08 17:33:27--
> http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz
> Resolving modwsgi.googlecode.com... 173.194.67.82, 2a00:1450:4001:c01::52
> Connecting to modwsgi.googlecode.com|173.194.67.82|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 117930 (115K) [application/x-gzip]
> Saving to: `mod_wsgi-3.3.tar.gz'
>
> 100%[==============================================================================>]
> 117,930      319K/s   in 0.4s
>
> 2012-07-08 17:33:28 (319 KB/s) - `mod_wsgi-3.3.tar.gz' saved [117930/117930]
>
> alan@alan:~/python/modwsgi$ tar xvfz mod_wsgi-3.3.tar.gz
> mod_wsgi-3.3/
> mod_wsgi-3.3/configure
> mod_wsgi-3.3/configure.ac
> mod_wsgi-3.3/LICENCE
> mod_wsgi-3.3/mod_wsgi.c
> mod_wsgi-3.3/posix-ap1X.mk.in
> mod_wsgi-3.3/posix-ap2X.mk.in
> mod_wsgi-3.3/README
> mod_wsgi-3.3/win32-ap22py26.mk
> mod_wsgi-3.3/win32-ap22py31.mk
> alan@alan:~/python/modwsgi$ cd mod_wsgi-3.3/
> alan@alan:~/python/modwsgi/mod_wsgi-3.3$ ./configure
> --with-python=/opt/bin/python
> checking for apxs2... /usr/bin/apxs2
> checking Apache version... 2.2.20
> configure: creating ./config.status
> config.status: creating Makefile
>
> And what i got was:
> alan@alan:~/python/modwsgi/mod_wsgi-3.3$ make
> /usr/bin/apxs2 -c -I/opt/include/python2.7 -DNDEBUG   mod_wsgi.c -L/opt/lib
> -L/opt/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/opt/include/python2.7 -DNDEBUG  -c -o mod_wsgi.lo mod_wsgi.c && touch
> mod_wsgi.slo
> In file included from /opt/include/python2.7/Python.h:8:0,
>                  from mod_wsgi.c:135:
> /opt/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE"
> redefined [enabled by default]
> /usr/include/features.h:163:0: note: this is the location of the previous
> definition
> /opt/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined
> [enabled by default]
> /usr/include/features.h:165:0: note: 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/opt/lib -L/opt/lib/python2.7/config
> -lpython2.7 -lpthread -ldl -lutil -lm
> /usr/bin/ld: /opt/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S
> against `_Py_NotImplementedStruct' can not be used when making a shared
> object; recompile with -fPIC
> /opt/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
>
> Can someone help me understand whats wrong here and tell me what do i need
> to do to get this stuff up and running for once :)
>
> Alan
>
> --
> 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/-/WC1J-sGDT_oJ.
> 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.

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

Reply via email to