Fix Eclipse (luna/mars/neon) display on Ubuntu 14.04 and newer

Update: This ‘trick’ still works for newer versions of Eclipse (e.g. mars, neon, oxygen) and Ubuntu versions (14.10, 15.04, 15.10, 16.04, 16.10). I’m using ‘rolling’ updates so I’ve tested most versions mentioned above.

I recently installed Eclipse ‘Luna’ on an Ubuntu 14.04 system and encountered a few display issues. Eclipse was rendered unusable for some GTK reasons…

It took me a while to find a somewhat related blog post that led me to a solution for the missing views and errors when starting Eclipse.

In case of starting Eclipse from a console two environment variables need to be set in advance  to avoid a corrupted Eclipse window:

export SWT_GTK3=0

In my case I created a desktop entry ~/.local/share/applications/eclipse.desktop to facilitate the startup. Adapt it to your needs:

[Desktop Entry]
Comment=Eclipse IDE
Exec=env UBUNTU_MENUPROXY=0 SWT_GTK3=0 /home/kai/eclipse/eclipse

Resolving Eagle CAD dependency problems under Ubuntu

This is a short post which I’ve made to show you how to fix dependeny problems of Eagle CAD under a 64-bit Ubuntu distribution. The current installer (Eagle CAD 6.4) works quite well under a 32-bit Ubuntu 12.04, 12.10 and 13.04 distribution. The eagle binary is linked against 32-bit libraries, so installing “all possible” 32-bit libs might be a possible (but uncomfortable) solution. This can actually be done by installing two packages:

sudo apt-get install ia32-libs lib32z1

A nicer way would be installing only the required libraries. The installer does not help you finding missing dependencies, so you have to actually extract the eagle binary by hand to inspect it. This can be done by modifying the installer or even faster by extracting the compressed files out of the installation script. I’ve prepared a short (compact) video tutorial on of the actual process. It’s my first video tutorial so please be indulgent. 😉

HowTo: Running Eagle CAD 6.2 on Ubuntu 12.04/12.10/13.04

Update: Eagle CAD version 6.4 is available which runs fine on Ubuntu 12.04., Ubuntu 12.10 and Ubuntu 13.04. I’ve made a small tutorial on how to fix possible dependency problems with this new version.

Ubuntu 12.04 only provides an older version of Eagle CAD, version 5.12.0 to be exact. A newer version 6.2 (32 bit) is available for download, but the installation fails due to the lack of a 32 bit libpng-1.4 library:

error while loading shared libraries: cannot open shared object file: No such file or directory.

Luckily, I found a detailed post at raek’s blog which covers older Ubuntu versions. Great parts of the following instruction were taken from this post and adapted for Ubuntu 12.04. Thanks!

First of all you need to install some packages to build the missing png library. Open a terminal window and enter on a 32 bit Ubuntu 12.04:

sudo apt-get install build-essential perl
sudo apt-get install zlib1g zlib1g-dev

On a 64 bit Ubuntu 12.04:

sudo apt-get install build-essential perl gcc-multilib
sudo apt-get install ia32-libs lib32z1 lib32z1-dev

Then you need to fetch the libpng source code and the Eagle CAD 6.2 installer, either with “wget” (as I have done it) or directly from the respective webpages. A current version of Eagle CAD is available for download here:
libpng 1.4 can be found on this page:
I will use the “/tmp/libpng-eagle” directory for building the library:

mkdir /tmp/libpng-eagle
cd /tmp/libpng-eagle
tar xvfz libpng-1.4.12.tar.gz
cd libpng-1.4.12/
./configure --prefix=/tmp/libpng-eagle/install CFLAGS=-m32
make check
make install

At this point I assume that your Eagle CAD installation will be located at “/home/$USER/eagle-6.2.0“. If not, simply adjust the location in the text below:

cd /tmp/libpng-eagle/install/lib/
mkdir -p /home/$USER/eagle-6.2.0/lib
cp -a* /home/$USER/eagle-6.2.0/lib/

Now the installer should run…

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib/
cd /tmp/libpng-eagle/
chmod 755

After the installation finishes, Eagle CAD will still not run unless you tell it where to find the png library we have just created. The easiest way to do this is by creating an executable start-up shell script (e.g. /home/$USER/eagle-6.2.0/ which contains the following commands:

export LD_LIBRARY_PATH=/home/$USER/eagle-6.2.0/lib

Additionally, you could create a Unity/Gnome menu entry, for example “/home/$USER/.local/share/applications/eagle.desktop
(do not forget to adapt the $USER):

#!/usr/bin/env xdg-open

[Desktop Entry]
Comment=Eagle CAD

Update: A friend told me that the installation procedure also works with Ubuntu 11.10.