Changing from g++ 2.95.3 to g++ 3.x

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

 



Hi,

I have a large number of systems running Netbsd 1.6.1 which uses gcc
2.95.3 as its native compiler. Inherent bugs with exception handling in
2.95 have forced me to look at recompiling our code base using a later
version (3.3.3 preferrably).

The code base consists of multiple executables, and I have successfully
compiled them all using gcc 3.3.3. When these executables are installed
onto an old system (along with the 3.3.3 libstdc++ and libgcc_s shared
libs) most of them run fine. I can run qt applications if I provide an
updated set of qt shared libs built with 3.3.3.

However some applications segmentation fault almost immediately. The
native gdb (5.0) refuses to loads the core files and the latest gdb
(6.3) seems to run out of memory after failing to load. I have attached
a printout if anyone is interested...

My guess is that I am linking in some libraries which have C++
interfaces and which were compiled with the old compiler. The following
snippet found using google bears that out:

---------------------------------------------------------
>>> from
<http://developer.apple.com/releasenotes/DeveloperTools/GCC3.html>
Switching to gcc 3.3:
Recompile all your C++ and Objective-C++ code, including all libraries
and frameworks that export a C++ interface. The application binary
interface (ABI) for C++ programs changed between GCC 2 and GCC 3.1, and
again between GCC 3.1 and GCC 3.3. The changes between GCC 2 and GCC 3.1
were comprehensive, including changes to name mangling, exception
handling, and class layout and alignment. The changes between 3.1 and
3.3 are much smaller, but are still large enough to prevent a mixed C++
program from operating correctly. Do not link C++ modules compiled with
one of these compilers against modules compiled with any of the other
two compilers. Even if the modules appear to link correctly, C++ ABI
differences may still cause problems that will not manifest themselves
until run time.
---------------------------------------------------------

So my questions are (if anyone has got this far:) ...

 1. Is it possible to run executables compiled with a later compiler on
a system which had all its base libraries built with an earlier native
compiler?

 2. Will libraries which export only a C interface be fine - because it
is not really practical for me to redistribute all the X libraries?

 3. Would it be a solution for me to isolate all shared libraries which
export a C++ interface and make sure they're updated?

Any help or ideas would be much appreciated. I hope this is the right
place to post for this - if not please let me know where would be more
suitable...


Thanks
 Stuart

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-netbsdelf1.6.2."...


Core was generated by `gui_res'.
Program terminated with signal 11, Segmentation fault.
Error while mapping shared library sections:
"/usr/local/gcc335/lib/libgcc_s.so.1": not in executable format: Memory exhausted.
Error while mapping shared library sections:
"/usr/lib/libc.so.12": not in executable format: Memory exhausted.
Error while mapping shared library sections:
"/usr/lib/libstdc++.so.4": not in executable format: Memory exhausted.
Error while mapping shared library sections:
Could not open `/usr/lib/libcrypt.so.0' as an executable file: Memory exhausted
Error while mapping shared library sections:
Could not open `/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2' as an executable file: Memory exhausted
Error while mapping shared library sections:
Could not open `/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2' as an executable file: Memory exhausted
Error while reading shared library symbols:
"/usr/libexec/ld.elf_so": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/pkg/lib/libxml2.so.6": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/pkg/lib/libiconv.so.3": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/pkg/lib/libjpeg.so.62": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/X11R6/lib/libglut.so.3": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/X11R6/lib/libGL.so.1": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/X11R6/lib/libGLU.so.1": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/X11R6/lib/libXi.so.6": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/local/qt3.2.1/lib/libqt.so.3": can't open to read symbols: Memory exhausted.
Error while reading shared library symbols:
"/usr/X11R6/lib/libXft.so.2": can't open to read symbols: Memory exhausted.
Recursive internal problem.
Abort (core dumped)

[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