This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/2009: Rename to "All g++ apps linked with -lGLU core dump on startup"


Two things.  The Synopsis on this bug is wrong.  Instead of:
   g++ (-lGLU)
it should be:
   All g++ apps linked with -lGLU core dump on startup

Also, further investigation and net searches reveals that this is due to g++
generating an application that links both libC.so (IRIX C++) and libstdc++.so
(GCC C++) into the resulting executable.  The compilation proceeds without
errors, but the resulting executable is buggy and core dumps in ios::init
before it even gets to main().

Here is where the libC.so reference is coming from:

> elfdump -Dl /usr/lib/libGLU.so

/usr/lib/libGLU.so:

                   **** MIPS LIBLIST INFORMATION ****
.liblist :
[INDEX] Timestamp               Checksum        Flags   Name            Version
[1]     Jan 22 17:34:40 2001    0x69156cd4      -----   libGL.so        sgi1.0
[2]     Jan 22 17:31:34 2001    0x50236336      -----   libm.so sgi1.0
[3]     Oct 11 23:37:06 2000    0x4d67d0da      -----   libc.so.1       sgi1.0
[4]     Jan 22 17:31:33 2001    0x332f8d45      -----   libC.so sgi1.0

Solutions suggested by other folks I've contacted and net list posters are:
  1) Rebuild a libGLU using GCC, and link with it instead (eliminating
     the indirect libC.so linkage reference)
  2) Compile everything using the SGI MIPSPro CC compiler for all code
     (linking with libC.so, and eliminating the need for libstdc++.so)

Note that if your code uses RTTI (typeid, dynamic_cast, etc.), you can still
resort to Option #2.  With a MIPSPro C++ compiler ver >= 7.0, specify -mips3 or
-mips4 on the CC command-line (not exactly intuitive, but it works).  Note that
having mips3 or mips4 in $COMPILER_DEFAULTS_PATH as the default ABI is "not"
sufficient (it should be -- a bug).

Hopefully this detailed account will save others some time when they hit this
annoying problem.


   

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]