compiling with different version of glibc

I have a linux system, think it is isolinux, which is a stripped down version of slackware 8.1. I want to compile binaries to run on it, but it is a specialized system that is functioning as an access point so I can't do development on it. I have a slackware 9.1 machine that I use to do development on. But when I transfer the binaries to the other system, I get this error:

 /lib/ version `GLIBC_2.3.2' not found

How can I compile my programs so that they will run on the other system?

Who is Participating?
ttimonenConnect With a Mentor Commented:
Alternatively you can:
-use '-static' flag when compiling the binaries. Then the binaries are somewhat larger, but don't depend on glibc.

-Update the glibc and friends in slack8.1 system.

-Build a chroot environment to slack8.1 system where to run this binary. Alternatively you can override the libc reading path by using LD_LIBRARY_PATH environment variable (see man for details)

-Or you can build a chroot environment to your slack9.1 system where to compile these binaries.

-L /path/to/transferred binaries

as comand line argument to gcc

add the directory where you have transferred the slackware binaries in  /etc/ and run ldconfig

do the above two one after another if you havent already done so
dignifiedAuthor Commented:
-static in LD_FLAG in the make file seemed to work fine.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.