Skip to main content
  1. My Blog posts/

How to run Pharo 3.0 on top of Linux 64 bits

·421 words·2 mins·
medium
Víctor (Bit-Man) Rodríguez
Author
Víctor (Bit-Man) Rodríguez
Algorithm Junkie, Data Structures lover, Open Source enthusiast

How to run Pharo 3.0 on top of Linux 64 bits #

As some of you guys I tried and failed, and found a lot of recipes on how make it work but it were just recipes, meaning that a minimal change and the recipe will turn useless. I will try to be a bit more generic here.

Just to start let me tell you that I am currently using Linux MINT but the solution should apply for every Debian based Linux distribution. The same concepts apply for other non-Debian distribution but the command to be executed to install new packages, and even the package names, are different.

Basically after Pharo download and expansion in its destination folder, the first error pops up:

./pharo: line 34: bin/pharo: No such file or directory
It’s not that the file wasn’t there but pharo binary was compiled for 32 bits. Sadly there’s no Pharo 64 bits version (yet?).
To let the Pharo 32 bits compiled binary run on top of a 64 bits Linux the corresponding 32 bits libs must be installed. To verify it :
bin/pharo: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=f31881d89065e94ca3adbfca155f2b178ee8923b, not stripped

Then let’s take a look at what libraries does bin/pharo needs :

$ ldd bin/pharo
not a dynamic executable
Seems there’s a problem with ldd magic if the 32 bits libs are not installed. Let’s do it :
sudo aptitude install lib32z1 lib32ncurses5 lib32bz2–1.0
After this install there’s no missing libs for pharo executable


$ ldd bin/pharo  
linux-gate.so.1 (0xf774c000)  
libm.so.6 => /lib32/libm.so.6 (0xf76f1000)  
libdl.so.2 => /lib32/libdl.so.2 (0xf76ec000)  
libpthread.so.0 => /lib32/libpthread.so.0 (0xf76d1000)  
libc.so.6 => /lib32/libc.so.6 (0xf7521000)  
/lib/ld-linux.so.2 (0xf774d000)  

but on startup a different error is thrown:

$ ./pharo
could not find module vm-display-X11
Aborted

There’s a file named vm-display-X11 inside the bin folder than happens to be a 32 bits ELF executable binary dynamically linked. Let’s check its dependencies :

$ ldd bin/vm-display-X11  
linux-gate.so.1 (0xf7727000)  
libpthread.so.0 => /lib32/libpthread.so.0 (0xf76d9000)  
**libGL.so.1 => not found**  
**libX11.so.6 => not found**  
libc.so.6 => /lib32/libc.so.6 (0xf7529000)  

/lib/ld-linux.so.2 (0xf7728000)  
Lets’ install the X11 stuff

sudo aptitude install libx11–6:i386
and check again
$ ldd bin/vm-display-X11


    linux-gate.so.1 (0xf771a000)  
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76cb000)


libGL.so.1 => not found

libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7592000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf741d000)


    /lib/ld-linux.so.2 (0xf771b000)  
libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf73fb000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf73f6000)
libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf73f2000)
libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf73eb000)
Now it’s time for libGL :
sudo aptitude install libgl1-mesa-glx:i386

And finally I’m happy because… Pharo is working on my 64 bits Linux !!!!

no alternate text for image