Howdy! I’m trying to try out CodeIntel, but for some reason, it is trying to load the OS X versions of the prebuilt libraries and subsequently the CodeIntel plugin fails to initialize. I’m on an up-to-date Arch Linux x86-64 system, using the latest Sublime build and my copy of CodeIntel is at the latest commit (71cf6ae as of this writing). Here is the relevant bit of the log log from the Sublime console:
Reloading plugin /home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/python_codeintel.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 29, in reload_plugin
File "./python_codeintel.py", line 86, in <module>
from codeintel2.common import *
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/codeintel2/common.py", line 76, in <module>
import SilverCity
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/SilverCity/__init__.py", line 1, in <module>
import _SilverCity
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/SilverCity/_SilverCity.py", line 22, in <module>
from _macosx_universal._SilverCity import *
ImportError: /home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/_macosx_universal/_SilverCity.so: invalid ELF header
I’m really excited to get this working, as I’ll be able to switch from my comparatively uncomfortable gvim config!
TIA,
nerdshark
Edit: After hacking on SublimeCodeIntel/libs/SilverCity/_SilverCity.py and allowing the ImportError to be raised on import of the linux x86_64 libs, I discovered that something was trying to load a version of the pcre shared library that didn’t exist on my system.
Reloading plugin /home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/python_codeintel.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 29, in reload_plugin
File "./python_codeintel.py", line 86, in <module>
from codeintel2.common import *
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/codeintel2/common.py", line 76, in <module>
import SilverCity
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/SilverCity/__init__.py", line 1, in <module>
import _SilverCity
File "/home/nerdshark/.config/sublime-text-2/Packages/SublimeCodeIntel/libs/SilverCity/_SilverCity.py", line 10, in <module>
from _linux_libcpp6_x86_64._SilverCity import *
ImportError: libpcre.so.3: cannot open shared object file: No such file or directory
Creating a symlink from /usr/lib/libpcre.so to /usr/lib/libpcre.so.3 gets CodeIntel to load. Now, the question is, why is CodeIntel linking to a specific version of pcre? Wouldn’t it be better to link to the copy of the library that doesn’t have the version in its filename?