SUMMARY gcc solaris question

From: Chuck Campbell (campbell@Starbase.NeoSoft.COM)
Date: Wed Jan 21 1998 - 12:24:08 CST


Here is my summary of responses. The first response from Casper Dik is
the one that worked. Apparently there are hard coded paths in the compiler,
so setting a couple of links fixed things. I set one for the lib/gcc-lib
and one for the /opt/GCC27271 and all is well.

thanks,
-chuck

Chuck Campbell wrote:
>I'm trying to build some codes on my Ultra-1, running Solaris-2.5.1, and
>I know there is no compiler, so ...
>I've grabbed the gcc-2.7.2.1 package from the sunsite solaris directory,
>and installed it with the following commandd:
>
>pkgadd -d /tmp/gcc-2.7.2.1 -R /opt/software
>
>No errors were reported, and it says the package was installed successfully.
>
>/opt/software is a link to a disk with plenty of space (/opt has virtually
>no space at all).
>
>I added /opt/software/opt/GCC2721/bin to my path, and I can see the gcc
>executable from anywhere. The problem is that when I try to run the
>compiler, I get the following:
>
>gcc -o myapp myapp.c
>gcc: installation problem, cannot exec `cpp': No such file or directory
>
>What have I got to do to make this work properly? I looked in the bin
>directory (/opt/software/opt/GCC2721/bin) which is in the path, but ther
>is no cpp entry... I'm baffled.

Make a link from /opt/GCC2721 to /opt/software/opt/GCC2721

or set GCC_EXEC_PREFIX

Casper

__________________________________
Hi Chuck,

my experience with the packages on the net is that they truly
expect to be in the original place there were installed. So,
this gcc packages actually expects to be /opt/GCC2721/blah.
This is the reason it cannot find cpp, which it expects to be in
/opt/GCC2721/lib/gcc-lib/sparc-sun-solaris2/2.7.2.1 (probably something
like that). A link might solve the problem.
Also, adding the package again and letting it pick the default location
would probably work as well.

Kelly Fergason
klfergason@amoco.com

__________________________________
Hey, I haven't seen you on this list before..

cpp is in ..../lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.1/cpp

...or something like that.

Anyway, it's not in bin, it's in a lib dir somewhere.

Thanks

Daniel

__________________________________
cpp is in /usr/ccs/lib and is part of the SUNWsprot package.

I have it in my search path.

Jeff

__________________________________
Chuck:

Sorry, no solution, but it may help to know that I ran into the exact same
problem when trying to install the groff text processing package (which
requires a working c++ compiler).

Seems like the c++ compiler in the precompiled binary is broken. I have
been unable to compile a simple "hello world" c++ program using the same
compiler. I even tried using the precompiled version to compile the latest
version of gnu gcc. Still had the same problem.

Looking forward to your summary -

Joel

__________________________________
barkeep:/p/home/tkevans $ whence cpp
/usr/ccs/lib/cpp

(You need to add /usr/ccs/lib and /usr/ccs/bin to your PATH.)

--
Tim Evans                     |    E.I. du Pont de Nemours & Co.
tkevans@eplrx7.es.dupont.com  |    Experimental Station
(302) 695-9353/8638 (FAX)     |    P.O. Box 80357
EVANSTK AT A1 AT ESVAX        |    Wilmington, Delaware 19880-0357

__________________________________ cpp = "C Pre Processor"

Link the entire contents of the

/opt/software/opt/GCC2721/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2.1/

directory to /usr/local/lib.

-- Jim Harmon The Telephone Connection jim@telecnnct.com Rockville, Maryland

__________________________________

You can't change the install path for gcc -- paths are hard-compiled in. Well, you *can*, but you have to pass flags to gcc to make it work, meaning every time you compile you'll have to adjust makefiles, etc. I **think** you need -B/opt/software, I'm probably wrong. Check the info or man pages for gcc.

-- ~frank * Yoda of Borg I am. Futile resistance is. Assimilated you will be. * * PGP ID: C001AA75 -|- fcusack@voicenet.com *

__________________________________

I think you probably need to install the "SUNWbtool" package off of the OS CD. That gives you all the stuff in /usr/ccs which should include cpp.

Ronald Loftin E-mail: reloftin@mailbox.syr.edu Computing and Media Services Syracuse University Voice: 315-443-4103 Fax: 315-443-3817

-- ACCEL Services, Inc.| Specialists in Gravity, Magnetics | 1(713)993-0671 ph. 1980 Post Oak Blvd. | and Integrated Interpretation | 1(713)960-1157 fax Suite 2050 | | Houston, TX, 77056 | Chuck Campbell | campbell@neosoft.com | President & Senior Geoscientist |

"Integration means more than having all the maps at the same scale!"



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:29 CDT