[csw-users] g++ libraries

Steve Garcia sgarcia at bak.rr.com
Thu Feb 24 19:38:06 CET 2005


Another try -- I'm not sure the last one made it out correctly....

We have a problem with the gcc version 3.3.3 installed via Blastwave. 
It's quite possible (maybe even likely) that the problem stems from a 
misconfiguration on my part, but I haven't been able to figure out what 
that misconfiguration is.

What seems to be happening is that under certain circumstances a fairly 
straightforward C++ program will segfault for no apparent reason.  When 
I trace the error using gdb I see that it is failing in /lib/libc.so.1 
in the realfree() function.

The person reporting this to me said it only seems to fail when using 
dynamic memory, but irregularly, which correlates to what I found.

On the other hand, if I compile with the g++ 2.95.3 that was already on 
the machine when I started putting the Blastwave stuff on, the program 
runs fine.

This is a university machine, used for student programming instruction. 
  The students have enough problems with their code in the first place 
-- they don't need additional sources of error that aren't their fault.

My first question is, should gcc/g++ be linking to /lib/libc.so in the 
first place?  Shouldn't the libraries all be from the /opt/csw/gcc3/lib 
tree?  If so, how can I configure the system so it picks the correct 
libraries?

Or if I'm wrong and it really *should* link to libraries in /lib, why am 
I segfaulting?

Thanks for any insight!  I'd rather keep gcc3 rather than just drop back 
to 2.95.3, if that would be possible.

Steve Garcia



More information about the users mailing list