ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just joined and I am impressed with the site. I am moderately experienced using linux, however not so experienced compiling on linux. I'm looking for information or a link to a tutorial about compiling against different versions of dependencies. Let me get specific. I am trying to compile clamav. I have an FC6 box which I am using for compiling, which has libc-2.5.so. I am wanting to make an rpm for an RHEL4 box, which has libc-2.3.4.so. I've successfully compiled and made the rpm package, but when I try to install it on the RHEL box, it says missing dependency: libc.so.6. The RHEL box has libc.so.6 pointing to the aforementioned libc-2.3.4 file. I have done searches on how to compile against different dependencies, but have not found what I need. Can anyone tell me how to do this, or point me to a tutorial/howto that explains how to do it?
Normally one keeps those dependencies in a separate directory and passes the linker a -L with the name of that directory. It isn't safe to link a program without the actual library in case the interfaces aren't compatible.
ta0kira
Ok, things complie but I can't get my rpm package to install on the other system. When I do an rpm -q --requires ..., it says that it requires libc.so.6(GLIBC_2.4) and rtld(GNU_HASH) among other things. The system ON which I am compiling has glibc-2.5 installed, while the system FOR which I am compiling has glibc-2.3.4. Also, it seems that rtld is provided with glibc2.4+. So, can I compile the code so that it does not require glibc2.4, but only requires the glibc2.3 that is installed on the target system, and if so how? Or am I missing something else?
First of all, the library name has little to do with the glibc version. The library name is merely an expression of the API version it implements and doesn't correlate to the package version except for that the library version never decreases when the package number increases. I wish I could help you with the rpm, but I've never made one before.
ta0kira
Maybe you could create a separate build chroot for your target by installing the whole toolchain into /some/dir? Or maybe take hints from DAG's site. He's one of those experienced RPM builders who makes RPM's for a variety of releases from RHEL-3 to F7 and he has some tools for doing that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.