Home Download Buy Blog Forum Support

Startup problems (error loading packages) on fresh install

Startup problems (error loading packages) on fresh install

Postby jmansour on Wed Jan 09, 2013 2:03 pm

Hi,

I'm getting some wierd errors when starting Sublime Text (latest Version 2.0.1, 64 bit Linux). In the console:
'import site' failed; use -v for traceback

and then a popup:
Error loading syntax file "Packages/Text/Plain text.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/Text/Plain text.tmLanguage"

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):
Code: Select all
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
jmansour
 
Posts: 3
Joined: Wed Jan 09, 2013 1:47 pm

Re: Startup problems (error loading packages) on fresh install

Postby jmansour on Wed Jan 09, 2013 3:01 pm

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:
Code: Select all
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 :-)
Attachments
Screenshot-Hooray! • - Sublime Text 2 (UNREGISTERED).png
Screenshot-Hooray! • - Sublime Text 2 (UNREGISTERED).png (25.58 KiB) Viewed 2168 times
jmansour
 
Posts: 3
Joined: Wed Jan 09, 2013 1:47 pm

Re: Startup problems (error loading packages) on fresh install

Postby area on Thu Jun 20, 2013 10:42 am

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

Code: Select all
import os

in the terminal, and then try and run something like
Code: Select all
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,
Code: Select all
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 (http://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.
area
 
Posts: 1
Joined: Thu Jun 20, 2013 10:33 am

Re: Startup problems (error loading packages) on fresh install

Postby yitzhakbg on Fri Jul 12, 2013 9:30 am

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...
yitzhakbg
 
Posts: 2
Joined: Tue Mar 05, 2013 3:46 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 15 guests