The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Ubuntu
.
google unix.com



Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to configure IP in SUN Machine daya.pandit SUN Solaris 4 11-18-2008 05:52 AM
How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries? f.ben.isaac High Level Programming 12 11-14-2008 11:25 AM
how to configure nfs with in the same machine sridhusha Linux 3 12-11-2007 04:27 PM
Compiler issues with ./configure solidsigma SUN Solaris 0 02-21-2006 02:27 PM
plz Help How should I configure cc compiler output file plz help??? atiato UNIX for Dummies Questions & Answers 4 02-12-2002 02:11 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-17-2008
viji19812001 viji19812001 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 8
./configure command Error while trying to install GCC compiler on unix machine

Hi,

I need to install the GCC compiler on a my Linus machine.
First step is to run the ./configure command and here we need to specify
./configure --target="target machine name (CPU type-Manufacturer-OS)

or other way would be just give the command ./configure and it guesses the target name from the file config.guess.

uname -a in my system gives
Linux 137.132.80.158 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux

So I tried giving the format CPU type-Manufacturer-OS for my system as
i686-unknown-Linux

Also tried adding a new case in config.guess file to add my case ie for i686.

It keeps giving error "Invalid Configuration" if I directly give in the configure command or edit the config.guess file.

How do I give the rite values of CPU type-Manufacturer-OS ...Is there any command to find the values.Please let me know as Iam not able to proceed forward as configure command itself gives error.

Regards,
vijaya.

Last edited by viji19812001; 12-18-2008 at 12:06 AM..
  #2 (permalink)  
Old 12-18-2008
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,933
You cannot build gcc without a C compiler! It's a chicken-and-egg problem.

You ought to install the binary version that comes with whatever distribution you're running, there's no reason to compile it yourself.
  #3 (permalink)  
Old 12-18-2008
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,671
Dear viji19812001,

Please post the output of this command:

Code:
gcc -v
and also:
Code:
cat /proc/version
  #4 (permalink)  
Old 12-18-2008
viji19812001 viji19812001 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 8
Hi Neo,

gcc -v gives the following output:

Quote:
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)
The other command cat /proc/version says File does not exist......


So do I need to use the target name which comes in gcc-v in my configure command. Please let me know.

Regards,
vijaya.

Last edited by Neo; 12-19-2008 at 05:14 PM.. Reason: fixed typo, changed ggc to gcc ....
  #5 (permalink)  
Old 12-19-2008
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,671
Well, we found out you have gcc installed already, so that is a good thing. We found out that gcc was configured with
Code:
target=i386-redhat-linux
so that should work again.

However, since gcc is already installed, maybe you don't need to install again?

Also, I am a bit confused why

Code:
cat /proc/version
gives a file does not exist error, but never mind, I assume you are running some version of redhat, per the output of gcc -v
  #6 (permalink)  
Old 12-21-2008
viji19812001 viji19812001 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 8
Hi Neo,

Thanx!!!!

Configure command works now with the values i386-redhat-linux.....

Also sorry I had done some mistake cat /proc/version gives the following output:

Linux version 2.6.25-14.fc9.i686 (mockbuild@) (gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) ) #1 SMP Thu May 1 06:28:41 EDT 2008

Let me actually tell you what Iam trying to do so that you could help me in a better way.
Iam trying to install the opentv SDK3.2 kit (interactive tv application ) from the link Welcome to OpenTV .
Thier code is in ansi C and needs to be complied using the kit to get the ocode as the output.
Iam doing this for the first time and just following the instructions given in thier install file.


Install File says:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.



Now Output for configure in my system is as follows:
I ran the command from the gcc2.60 directory as it has all the .c files present.

[vijv@137 gcc-2.60] ./configure i386-redhat-linux
Linked `config.h' to `./config/i386/xm-linux.h'
Linked `tm.h' to `./config/i386/linux.h'
Linked `aux-output.c' to `./config/i386/i386.c'
Linked `tconfig.h' to `./config/i386/xm-linux.h'
Linked `hconfig.h' to `./config/i386/xm-linux.h'
Linked `md' to `./config/i386/i386.md'
Merged i386/x-linux.
Merged c++ fragment(s).
Created `./Makefile'.
Merged i386/x-linux.
Created `cp/Makefile'.
Links are now set up for target i386-redhat-linux.


Now when I give make command as per the second step in the same directory ,it gives me errors....Am I doing something wrong ?....or is this the rite way to do it.
Do let me know in case u need any more info from me.

output of make command:

make
cc -DIN_GCC -DPOSIX -g -I. -I. -I./config \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/i386-redhat-linux/2.6.0/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/i386-redhat-linux/2.6.0/sys-include\" \
-DTOOL_INCLUDE_DIR=\"/usr/local/i386-redhat-linux/include\" \
-c `echo ./cccp.c | sed 's,^\./,,'`
cccp.c: In function ‘main’:
cccp.c:1193: warning: incompatible implicit declaration of built-in function ‘strlen’
cccp.c:1228: warning: incompatible implicit declaration of built-in function ‘bzero’
cccp.c:1278: warning: incompatible implicit declaration of built-in function ‘strcpy’
cccp.c:1312: warning: incompatible implicit declaration of built-in function ‘strcpy’
cccp.c:1313: warning: incompatible implicit declaration of built-in function ‘strcat’
cccp.c:1347: warning: incompatible implicit declaration of built-in function ‘strcpy’

............................there are many similar warnings before the command completes.....

Thanx for ur time,
vijaya.
  #7 (permalink)  
Old 12-23-2008
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,671
Correct. You don't need to install GCC unless the version of the OPTV SDK fails to compile due to compiler errors. This normally happens when the library versions are not compatible. If your OPTV SDK compiles, and it seems that it does, you should be fine.

You can contact OPTV, give them your GCC version number and ask them if they have any further recommendations. Often, the instructions will say "GCC version x.y.z, or higher".

Do not go back to an earlier version of GCC.

.... From my mobile...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0