Solved

How to install gcc 2.7.2 in Solaris ?

Posted on 1997-09-03
2
692 Views
Last Modified: 2013-12-26
I tried to install gcc 2.7.2.2 (x86). But it not works ("installation problem, cannot exec 'cpp' : No such file or directory"). Why? I copied gcc...tar.gz into /usr/local and ungzipped/untared. Also I copied all files into /usr/pkg/gcc-2.7.2/. May be I made something wrong?

0
Comment
Question by:vb138ff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
df020797 earned 10 total points
ID: 1294724
The problem is if you dont have buyed the SParc Works Compiler from Sun that you dont have a compielr to build gcc with. B ut dont fear. On ftp://ftp.darkface.pp.se/pub/sun do you find the package FSFgcc.gz and a gunzip to decompress it with. Then run pkgadd -d./FSFgcc and install that precompiled compiler. Its installed in /opt/gnu. NOW you got a compiler. Download the latest gcc and untar it. Then in the gcc directory run a ./configure (make sure /opt/gnu/bin is first in your path). After that run make. After that run 'make stage1' and after that run 'make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2"', then run make stage2 and then run 'make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2"' and then run as root 'make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"'. Take /opt/gnu/bin out of your path and try the new compiler out. If it works run pkgrm and deinstall the FSFgcc package. You should then have a brand new working gcc

Regards
//Patrik
0
 

Expert Comment

by:yakovlev
ID: 1294725
Probably, you have an already precompiled compiler. Check the
subdirectory "lib/gcc-lib" in your main GCC directory, then
goto it and search for another subdirectory, name of which
resembles your operating system (it's "sparc-sun-solaris2.5" on
my machine), then goto it and search for a subdirectory,
name of which is equal to GCC version (it's "2.7.2.2" on
my machine). This last subdirectory usually contains all the
parts of GCC, and you should use option -B to say the compiler,
where to search its parts. For example, insert the following
lines in your makefile:

  CC = ${GCCHOME}/gcc
  CFLAGS += -I${GCCHOME}/include -B${GCCHOME}/

and do the following command in your C-shell:

  setenv GCCHOME ${YOURGCCDIR}/lib/gcc-lib/<YourOS>/2.7.2.2

Of course, you can use a different name instead of GCCHOME.
Pay attention to "-I" option and last slash in "-B" option -
they are important. And this method doesn't require to have
GCC on your search path.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Image not there 4 74
Work with App store 7 119
Solaris acount issues 44 74
SCO 5.0.7 on HP Proliant DL380 G5 will not shutdown properly. 6 86
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question