LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2011, 08:19 AM   #1
dirshah
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
Installing GCC on SUSE 10 says cc not found


Hi All,
I am new to linux. I wanted to package my software as an RPM by rpmbuild command. When I run that it complained that gcc not found.

I downloaded gcc and tried to install that from a tar ball. And it complained about cc: coomand not found. I dont know why is this error being shown because I think cc and gcc are the same. Correct me if I am wrong. My system details are:
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 1
LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64"

I tried to download rpm files for gcc but they dont exist for Suse 10.

Last edited by dirshah; 02-11-2011 at 05:09 AM.
 
Old 02-10-2011, 08:56 AM   #2
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
I believe cc usually ends up being a symbolic link to gcc. If that link is broken or gcc not installed you will be getting error messages such as yours. As for the gcc tar ball. I guess you mean a source package? If you don't have cc or gcc it will be a "chicken or the egg" situation. You cannot use gcc to compile gcc because it doesn't exist yet. You will have to install a binary version of gcc.
 
Old 02-10-2011, 09:06 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,150

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
i dont know much about suse but is there a software repository that can automatically install gcc (like yum or apt-get) ?

cc and gcc are not the same (but usually are sym-linked).
it is essentially looking for a compiler to compile the gcc compiler (chicken/ egg).

Last edited by schneidz; 02-10-2011 at 09:08 AM.
 
Old 02-10-2011, 09:39 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,738

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Welcome to LQ.

Please try this command : gcc -v
If gcc is present, you can then do : cd /usr/bin/ ; # ln -s gcc cc

With no gcc present, the only available packages, that will work on
SLES 10 are the compat gcc / g++ version 3.4.6 for Slackware :
http://connie.slackware.com/~alien/s...64-2compat.tgz
> > gcc34-3.4.6-x86_64-2compat.tgz

http://connie.slackware.com/~alien/s...64-2compat.tgz
> > gcc34-g++34-3.4.6-x86_64-2compat.tgz

They will provide /usr/gcc34/bin/gcc34 : g++34

Install with # sh installpkg <package>.tgz
..
Attached Files
File Type: txt installpkg.txt (16.7 KB, 41 views)
 
Old 02-10-2011, 10:03 AM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by dirshah View Post
I tried to download rpm files for gcc but they dont exist for Suse 10.
I'm sure that is incorrect. Maybe you don't know the correct name for them. Maybe you aren't connected to the correct repository. I don't know Suse well enough to give you details.

If you still need help, you should edit the title of your thread to mention Suse, so you will get attention from people who do know the details. (Edit first post of the thread, click the Advanced button, then edit the title).

The non detailed answer is that you should not try to install GCC from source nor from any other generic (not specific to Suse) form from gcc.gnu.org

You should install GCC using your package manager (Yast or equivalent).

Excuse this ignorance of SUSE, but are you using a distribution that normally requires paid support? If so have you paid for support? If you haven't paid for support, does that fact exclude you from access to the correct repositories?

There is no reason to try to struggle around repository issues with an unpaid copy of a distribution for which payment expected. There are plenty of completely free Linux distributions. If you don't want to pay for support, start over with a distribution that is not set up on the assumption that you will pay for support.

Obviously if you did pay for support, you have someone to ask about how to connect to the right repository so that installing GCC will be easy.

Last edited by johnsfine; 02-10-2011 at 10:16 AM.
 
