Problem with using new installed glibc library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a red hat 9.0 system which has glibc version 2.3.2-5 and default g++ version 3.2.2.

My application doesn't compile on g++-3.2.2 because of strict typechecking etc. So, I installed g++-2.95.3 on my machine. The application compiled but then it always hangs on a runtime call to pthread_cond_broadcast. I thought it is because of incompatibility of glibc-2.3.2-5 with gcc-2.95.3. I then installed glibc 2.2.5.-34 with which gcc-2.95.3 is known to work (for my application). I installed this glibc in a custom directory.

Now, when i compile a simple "hello world" program with g++-2.95.3 with flags -Wl,--dynamic-linker=<glibc-install-dir>/lib/ld-linux.so.2, the program compiles and output of "ldd a.out" command shows that it is picking glibc libraries from my custom installation only as desired.

But, there are two problems:

1. If I try to build a dynamic library by executing:

g++ -shared -fPIC -Wl,--dynamic-linker=<glibc-install-dir>/lib/ld-linux.so.2

ldd of the output library doesn't show my custom glibc installation. rather it shows that glibc is being picked up from standard location. How do I solve this? Is there something special that i need to do so that dynamic libraries also pick glibc from my custom glibc installation.

2. How do I make my custom glibc installation as default glibc location for gcc. I don't want to put -Wl,--dynamic-linker=<glibc-install-dir>/lib/ld-linux.so.2 everytime?

Any help with above issues is really appreciated.

Thanks,

Regards,
Aseem.

--
The end is always good. If it's not good, it's not the end.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux