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

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

 



Gordon Messmer wrote:

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.

Yes, that's essentially what I have done now. The problem is that I may want to use g++-3 versions for some applications, g++2.96 for others.



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)

Yes. Maybe I'll do that. I was kind of hoping that the "-L/opt/gcc296builds/usr/lib" or similar - and the appropriate "rpath" options etc. to go with it - was built into the compat compiler, though.



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.

I've considered setting up a machine with a large disk, lots of partitions, and several OS versions and/or package combinations for tests of releases etc. For the time being, we have a number of hosts with RH 7.3, though, so getting the packages built is not a problem as such, although it would be more convenient for RH 9 users to run on their own hosts. There is also the problem of runtime setup, though. Software built on version 7.3 should work on version 9, too. As I said earlier, more or less - as long as *everything* is built on version 7.3, or with the compatibility compiler and g++-2.96 libs on 9, everything is fine, but I'd really like to be able to use this software *and* Red Hat 9/g++-3 apps utilising the same library functionality.


- Toralf



--
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