title: Error: Command failed with rc=65536 python and mod_wsgi
body: <p>i'm having this problem:</p>
  <p>i'm runing pythonbrew to get python2.7, and so i re-compiled mod_wsgi to use the 2.7 python.</p>
  <p>to that end, i followed this tutorial:</p>
  <p>code.google.com/p/modwsgi/wiki/QuickInstallationGuide</p>
  <p>which involved  downloading the file - there is a tar.gz file i get - and then &quot;configuring it&quot; with  <code>./configure --with-python=/home/bharal/.pythonbrew/pythons/Python-2.7.2/bin/python --enable-shared</code></p>
  <p>now i'm assuming this is the right place to attach for my python - the value for with-python above is just  the response i get to a <code>which python</code></p>
  <p>OK! So, now the problem. After i run the configure above, i run <code>make</code> and i get:</p>
  <pre><code>/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/home/aiyer    /.pythonbrew/pythons/Python-2.7.2/lib -L/home/aiyer/.pythonbrew/pythons/Python-2.7.2/lib  /python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
  /usr/bin/ld: /home/bharal/.pythonbrew/pythons/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
  /home/aiyer/.pythonbrew/pythons/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
  </code></pre>
  <p>And i have no idea what to do. I came across this answer is SO:</p>
  <p><a href="https://stackoverflow.com/a/6118155/1061426">https://stackoverflow.com/a/6118155/1061426</a></p>
  <p>but this doesn't help me any much - it isn't as far as i can tell a series of steps, but more an interesting tidbit to think about.</p>
  <p>I ran this command to check if i have python 64 bit:</p>
  <pre><code>import sys
  print maxint
  </code></pre>
  <p>if 64 bit ==&gt; 9223372036854775807
  if 32 bit ==&gt; 2147483647</p>
  <p>ok, so i'm totes running 64bit because i get the bigger number. So i read this doco here:</p>
  <p><a href="http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages" rel="nofollow noreferrer">http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages</a></p>
  <p><em>because</em> i'm running the 64 bit python, does that <em>mean</em> that my problem isn't this:</p>
  <blockquote>
  <p>This error is believed to be result of the version of Python being used having been originally compiled for the generic X86 32 bit architecture whereas mod_wsgi is being compiled for X86 64 bit architecture. The actual error arises in this case because 'libtool' would appear to be unable to generate a dynamically loadable module for the X86 64 bit architecture from a X86 32 bit static library.</p>
  </blockquote>
  <p>but rather this?</p>
  <blockquote>
  <p>Alternatively, the problem is due to 'libtool' on this platform not being able to create a loadable module from a X86 64 bit static library in all cases.</p>
  </blockquote>
  <p>(the above quotes from the above link)</p>
  <p>and if <em>that</em> is the case, what the heck do i do? I haven't the foggiest notion what to do in <em>either</em> scenario - and yes, i read the rest of that page, but it might as well have been written in greek ( i don't speak greek ).</p>
  <p>any suggestions?</p>
  <p>UPDATE:
  i never fixed this and ended up using the python my ubuntu came with - no difference from the running of my code's point of view.</p>