Compiling with gcc 2.95 on Solaris 8 --> core dump

Compiling with gcc 2.95 on Solaris 8 --> core dump

Post by Michael Hanno » Thu, 04 May 2000 04:00:00



Greetings.  We've just installed Solaris 8 on a Sun SPARC 4 system:

# uname -a
SunOS solaris-box.ucdavis.edu 5.8 Generic sun4m sparc SUNW,SPARCstation-4

We downloaded the precompiled version of gcc 2.95.2 from
www.sunfreeware.com.  When we attempted to configure some software packages,
we noticed that the compiler was consistently labelled as a "cross
compiler".  A little investigation showed that the configure script was
reaching that conclusion because a trivial program could not be run:

# cat junk.c
#line 4240 "configure"
#include "confdefs.h"
main(){return(0);}

# gcc -o junk junk.c
# ./junk
Segmentation Fault (core dumped)

Any idea what we're doing wrong?  Thanks.

Mike
----------

Dept. of Physics
University of California        Davis, CA 95616-8677
530.752.4966 (Voice)        530.752.4717 (FAX)

 
 
 

1. Trying to compile gtkwave on Solaris 7 box, with GCC 2.95, having no luck.

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
gzdopen                             /var/tmp/cco1OmHW.o
gzwrite                             /var/tmp/cco1OmHW.o
gzclose                             /var/tmp/cco1OmHW.o

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!

Warren Postma
Toronto Canada

2. passing file descriptors in AIX

3. Core in 2nd map::insert STLport 4.5.0/ AIX 4.3.3 / gcc 2.95.x

4. Random hardware lockups....Help!

5. Kernel compile problem with (P)GCC 2.95

6. NFS on RedHat 7.1 with 2.4.2 kernel - Illegal argument with vfat

7. Compiling kernel with gcc 2.95?

8. Redhat Networking/DNS problem, please help

9. Can't compile 2.0.36 w/gcc 2.95

10. gcc 2.95 compile error

11. compiling ksh93 with gcc 2.95.[23] fails

12. JFS no longer compiles with gcc 2.95

13. 2.5.60: JFS no longer compiles with gcc 2.95