Graham:

I rebuilt Python 2.6.6 using the --enable-shared switch on config.
This produced /usr/local/lib/libpython2.6.so.1.0

I put a symlink in Python2.6/config libpython2.6.so.1.0 -> /usr/local/
lib/libpython2.6.so.1.0, right along side the static library.

But when I configure mod_wsgi, I get multiple errors complaining the
shared library cannot be found.

/usr/local/bin/python: error while loading shared libraries:
libpython2.6.so.1.0
: cannot open shared object file: No such file or directory

What am I doing wrong?
tnx
cmn



On Feb 7, 10:15 am, Graham Dumpleton <[email protected]>
wrote:
> Please keep discussion on the mailing list.
>
> On 8 February 2011 01:58, octopusgrabbus <[email protected]> wrote:
>
> > Graham:
>
> > My answer back to you was not intended to be flip. I looked at the
> > link you posted this morning, and cannot find the instructions to
> > rebuild Python on this 64-bit system. I have asked in a number of
> > places, including the Python forums. One of the answers I got back was
> > very flip, saying use twisted. I've really tried to get an answer or
> > re-installing Python and am running into a wall.
>
> Since your Python is installed under /usr/local/ and not /usr then it
> presumably was installed from source code. Look in the file:
>
>   /usr/local/lib/python2.6/config/Makefile
>
> and look for the value of the CONFIG_VARS variable. For example, of my
> MacOS X system (different to what you are using), it has:
>
> CONFIG_ARGS=     '--prefix=/usr' '--mandir=/usr/share/man'
> '--infodir=/usr/share/info' '--disable-dependency-tracking'
> '--enable-ipv6' '--with-threads'
> '--enable-framework=/System/Library/Frameworks'
> '--enable-toolbox-glue' '--enable-dtrace' '--with-system-ffi'
> '--with-gcc=gcc-4.2' 'CC=gcc-4.2' 'CXX=g++-4.2' 'CFLAGS=-g -Os -pipe
> -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
> -I/usr/include/ffi -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall
> -Wstrict-prototypes -Wshorten-64-to-32' 'LDFLAGS=-Wl,-F.'
>
> Thos arguments were what was originally supplied to the 'configure'
> script of Python when it was built from source code.
>
> Post what you find for those in your installation.
>
> What you would then do to duplicate same build, is to download Python
> source code tar ball fromwww.python.org. You go into the Python
> source tree after you unpack the tar ball. Normally, you would read
> the README which explains how to install Python from source code. The
> simple way in your case though is to just use the same options for
> 'configure' as CONFIG_VARS lists for YOUR existing installation,
> except that you MUST also add the '--enable-shared' option as well.
> You might also want to change the value of the '--prefix' option so it
> installs into different location in overwriting the existing Python
> installation would be a problem.
>
> Check the README in the Python source code for further details on how
> to install it.
>
> Graham
>
> > Thanks.
> > cmn
>
> > On Feb 7, 9:30 am, Graham Dumpleton <[email protected]>
> > wrote:
> >> Read:
>
> >>  http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bi...
>
> >> Solution is to use a Python installation that provides a shared library.
>
> >> Graham
>
> >> On 5 February 2011 03:06, octopusgrabbus <[email protected]> wrote:
>
> >> > I've run into a build problem, and am wondering about the best
> >> > solution for fixing it. This is an RHEL 5 WS system.
>
> >> > Here is the error from running make. ./configure completed fine.
>
> >> > /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o
> >> > mod_wsgi.la  -rpath /
> >> > usr/lib64/httpd/modules -module -avoid-version    mod_wsgi.lo -L/usr/
> >> > local/lib -
> >> > L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
> >> > /usr/bin/ld: /usr/local/lib/libpython2.6.a(node.o): relocation
> >> > R_X86_64_32 again
> >> > st `a local symbol' can not be used when making a shared object;
> >> > recompile with
> >> > -fPIC
> >> > /usr/local/lib/libpython2.6.a: could not read symbols: Bad value
> >> > collect2: ld returned 1 exit status
> >> > apxs:Error: Command failed with rc=65536
>
> >> > Your advice would be very much appreciated. I have mod_wsgi running on
> >> > Ubuntu, and I've got to say the operation over mod_python is well
> >> > worth the work. Thank you.
>
> >> > --
> >> > 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 
> >> > athttp://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