Kristofer Wempa <wempa@xxxxxxx> writes: > So, I've built GCC 4.5.1 on my SLES10 server and proceeded to build my new > tool chains. Things seemed to be going OK until one program wouldn't run. It > complained about needing libstdc++.so with GLIBCXX_3.4.9 or some other version. > I searched the libraries in my new tool chain and a number of them refer to > specific GLIBCXX versions that are all newer than the one that my system > libstdc++.so provides. The only way I can get these programs and libraries to > work is to modify my LD_LIBRARY_PATH to point to the GCC 4.5.1 directory that > contains the newer libstc++.so. I have 2 questions. First of all, why is it > that only some libraries have this requirement. GCC only imposes the requirement when it is necessary, which is to say when a program uses some aspect of the library whose ABI has changed since earlier versions. > Secondly, what is the correct > way of handling this ? I'm assuming that we don't want to mix different > versions of this library. I'm guessing that I should do 1 of the following: > > 1) Install the newer libstdc++.so in the system directory and have all > packages use this version That should work. > 2) Globally set the LD_LIBRARY_PATH for this entire tool chain so that they > all pick up the library from the GCC 4.5.1 directory. That should also work, although note that you have to set LD_LIBRARY_PATH when you run programs compiled with this toolchain, not when you use this toolchain itself. Other options are to use the linker's --rpath option, to set the LD_RUN_PATH environment variable, or to link statically against libstdc++. Ian