[csw-users] g++ libraries

Peter FELECAN pfelecan at blastwave.org
Fri Feb 25 08:53:02 CET 2005

Steve Garcia <sgarcia at bak.rr.com> writes:

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

The current version is 3.4.3. Can you upgrade your installation, test
and report back? BTW, there is the bug-tracking system at

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

Well, could you provide an example? There are many reasons for this
kind of error.

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

This is nominal. Probably freeing a non allocated memory area.

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

Different compiler, different code, &c. It *will* fail sooner or later
in the development of the program even with the old version of the

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

Sorry to disappoint them but this is probably an issue with their code.

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

No. Only the significant ones.

> If so, how can I configure the system so it
> picks the correct libraries?

Take care of the values of the PATH and LD_LIBRARY_PATH in your
environment as described at http://www.blastwave.org/userguide/

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

Although is not a solution for your situation, you can have both
compiler installed simultaneously on your system.

More information about the users mailing list