gcc problems


 
Thread Tools Search this Thread
Operating Systems Solaris gcc problems
# 1  
Old 03-08-2004
gcc problems

I downloaded and installed the gcc binaries recently. I am now trying to compile openssh, but I get bad compiler issues when I try this.

in the openssh directory, I run:

./configure

(mind you, I have usr/local/bin/gcc in my PATH)

but the output says checking for gcc... no

Why can't it find my gcc to compile this?

When I run the evn command to view my PATH is see:
PATH=/usr/bin:/usr/sbin:/bin:/usr/local/bin/gcc:/usr/ucb:/usr/apps/matrix/scripts:/usr/oracle/app/bin:usr/local/bin:/usr/ccs/bin:/usr/ucb:/etc:.:/usr/dt/bin:/usr/openwin/bin

When I run the whereis gcc and which gcc commands I get conflicting output:

bash-2.05# whereis gcc
gcc: /usr/local/bin/gcc
bash-2.05# which gcc
no gcc in /usr/bin /usr/sbin /bin /usr/local/bin/gcc /usr/ucb /usr/apps/matrix/scripts /usr/oracle/app/bin usr/local/bin /usr/ccs/bin /usr/ucb /etc . /usr/dt/bin /usr/openwin/bin

whereis finds gcc, but which cannot?

Also, how can I set gcc as my default compiler?

I am running Solaris9 on SPARC FYI. thanks and please help asap. I've spent too much time on this already.--thanks--AJ

Last edited by AJA; 03-08-2004 at 02:15 PM..
# 2  
Old 03-08-2004
I don't know how to fix your gcc problem. But if you're in a hurry, why not simply download binary versions of openssh from sunfreeware? You could be finished in less than half an hour.
# 3  
Old 03-08-2004
I'm only in a hurry because I've wasted too much time looking at this. I'm sure it's something simple I'm missing. I woudl download the binaries, but I need to get this compiler setup so I don't have to mess with getting binaries anymore.
# 4  
Old 03-08-2004
1) did you install gcc to a folder named /usr/local/bin/gcc?

or is that the direct path to exectute gcc?

2) if gcc is in /usr/local/bin you are not defineing the path correctly.

it would be. $export PATH=$PATH:/usr/local/bin

that would put gcc in your path properly
# 5  
Old 03-08-2004
that is the direct path to the executable, but I changed it to just /usr/local/bin and still, nothing. I know there is a way that you can set the CC to gcc, but I forget how.
# 6  
Old 03-08-2004
should there be a CC=gcc or something like this in the environment variables?
# 7  
Old 03-08-2004
Many ./configure scripts allow you to specify an envvar like CC to explicit name the compiler to be used. For most configure scripts, you can see the options you can pass or envvar you can set by ./configure --help

May be something like

CC=/usr/local/bin/gcc ./configure

will help you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Problems to install gcc 7.2 on AIX 7.2

We need gcc 7.2 on AIX 7.2 and so I tried to install the rpm package from IBM (<https://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html>) The steps were as follows (I downloaded all packages from the given IBM toolbox page): # :-)rpm -ihv gcc-7.2.0-1.aix7.2.ppc.rpm error:... (2 Replies)
Discussion started by: BuSchu
2 Replies

2. Programming

Help with gcc programming

I need a lot of help with c programming. I have the source code. Running configure, I got one error message about a missing library. I downloaded and successfully compiled it in another dir. Do I throw all the new files into my source dir and run configure again ? Thanks. (3 Replies)
Discussion started by: drew77
3 Replies

3. Linux

Problems with gcc

Hello I'm not able to install gcc. My platform is # uname -a Linux localhost 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux #yum install gcc I got the following error ---> Package libgfortran44.x86_64 0:4.4.4-13.el5 set to be updated ---> Package... (2 Replies)
Discussion started by: My Style
2 Replies

4. UNIX for Dummies Questions & Answers

Help with gcc and g++

Hi, I have recently got a job in unix, now training is going on and we have been practicing on telnet, so to practice at home I have installed vmware(virtual machine) and planning to download ubuntu. So my doubt is that whether I can write c and cpp progs in vi editor and can I run them by default... (5 Replies)
Discussion started by: vishal.973s
5 Replies

5. UNIX for Advanced & Expert Users

GCC 4 error.

Hello, dont know much about C, or gcc, but I am trying to compile a program that built fine in gcc3, but is outputting errors in gcc4, int load_REs(char *, char ); #this line is causing the error DB_Query.h:22: error: array type has incomplete element type any help would be appreciated. (3 Replies)
Discussion started by: mike171562
3 Replies

6. AIX

problems with gcc on AIX 4.33

I just installed gcc on AIX 4.33, and I am having some problems with compiling a simple hello world program. See output below for the issue. The "standards.h" file is not on my system and I don't know where to get it. Thanks in advance for your help! # gcc -v Reading specs from... (2 Replies)
Discussion started by: jhall
2 Replies

7. UNIX for Dummies Questions & Answers

GCC causing problems it seems.

Hi, I seem to be getting errors in relation to GCC it seems as I cant upgrade alot of pkgs until I can upgrade or use a later version of GCC. The error I get is along the lines of ( cc1: error: unrecognized command line option "-Wno-pointer-sign" *** Error code 1 ) Anyway I was wondering if... (2 Replies)
Discussion started by: Browser
2 Replies

8. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

9. SCO

Problems with gcc compiler

Hy everone! I have an old SCO 5.x machine on which I want to install openssh. Since there was no GCC compiler installed I had to install that too. I'm not a programmer and not so familiar with SCO, so I have a couple of questions. I did everything "by the book" as it says here: Where can I... (1 Reply)
Discussion started by: veccinho
1 Replies

10. Programming

Gcc

Dear all, Any body please guide, i require a C which will run in Linux environment. Its urgent please. warm regards, Senthil K (1 Reply)
Discussion started by: Senthil
1 Replies
Login or Register to Ask a Question