I am relatively new to Solaris. I am trying to compile a tool called
gtkwave-1.3 on a solaris 7 box. I am much more used to Linux and BSD.
Anyways, the place where it dies is linking some helper command line
applications which require zlib. There were zlib libraries (static
libz.a and libz.so) already on the machine, but the libz.so needed
a dynamic libc. So I got this error:
ld: warning: file libgcc_s.so.1: required by /usr/lib/libz.so, not found
I figured it was because the /usr/lib/libz.so needed libgcc_s.so (yes I
can read an error message). So I searched the whole filesystem and
there is no such file as "libgcc_s.so" or anything close.
So I thought, now I really am confused.
So I then tried to force link with libz.a instead of libz.so, first by
renaming libz.so (yes, this was bad, but if the system has no
libgcc_s.so, any app trying to load libz.so would fail anyways), then
relinking. No luck.
So then I figured both libz.a and libz.so must be screwed, so I decided
to rebuild them from sources. So I did a download of the zlib binaries
from www.sunfreeware.com, and those didn't work, so I did a build from
zlib sources (configure, make test, make install). Now I have libz.a in
/usr/lib, but attempts to compile a program that uses libz.a ( gcc
option -lz) dies with this error:
bash#gcc -O2 -lz -o mvl2lxt mvl2lxt.c lxt_write.c
Undefined first referenced
symbol in file
Why is this happening? I have a valid libz.a in /usr/lib/libz.a
What am I doing wrong? Besides being a clueless Solaris Newbie. Help!