This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Installing gcc/g++: where did I go wrong?


I THOUGHT I knew how to do this, and I thought the docs were pretty clear.  But after several hours of utterly failing to solve this, I'm turning to those who can probably easily figure out where I went wrong. 
 
I'm trying to install gcc/g++ on a SunOS 5.6 box.  I downloaded the full gcc-2.95.tar.gz distribution (12meg), unpacked it into /tmp/gcc- 2.95, and did the following:
 
> cd /tmp
> mkdir gccobj
> cd gccobj
> ../gcc-2.95/configure --prefix=/home/gawhite/gcc
> make bootstrap
> make install
 
After many hours, the compilation and installation finished.  I tested gcc on a "Hello world" C program - no problems there.  But when I tried g++, I got this:
 
> /home/gawhite/gcc/bin/g++ /tmp/test.cc
ld: fatal: library -lstdc++: not found
ld: fatal: File processing errors. No output written to a.out
collect2: ld returned 1 exit status
 
I'm not really much of a C/C++ programmer, but I seem to recall that this indicates g++ is looking for, and not finding, a file
called "libstdc++.a" or "libstdc++.so".  At any rate, the only "lib*" files I could find in /home/gawhite/gcc were:
 
/home/gawhite/gcc/lib/gcc-lib/sparc-sun-solaris2.6/2.95/libgcc.a /home/gawhite/gcc/lib/libiberty.a
/home/gawhite/gcc/include/g++-3/libio.h
/home/gawhite/gcc/include/g++-3/libioP.h
 
Now, I see that in /tmp/gcc-2.95, there ARE a number of "lib*" directories:
 
/tmp/gcc-2.95/libchill/
/tmp/gcc-2.95/libf2c/
/tmp/gcc-2.95/libiberty/
/tmp/gcc-2.95/libio/
/tmp/gcc-2.95/libobjc/
/tmp/gcc-2.95/libstdc++/
 
but in /tmp/gccobj, there are only these:
 
/tmp/gccobj/gcc
/tmp/gccobj/libiberty
/tmp/gccobj/libio
 
so it seems that the libstdc++ (and maybe other) libraries I need are never being built and/or installed.
 
I didn't THINK I had to specify which languages I wanted to use when I ran the "configure" command - the docs indicate that if I don't specify the "--enable_languages" flag, that "all languages available in the gcc sub-tree will be configured."
 
So where did I go wrong?
 
Thanks to anyone who can help!
 
 



--== Sent via Deja.com http://www.deja.com/ ==--
Before you buy.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]