Re: Install different libs for different C++ compilers?

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

 



Toralf Lund wrote:
Regarding the recent discussion on C++ binary compatibility, or lack thereof: I am now compiling some of my code with g++296 from compat-gcc, and it works rather well. One question, though: Is there a simple and direct way to have the different g++ versions pick up different versions of a given non-standard library?

option one: Install only the -devel package for the library built by the appropriate compiler. If the only libfoo++.so in the search path is the one built by gcc-2.96, then you're fine.


option two: You can try building a separate "root" directory for the compatible system: (e.g. /opt/gcc296builds/usr/lib). Install your gcc-2.96 libraries there and use -L/opt/gcc296builds/usr/lib for your builds (often as CXXFLAGS=-L/opt/gcc296builds/usr/lib ./configure)

option three: Install a full copy of the older OS in a separate "root". "chroot" there to do your compiling. This is the option that I use, typically. We have one machine with a fair sized disk and several releases of Red Hat Linux (and other Linux distros) installed. When we need a package for a given release, we copy the required source there, chroot, and compile.



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux