Because I have a MacBook Pro with Fusion and can run Mac OS 10.5, Windows XP, and Linux, I get to build and debug problems with our “One-Click” GemTools application package (the framework is based on a similar one-click for Seaside). This is a ZIP archive of a directory containing the pieces needed to run a Squeak application that acts as a client GUI for our GemStone server. In this capacity, I download the zip file onto three different platforms, unzip it, and try to run the application against a database server. There are, of course, variations from platform to platform, and each time something is changed we need to zip the revised package and download it to each platform and try to run it.
Anyway, one of the more complex problems has been providing a shared library built for each platform in the proper directory so the application can bind it to the running executable. We have a DLL for Windows, an SO for the Mac, and an SO for Linux. For the Mac and for Windows it is sufficient to have the shared library in the working directory (where the Squeak image file is located). For reasons I haven’t determined, on Linux we need to have the shared library in the working directory but we also need to have a symbolic link to the shared library in the directory holding the executable. (There are almost certainly other solutions, but I found something that works and just left it at that.)
Unfortunately, zipping and unzipping symbolic links is a bit less consistent than regular files. The zipping seems to work okay using a “-y” command-line argument. The unzipping process is one over which we have less control since that will be done by our users, and herein lies our tale.
For our VMware Virtual Appliance, our local Linux guru has created a Ubuntu system and the default tool for opening ZIP files is File Roller 2.20.1 (an archive manager for GNOME). After downloading the GemTools.zip there are at least two ways to unzip the archive. If you right-click on the zip file and select the menu item “Extract Here” then the directory structure is recreated correctly, including a symbolic link from one directory to another.
If, on the other hand, you double click on the zip file to open the archive and then drag the application folder out to the desktop (or right-click here and select “Extract…”), then the resulting folder will not be correctly created. Specifically, the symbolic link will be missing. In that case, when you launch the application and attempt to log in to the database, you will get an error “Unable to find function address” because the shared library is not in the working directory (adjacent to the image).
The easiest thing is to unzip things so that the symbolic link is preserved. Another solution is to create a symbolic link manually (ln -s source target). Following is a listing of what the Linux686 directory should contain.
glass@glass:~/Desktop/GemTools-2.3.1.app/Contents/Linux686$ ls -alF
drwxr-xr-x 2 glass glass 4096 2008-12-12 00:04 ./
drwxr-xr-x 5 glass glass 4096 2008-12-12 00:04 ../
-rwxr-xr-x 1 glass glass 22399 2008-04-28 00:00 AioPlugin*
lrwxrwxrwx 1 glass glass 27 2008-12-20 20:26 gciForLinux.so -> ../Resources/gciForLinux.so
-rwxr-xr-x 1 glass glass 17144 2008-04-28 00:00 npsqueak.so*
-rwxr-xr-x 1 glass glass 29128 2008-04-28 00:00 PseudoTTYPlugin*
-rwxr-xr-x 1 glass glass 2853195 2008-04-28 00:00 squeak*
-rwxr-xr-x 1 glass glass 167923 2008-04-28 00:00 Squeak3D*
-rwxr-xr-x 1 glass glass 91930 2008-04-28 00:00 UnixOSProcessPlugin*
-rwxr-xr-x 1 glass glass 87661 2008-04-28 00:00 vm-display-fbdev*
-rwxr-xr-x 1 glass glass 18363 2008-04-28 00:00 vm-display-null*
-rwxr-xr-x 1 glass glass 159358 2008-04-28 00:00 vm-display-X11*
-rwxr-xr-x 1 glass glass 36270 2008-04-28 00:00 vm-sound-ALSA*
-rwxr-xr-x 1 glass glass 12797 2008-04-28 00:00 vm-sound-null*
-rwxr-xr-x 1 glass glass 54917 2008-04-28 00:00 vm-sound-OSS*
-rwxr-xr-x 1 glass glass 21170 2008-04-28 00:00 XDisplayControlPlugin*
You could even just copy the file (not move it!) from the Resources directory to the Linux686 directory. Once that is done, you should be able to log in without the error. Let us know how it goes.