[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to install gcc 2.7.2 in Solaris ?

Posted on 1997-09-03
2
Medium Priority
?
698 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 20 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

649 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