Sublime Forum

Startup problems (error loading packages) on fresh install

#1

Hi,

I’m getting some wierd errors when starting Sublime Text (latest Version 2.0.1, 64 bit Linux). In the console:

and then a popup:

and the Window is all glitchy with no menubar and invisible tabs.

I have to say that I’m trying to run ST in an unusual configuration. I have CentOS 5.8 at work, under which it usually doesn’t start. So I’ve compiled the glibc (2.16.0) and the whole gtk+ stack (gtk+2.24.13), and start it via ld-linux (so it picks up the correct glibc):

LANG=C LD_LIBRARY_PATH=$HOME/software/glibc-2.16.0/lib:$HOME/software/glibc-2.16.0/lib64:/lib64:/lib:/usr/lib  $HOME/software/glibc-2.16.0/lib/ld-linux-x86-64.so.2  ./sublime_text

This looks a bit wierd, but it works, and I can get various programs to run. However, I’m assuming there is a problem with the builtin python - my system is lacking some library that it needs to process the plugins. Do you have any idea what could be missing, or what I could try next?

It would be really cool if I could get this to work. There is quite some demand for running ST on older Linuxes (see the UserEcho site), as many of us are stuck with them at work.

By the way, the following people also get the second error message (on Windows XP):
viewtopic.php?f=3&t=7138&p=30288&hilit=error+parsing+plist+xml#p30288
viewtopic.php?f=3&t=6797&p=28947&hilit=error+parsing+plist+xml#p28947

thanks,
Jason

0 Likes

#2

Nevermind, figured it out. The way I was starting ST was confusing it. I think it mistook the dynamic linker ld-linux.so for itself, and then looked for it’s files in $HOME/software/glibc-2.16.0/lib (found that using strace). The dirty solution was to link all of STs files into that directory:

for file in *; do ln -s "$PWD/$file" $HOME/jmansour/software/glibc-2.16.0/lib -f; done

Now it seems to run fine. No glitches and nothing. I’ll test it a bit more, and if it doesn’t break anything, I’ll probably release the binaries if someone else wants to use them.

There are just a couple of obstacles left:

  1. I’d like it to work without the link trick. I guess I’ll have to write some small wrapper that starts sublime_text
  2. I’m not sure my libraries would work on other computers with different paths, have to try that out.
  3. Trim it down to only the neccessary libs, and package it nicely :smile:

0 Likes

#3

I managed to get as far as this myself, then found this, only to find that you’d not found a workaround for the ‘dirty’ symlinking. Did you (or anyone else?) manage to create a suitable wrapper script?

While the editor surely works in this way, there are still a couple of problems I’ve encountered. If you

import os

in the terminal, and then try and run something like

os.system('ls')

Then you get ‘11’ returned - i.e. a segfault. This is stopping some of my usual plugins from working correctly, as they’re unable to interact with anything outside of Sublime - curl, wget, or running external scripts don’t work. However,

os.listdir('./')

returns correctly, as expected. I’m guessing it’s something to do with the C system call, which os.system uses, in the GLIBC version I’ve compiled just for Sublime, but I’m damned if I can figure out where to go from here. If you, or anyone else stumbles across this, I’d be eager to hear your thoughts!

EDIT: You can avoid the dirty linking by using PatchELF (nixos.org/patchelf.html) to edit the linker that sublime_text uses. sublime_text then is able to find itself and not the linker, and everything works fine (save for the issues I’m reporting above, which are unfortunately still extant.

0 Likes

#4

I think I have the same problem. It shows loading some of the plugins (only some, not others) but they don’t appear.
Tried:

import os
os.system(‘ls’)
0

os.listdir(’./’)
‘Icon’, ‘Packages’, ‘crash_reporter’, ‘changelog.txt’, ‘sublime_plugin.py’, ‘sublime_text’, ‘python3.3.zip’, ‘sublime.py’, ‘plugin_host’]

os.system(‘ls .’)
0

os.system(‘pwd’)
0

I suspect it might have something to do with multi-arch, but I’m no great expert at using the linker.

Kindly assist…

0 Likes

#5

@jmansour, I know this is an old thread, but I am running into exactly the same problem trying to run ST3 on CentOS 5. Did you ever get this working, and if so, have you a simple set of instructions on how you did it please?

Thx.

0 Likes