Not a bug

Provide statically linked linux builds

Jeremy Bush 12 years ago updated by Jon Skinner 12 years ago 9
ST2 is dynamically linked against libpng12.so.0. I have libpng installed on my gentoo system, but it still complains it's missing.

There should be a statically linked build provided.


Not a bug
libpng1.2 is brought in by the version of GTK that I compile against. Unfortunately, as GTK is LGPL licensed, I'm unable to compile it statically.

Not a bug
libpng1.2 is brought in by the version of GTK that I compile against. Unfortunately, as GTK is LGPL licensed, I'm unable to compile it statically.

So, anyone not using the same versions as you are screwed? :)

Any idea how I can get it to work?

I have Gentoo too: there is an easy fix!

Gentoo provides slots for having multiple versions of a package installed at once. I assume the libpng you have at the moment is version 1.5.x - an up-to-date version. To get the old one (1.2.x), type

sudo emerge libpng:1.2

This will install the older version, which provides libpng12.so.0, side-by-side to the newer version.

Actually, you can legally link statically a release with GTK and make it available, even if it is LGPL. What you must do is to also provide the object files derivated from ST source code.

This is more work to do, but this would allow much more people using Linux to try ST. May be you can also just distribute the statically linked executable, and provide the obj files only on request (hoping that almost nobody will ask for it).

I personally have FC9 and I am a bit frustrated not to be able to test it.

By my reading, simply distributing the current non-statically-linked version of ST2 as well as a fully statically linked one would satisfy the requirements of the LGPL, i.e. you have provided means to run with alternative versions of those libraries. The only other change required would be more copyright notices in the About box.

I hate LGPL... it 'solves' a non-problem by introducing many real problems, and most devs who release code under it didn't bother to read it.
I am a long time UltraEdit user. I am on the fence, considering buying Sublime Text - mostly because of the forward thinking multi-platform licensing. I'd primarily use it on Windows but also some on Mac and RHEL5 (or 6?), but on my RHEL it tells me it cannot find GLIBCXX (3.4.11/3.4.9) and GLIBC (2.11). My sysadmin won't install these (or cannot?) and I tried compiling them myself with no luck. A statically linked version should solve this, but until we upgrade our systems (not in the near future) or a version of ST2 is available, I am out of luck. Sadly, UEX (linux) does work for me but my lifetime UE-Windows license doesn't transfer to UEX (linux). So close yet so far.

I want to use Sublime Text on RHEL5 and will gladly pay $$ to do so.  But it needs to work on my system for which I don't have admin privileges.


 Yeah, unfortunately, I can't use Sublime as my primary editor because of this. I would gladly pay otherwise. Kind of frustrating since I like Sublime Text 2 so much.

An alternative would be to just provide a recent libpng12.so.0 with the binaries. You might have to use either gcc's -rpath option or LD_LIBRARY_PATH to make sublime_text pick up the new version. This should be compliant with LGPL, and since libpng does not have many dependencies, should also work on older systems.


@jason mansour -

No go on CentOS5 with just the libpng12.so.0 provided.  It fails with other libraries as well:

$ ./sublime_text 
./sublime_text: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./sublime_text)
./sublime_text: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./sublime_text)
./sublime_text: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by ./sublime_text)