On 9 July 2012 21:39, Alan Kesselmann <[email protected]> wrote:
> Hmmm..
>
> ldd /opt/bin/python
>
> prints out :
> alan@alan:/opt/lib/python2.7$ ldd /opt/bin/python
> linux-vdso.so.1 =>  (0x00007fff4818c000)
> libpython2.7.so.1.0 => /opt/lib/libpython2.7.so.1.0 (0x00007f6bf236e000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f6bf212d000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6bf1d8b000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6bf1b87000)
> libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f6bf1984000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6bf16ff000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f6bf2748000)
>
> Idd .libs/mod_wsgi prints out
> ldd: .libs/mod_wsgi: No such file or directory

Sorry, should have been:

ldd .libs/mod_wsgi.so

That or run it on the installed mod_wsgi.so in Apache modules directory.

Graham

> and ldd mod_wsgi.so prints
> ldd: ./mod_wsgi.so: No such file or directory
>
> so things arent as rosy as i thought, eh?
>
> Alan
>
> On Monday, July 9, 2012 2:20:26 PM UTC+3, Graham Dumpleton wrote:
>>
>> Sort of looks like the virtual environment you are pointing mod_wsgi
>> at was constructed using Python 2.7.2 and not Python 2.7.3.
>>
>> Try some of the checks starting at:
>>
>>
>> http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library
>>
>> Graham
>>
>> On 9 July 2012 20:59, Alan Kesselmann <[email protected]> wrote:
>> > Awesome! Thanks Graham!
>> >
>> > Both modules installed successfully and virtualenv too. At first apache
>> > wouldnt start but after restarting computer it works too now.
>> >
>> > This didnt fix my original problem (
>> >
>> > http://stackoverflow.com/questions/11382024/python-version-virtualenvwrapper-and-django),
>> > but at least its working :)
>> >
>> > Thanks again :)
>> >
>> > Alan
>> >
>> >
>> > On Monday, July 9, 2012 1:04:14 PM UTC+3, Graham Dumpleton wrote:
>> >>
>> >> On 9 July 2012 18:37, Alan Kesselmann <[email protected]>
>> >> wrote:
>> >> > So let me get this straight so i dont do it rial and error way for 1
>> >> > hour:
>> >> >
>> >> > 1) unpack 2.7.3.
>> >> > 2 ) LD_RUN_PATH=/opt/lib
>> >> > 3) export $LD_RUN_PATH
>> >>
>> >> No '$'. Just:
>> >>
>> >> export LD_RUN_PATH
>> >>
>> >> Make sure also run at this point:
>> >>
>> >> make distclean
>> >>
>> >> to make sure you don't have any old build results laying around.
>> >>
>> >> > 4) ./configure --enable-shared --prefix=/opt --enable-unicode=ucs2
>> >> > 5) make
>> >> > 6 ) make install?
>> >>
>> >> And then in mod_wsgi source code:
>> >>
>> >> make distclean
>> >> ./configure --with-python=/opt/bin/python
>> >> make
>> >> make install
>> >>
>> >> If things worked properly, when you run:
>> >>
>> >> ldd /opt/bin/python
>> >> ldd .libs/mod_wsgi
>> >>
>> >> The latter in mod_wsgo source directory after 'make', then you should
>> >> see a dependency on your shared library and not the system one.
>> >>
>> >> > And yes - i have python 2.7.2 installed and im installing 2.7.3
>> >> > because
>> >> > i
>> >> > need ucs2 python for one precompiled library.
>> >> >
>> >> > Alan
>> >> >
>> >> >
>> >> > On Monday, July 9, 2012 11:29:02 AM UTC+3, Graham Dumpleton wrote:
>> >> >>
>> >> >> This is occurring because you have a Python 2.7 installed in a
>> >> >> system
>> >> >> location as well.
>> >> >>
>> >> >> Why aren't you using the system Python 2.7?
>> >> >>
>> >> >> To get around this issue, when building Python and also mod_wsgi.
>> >> >> Set:
>> >> >>
>> >> >>   LD_RUN_PATH=/opt/lib
>> >> >>   export LD_RUN_PATH
>> >> >>
>> >> >> This only needs to be set when they are compiled, not at run time.
>> >> >>
>> >> >> This will force each to look in /opt/lib for the shared library,
>> >> >> rather than giving precedence to the system wide Python.
>> >> >>
>> >> >> Graham
>> >> >>
>> >> >> On 9 July 2012 18:15, Alan Kesselmann <[email protected]>
>> >> >> wrote:
>> >> >> > Hi and thanks for reply.
>> >> >> >
>> >> >> > Can you give me exact order or things i need to do when
>> >> >> > installing?
>> >> >> >
>> >> >> > Im asking cause this --enable-shared is giving weird results if i
>> >> >> > do:
>> >> >> >
>> >> >> > things i such order:
>> >> >> > 1) uncompress the 2.7.3 package
>> >> >> > 2) ./configure --enable-shared --prefix=/opt --enable-unicode=ucs2
>> >> >> > 3) make
>> >> >> > 4) make install
>> >> >> >
>> >> >> > If i go to /opt/bin and type ./python then i get old python
>> >> >> > version
>> >> >> > (2.7.2)
>> >> >> > not new one.
>> >> >> >
>> >> >> > If i leave --enable shared out i get new 2.7.3 when i do ./python
>> >> >> > in
>> >> >> > /opt/bin
>> >> >> >
>> >> >> > Im new to all this thing and im only doing this compiling to get
>> >> >> > one
>> >> >> > library
>> >> >> > working with ucs2 python and django - so im not even what the hell
>> >> >> > is
>> >> >> > going
>> >> >> > on here :P
>> >> >> >
>> >> >> > alan
>> >> >> >
>> >> >> >
>> >> >> > On Monday, July 9, 2012 1:41:31 AM UTC+3, Graham Dumpleton wrote:
>> >> >> >>
>> >> >> >> 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 view this discussion on the web visit
>> >> >> > https://groups.google.com/d/msg/modwsgi/-/LwlAGvVWl7oJ.
>> >> >> >
>> >> >> > 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 view this discussion on the web visit
>> >> > https://groups.google.com/d/msg/modwsgi/-/XsORfi8IxG0J.
>> >> >
>> >> > 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 view this discussion on the web visit
>> > https://groups.google.com/d/msg/modwsgi/-/Fee3y7tKGdUJ.
>> >
>> > 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 view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/Q_lw-YbTai8J.
>
> 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