Table of Contents
The easiest way to write programs to work under LRP is to use Debian 2.1 (Slink). This is because of several factors:
Debian 2.1 was the original base for LRP, and thus was modeled after it, and uses programs from it.
Debian 2.1 uses glibc 2.0.7 — which LRP needs — and not glibc 2.1.x.
Most LRP developers use Debian 2.1.
However, other systems and Linux distributions can be used. The only requirement is that compiled programs be linked against the GNU 2.0 C libraries, not the more current 2.1 version. This requires special attention and configuration for current Linux distributions.
The gcc How-to is most helpful. It is available at http://tldp.org/HOWTO/GCC-HOWTO/index.html.
Common problems include the following:
The standard development environment (Debian 2.1 or Red Hat 5.2) typically uses Linux 2.0; some programs require headers included in Linux 2.2 or better. This can be rectified by upgrading the kernel — usually not a problem.
LRP contains glibc 2.0.7; most modern programs are now compiled against glibc 2.1 or glibc 2.2 — much, much bigger libraries. This is a very big problem.
Sometimes a program's source relies on definitions found in glibc 2.1 or 2.2 header files but missing in glibc 2.0 header files, or located elsewhere in the glibc 2.0 header files, or defined differently. The worst possible result of this is that the sources cannot be compiled under glibc 2.0. This is the case for the new bridge utilities and others. Fortunately, this drastic result does not happen often.
Many networking programs use libpcap (the Packet Capture Library) and look for pcap.h in /usr/include; change the include files to look for pcap.h in /usr/include/pcap — make sure, of course, that you really do have libpcap first.