title: Vim error `undefined symbol: PyUnicodeUCS2_AsWideChar` after installing YouCompleteMe
body: <p>I'm trying to install <a href="https://github.com/Valloric/YouCompleteMe" rel="nofollow">YouCompleteMe</a> for Vim 7.4 with included patches 1-712 on Ubuntu 15.10.</p>
  
  <p>I have compiled YouCompleteMe by <a href="https://github.com/Valloric/YouCompleteMe#full-installation-guide" rel="nofollow">hand</a> since I encountered an error looking like this:</p>
  
  <pre><code>/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
  </code></pre>
  
  <p>As stated in the <a href="https://github.com/Valloric/YouCompleteMe#i-get-libpython27a--relocation-r_x86_64_32-when-compiling" rel="nofollow">FAQ Section</a>, adding <code>-DPYTHON_LIBRARY=/usr/lib/libpython2.7.so</code> will solve it. Therefore, compliled it with this instead:</p>
  
  <pre><code>cmake -G "Unix Makefiles" -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
  </code></pre>
  
  <p>then:</p>
  
  <pre><code>cmake --build . --target ycm_support_libs --config Release
  </code></pre>
  
  <p>I did not encountered any error while compiling this time but when I open Vim I, I see this instead:</p>
  
  <pre><code>   import ycm_client_support
                              ImportError: /home/austin/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_client_support.so: undefined symbol: PyUnicodeUCS2_AsWideChar
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
  Traceback (most recent call last):
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
    File "&lt;string&gt;", line 29, in &lt;module&gt;
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
    File "/home/austin/.vim/bundle/YouCompleteMe/autoload/../python/ycm/youcompleteme.py", line 32, in &lt;module&gt;
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
      from ycm.omni_completer import OmniCompleter
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
    File "/home/austin/.vim/bundle/YouCompleteMe/autoload/../python/ycm/omni_completer.py", line 22, in &lt;module&gt;
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPython:
  line   33:
      from ycmd.completers.completer import Completer
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPyth
  on:
  line   33:
    File "/home/austin/.vim/bundle/YouCompleteMe/autoload/../third_party/ycmd/ycmd
  /completers/completer.py", line 25, in &lt;module&gt;
  Press ENTER or type command to continue
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPyth
  on:
  line   33:
      from ycm_client_support import FilterAndSortCandidates
  Error detected while processing function youcompleteme#Enable..&lt;SNR&gt;64_SetUpPyth
  on:
  line   33:
  ImportError: /home/austin/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_client_
  support.so: undefined symbol: PyUnicodeUCS2_AsWideChar
  </code></pre>
  
  <p>Does anyone know how to fix this?</p>