Q:

Run a C executable in another distro

I have a C program that I'm developing using Ubuntu 11.10 (Linux version 3.0.0-12-generic-pae kernel). I need to run that program in a cluster that has Debian 3.1 (Linux version 2.4.24-om2) installed, and uses Intel(R) Pentium(R) 4 CPU 3.20GHz processors.
The problem is that I can't compile in the Debian cluster because it doesn't have installed the GSL library that my program needs, and I don't know how to install it (or make use of it) without root privileges.
If I try to run the executable I compiled in Ubuntu (or a simple hello world program, for the case), it doesn't work, even if I compile using all the gcc options that this throws when executed on the cluster:
gcc --save-temps -fverbose-asm hello_world.c -o hello_world

When I try to execute my program compiled in Ubuntu, it throws:
floating point exception

Update: When I compile using the -static flag, the error I get is:
FATAL: kernel too old
Segmentation fault.

So can I do something better than re-implement all the functions of GSL that I'm using.

A:

At the end, I solved it compiling the GSL library without root privileges.
I uncompressed the sources in a folder in the home directory, created a _build directory, and  ran ../configure, and then make.
I copied the files of the .libs directory that was created inside _build in a new ~/path/lib directory, and used:
find -name "*.h" -type f -exec cp {} ~/path/include/gsl \;

To copy all the header files generated in the GSL source folder (surely there was a better way to do that).
I then tried to set the environment variables for gcc (C_INCLUDE_PATH, LIBRARY_PATH) but for some reason I wasn't able to save them (used and export, tried to change them in the ~/profile and ~/.bash_profile files). 
So, I used the -I and -L gcc options to link the two folders. It worked this way.