Old 02-11-2011, 06:17 AM   #6
dirshah
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you all for replying to the post. Actually I am very very new to Linux. And (I have been asked to do something which is a bit complex i.e. RPM packaging.
I followed knudfl's method. Something happened at the command level But its still not installed.
The output of the commands are

spkisl867:/opt/RPM_Fawad # sh installpkg.sh gcc34-3.4.6-x86_64-2compat.tgz
WARNING: pkgtools are unstable with tar > 1.13.
You should provide a "tar-1.13" in your $PATH.
Installing package gcc34-3.4.6-x86_64-2compat...
PACKAGE DESCRIPTION:
gcc34: gcc (Base GCC package with C support)
gcc34:
gcc34: GCC is the GNU Compiler Collection.
gcc34:
gcc34: This package contains those parts of the compiler collection needed
gcc34: to compile C code. Other packages add C++, Fortran, Objective-C,
gcc34: and Java support to the compiler core.
gcc34:
/sbin/ldconfig: File /usr/lib/libstdc++.so.6.0.6 is empty, not checked.
Executing install script for gcc34-3.4.6-x86_64-2compat...

AND

spkisl867:/opt/RPM_Fawad # sh installpkg.sh gcc34-g++34-3.4.6-x86_64-2compat.tgz
WARNING: pkgtools are unstable with tar > 1.13.
You should provide a "tar-1.13" in your $PATH.
Installing package gcc34-g++34-3.4.6-x86_64-2compat...
PACKAGE DESCRIPTION:
gcc34-g++34: gcc-g++ (C++ for GCC)
gcc34-g++34:
gcc34-g++34: C++ support for the GNU Compiler Collection.
gcc34-g++34:
gcc34-g++34: This package contains those parts of the compiler collection needed
gcc34-g++34: to compile C++ code. The base gcc package is also required.
gcc34-g++34:
/sbin/ldconfig: File /usr/lib/libstdc++.so.6.0.6 is empty, not checked.
Executing install script for gcc34-g++34-3.4.6-x86_64-2compat...

You have new mail in /var/mail/root

Now when I type in gcc I still do not find it.

And once again I thank you all for your replies.
 
Old 02-11-2011, 07:53 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,738

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Post # 6 : Looks OK.

Quote:
Now when I type in gcc I still do not find it.
No, you get : /usr/gcc34/bin/gcc34, /usr/gcc34/bin/g++34 : See post #4.

Please do these commands : which gcc34 ; which g++34 ;
and : whereis gcc34 ; whereis g++34 ;
also : gcc34 -v ; g++34 -v
( /usr/gcc34/bin/gcc34 -v ; /usr/gcc34/bin/g++34 -v ).
... To confirm that everything is OK.

Using the new compiler : 'export CC=gcc34 CXX=g++34 && <other-command> ,
e.g. 'export CC=gcc34 CXX=g++34 && ./configure'
or 'export CC=gcc34 CXX=g++34 && make' , if you have a Makefile.

( If gcc34 and g++34 isn't in your path, please use :
export CC=/usr/gcc34/bin/gcc34 CXX=/usr/gcc34/bin/g++34 && <other-command> ).

..

Last edited by knudfl; 02-11-2011 at 09:18 AM.
 
Old 02-11-2011, 09:06 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,738

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Found some more :
"ftp5.gwdg.de/pub/opensuse/repositories/devel:/gcc/SLE-10_SDK/x86_64"
ftp://ftp5.gwdg.de/pub/opensuse/repo...10_SDK/x86_64/

Suggest : Install gcc43 + gcc43-c++.
Provides : /usr/bin/gcc-4.3 , /usr/bin/g++-4.3

Install order : 1) libmpfr1
ftp://ftp.pbone.net/mirror/ftp5.gwdg...1.1.x86_64.rpm

2) libgcc43-4.3.4_20091019-25.1.x86_64.rpm
3) libgomp43-4.3.4_20091019-25.1.x86_64.rpm
4) cpp43-4.3.4_20091019-25.1.x86_64.rpm
5) gcc43-4.3.4_20091019-25.1.x86_64.rpm
6) libstdc++43-4.3.4_20091019-25.1.x86_64.rpm
7) libstdc++43-devel-4.3.4_20091019-25.1.x86_64.rpm
8) gcc43-c++-4.3.4_20091019-25.1.x86_64.rpm

I don't have SLE_10 64bits, the above was tested with 32bits packages on SLE_10 32bits.

..

Last edited by knudfl; 02-11-2011 at 09:16 AM.
 
  


Reply

Tags
gcc43


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing GCC over existing gcc in Redhat linux prakasha.lunux Linux - Newbie 10 01-19-2011 09:34 PM
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 03:52 PM
installing GCC 'no acceptable C compiler found' picasso2526 Linux - Software 2 11-19-2007 10:05 PM
GCC not found? newuser455 Linux - Software 4 06-27-2005 03:55 AM
gcc vs. g++ -> iostream lib found vs. not found CooManChu Linux - General 1 12-11-2004 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration