The Solaris 9 for SPARC packages on sunfreeware.com were compiled with gcc-3.1 using the assembler (as) and loader (ld) programs in /usr/ccs/bin. Because of this, some of the executables will look for libraries like libgcc_s.so and libstdc++.so in /usr/local/lib. If you install the gcc-3.1 packages, these files will go into /usr/local/lib automatically. But, if you do not want to install gcc-3.1, but do want to run programs that need these libraries, then you can install the libgcc-3.1 package instead of gcc-3.1.
If you run ldd on an executable, it will show the libraries it expects to find. For example, the minizip executable gives
ldd minigzip
minigzip:
libz.so => /usr/local/lib/libz.so
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
and we see that the libz.so and libgcc_so.so.1 libraries need to be in /usr/local/lib from the zlib and libgcc (or gcc) packages.