My compiler is gcc 2.95.2 from sunfreeware, so I can't really
put the blame on Sun. I had the same problem compiling
MySQL, ehich also uses c++, that is where I found the
answer to this problem in the first place.
The problem technically occurs in the runtime linker, which cannot find
shared libraries at runtime. Sun's runtime linker is rather simplistic. It
looks in /lib and /usr/lib, and that's it, pretty much hardcoding the paths.
A much better approach is to cache the location if each library, which
allows libraries to be installed in any location.
Although some people
may claim this as a bug, I personally see no reason why
the proper testing and configuring could not be added
to the configure script. Thats what its there for, right?
Perhaps, but this is such a basic module that it is reasonable to expect the
OS to handle it. We are not talking about some custom non-standard,
manually, installed. We're talking about the C++ runtime library, which is
really a part of the operating system, more than anything else. With such a
basic system component you shouldnt' really have to jump through hoops in
order to use it. It should work without having to use any special procedure
to load it.