If you want to use the latest version of Atom as fetched by a fresh “git clone…”, yet not compromising a stable debian system, there is a way which I describe here. The steps are undeniably a bit more difficult than a “dpkg -i…” but they are easy and only needed once (except for step 4 which should be executed for each new build/install of the .deb package).
Please, note that the textual length of the steps are due to the verbosity I chose to give them. In fact, they are rather simple and short. For the impatient just skip the text and execute the commands, peeking at the text only when necessary to make the commands clearer.
So, here goes:
Step 1. Normal installation of the latest atom version from github:
Follow the instructions as outlined at Atom’s github repository (after installing the .deb package, it is normal not to be able to launch Atom). After building the .deb package and successfully installing it, you can use the script/clean script to clean up the unnecessary files.
Step 2. Safe installation of an acceptable version of eglibc as used by debian:
Assuming that the SVN client has been installed the following process is painless and quick (I found the following steps when I was looking for a solution at http:// www. reddit.com/ r/debian/comments/20mqd9/glibc_214_on_wheezy/):
sudo mkdir /opt/eglibc-2.19
sudo chown -R youruser:youruser /opt/eglibc-2.19
mkdir -p ~/tmp
svn co svn://svn.eglibc.org/branches/eglibc-2_19 eglibc-2.19
../libc/configure --prefix=/opt/eglibc-2.19 --enable-kernel=X.Y.Z # please, read below
Explanation of the X.Y.Z of the …/libc/configure step:
In order to be sure that the dynamic linker produced by the above will use the correct libraries, you should also specify the ABI version to use for the library. Since we are compiling it with the --prefix option, the ABI will be se to something lower than the one in the “normally” installed libc (see http://stackoverflow.com/questions/20577638/library-path-order-for-alternate-glibc-dynamic-linker-ld-so). As such, in order to produce the correct ordering in /opt/eglibc-2.19/etc/ld.so.cache, for the new dynamic linker, we need to specify the current ABI version as is the one in the normal libc.so.X, in our normal library path. In order to find the X.Y.Z for above, you can issue the following command:
This outputs something like:
/lib/x86_64-linux-gnu/libc-2.13.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[sha1]=0x08fce74425eb57654fe6af8ed4e5e57115f86de4, for GNU/Linux 2.6.26, stripped
The ABI version we need is 2.6.26, so the above becomes --enable-kernel=2.6.26
Step 3. Fix the new eglibc installation so that when using it’s dynamic loader, the rest of the libraries are found correctly:
Since the /opt/eglibc-2.19/etc/ld.so.conf does not exist by default you should create it placing the new /opt/eglibc-2.19/lib path at the top and then rest of the library paths as per the files in /etc/ld.so.conf.d/*.conf files.
# here, list all the other library paths as found in the
# .conf files of your /ect/ld.so.conf.d/*.conf files
# without sudo for extra security and since we own the /opt/eglibc-2.19
# file hierarchy and we shouldn't need to use sudo
Step 4. Patching /usr/share/atom/atom:
The last but most important step will allow invoking /usr/share/atom/atom (which is invoked when simply typing atom in the terminal) and any sub process it spawns, using the new dynamic linker under /opt. The steps are very easy to follow and are as such:
- download patchelf from http://nixos.org/patchelf.html
- untar, cd, ./configure, make and make install (it is painless)
- run the command: “patchelf --set-interpreter /opt/eglibc-2.19/lib/ld-2.19.so /usr/share/atom/atom”
From now on, simply running “atom” in the terminal should run atom without issues. If desired you can update the atom git repository and re-run the build/mkdeb cycle. The only extra step after every update is step 4 (patching /usr/share/atom/atom), for which a simple script can be created and run after each build/mkdeb cycle.
P.S.: Please, excuse my ommitting/mangling some urls but as a new user I cannot post more than two links in a post.