Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When i do "make" in mod_wsgi folder i get this error

I configured using following

./configure --with-apxs=/usr/local/apache/bin/apxs   --with-python=/opt/python27/bin/python

/usr/bin/ld: /opt/python27/lib/libpython2.7.a(node.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /opt/python27/lib/libpython2.7.a: could not read symbols: Bad value collect2: ld returned 1 exit status apxs:Error: Command failed with rc=65536

This link has the solution but i could not understand it fully

1)How can i found that i have compiled x32bit or x64 bit version of python 
2)I didn't understand about what symbolic link he was talking about
share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

The important bit is to rebuild Python with --enable-shared. The symlink comments are not relevant if you haven't done that and should't even apply with recent Python/mod_WSGI versions.

share|improve this answer
1  
I tried that , i reinstalled with --enabled shared and same thing happens . how can i check that if enabled shared actually installed or not. i did this ./configure --prefix=/opt/python27 --enable-shared is there any way to confirm that –  Mirror51 May 25 '11 at 4:37
1  
You should see a libpython2.7.so in the /opt/python2.7/lib or /opt/python2.7/lib/python2.7/config directory. –  Graham Dumpleton May 25 '11 at 7:14
    
I could not found that file i can see this file in both locations libpython2.7.a . If file is not there does it means that i have to recompile python again. i remembered i used --enabled shared option –  Mirror51 May 25 '11 at 7:31
2  
It means that what was installed didn't have shared library support enabled when it was built. Ensure that when you rebuild that you run 'make distclean' first before running 'configure' again and include '--enable-shared' in the options to 'configure'. You might even rename '/opt/python2.7' to '/opt/python2.7.static' while you do it to ensure that it recreates it and that installed version not causing problems. –  Graham Dumpleton May 26 '11 at 7:03
    
thanks graham , mod_wsgi is installed now. i din't knew i had to use make distclean thanks –  Mirror51 May 26 '11 at 8:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.