This is the mail archive of the gcc@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]

Re: libstdc++ clashes with libC system library on Irix 6.5


Wolfram Gloger wrote:
> I'm not arguing this is a bug in gcc, but I've hit the following
> problem on Irix-6.5 (it does _not_ happen on Irix-6.2):
> 
> max:/home/wmglo/src/test% gcc -v
> Reading specs from /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> max:/home/wmglo/src/test% gcc hello.cc -lstdc++
> max:/home/wmglo/src/test% ./a.out 
> Hello, world.
> max:/home/wmglo/src/test% gcc hello.cc -lstdc++ -lC  
> ld32: WARNING 85: definition of __rethrow in
> ib32/libC.so.
> ld32: WARNING 85: definition of __throw in
> /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/libstdc++.so preempts that
> definition in /usr/lib32/libC.so.
> ld32: WARNING 85: definition of __dynamic_cast in
> /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/libstdc++.so preempts that
> definition in /usr/lib32/libC.so.
> ld32: WARNING 85: definition of cin in
> /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/libstdc++.so preempts that
> definition in /usr/lib32/libC.so.
> ld32: WARNING 85: definition of cout in
> /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/libstdc++.so preempts that
> definition in /usr/lib32/libC.so.
> ld32: WARNING 85: definition of cerr in
> ib32/libC.so.
> ld32: WARNING 85: definition of clog in
> /pkg/gcc-2.95.2/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/libstdc++.so preempts that
> y symbol.
> [so far so good, no function from libC will ever be used directly..]
> max:/home/wmglo/src/test% ./a.out 
> Segmentation fault (core dumped)
> 
> This has been reported before:
> 
>  http://gcc.gnu.org/ml/gcc/1999-04/msg00246.html
> 
> It _is_ sometimes necessary to pull in SGI's libC C++ library into
> gcc-compiled applications, for example those using OpenGL, because of
> the unfortunate fact that libGLU pulls libC in unconditionally.
> (Recompiling libGLU with gcc is not an option.. :-)

We are lucky that SGI open sourced the OpenGL reference implementation a
couple of weeks ago, so I was able to compile libGLU with gcc-2.95.2 on an
Octane running IRIX 6.5.3. It took me an afternoon to hack the Makefiles
and reconstruct the missing header files, but it works. I still have to 
find out what the SGI freeware license requires me to do with the patches,
but if you need libGLU with gcc-2.95.2, just drop me a line.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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