LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 10-14-2009, 04:03 AM   #1
Isuru Divarathne
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
Unhappy How to set Variable


following is the problem that I faced during the installation process of gcc-3.0.4
the steps I followed >>

* gunzip and tar -xf al gcc-3.0.4*.tar.gz files
* mkdir gcc-build;cd gcc-build
*then the following problem occured......

ot@localhost gcc-build]# /usr/gcc/gcc-3.0.4/configure --prefix=/opt-program-suffix=-3.0.4
Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /usr/gcc/gcc-build using "mt-frag"
/tmp/cNf3807/cNf3807.pos: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


prior to this we got these results

[root@localhost ~]# which gcc
/usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/libexec/gcc/i386-redhat-linux/3.4.3:/usr/java/jdk1.6.0_16/bin:/usr/apache-ant-1.7.1/bin:/root/bin)


[root@localhost ~]# set
ANT_HOME=/usr/apache-ant-1.7.1
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="00" [2]="15" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='3.00.15(1)-release'
CC=gcc
COLORS=/etc/DIR_COLORS.xterm
COLORTERM=gnome-terminal
COLUMNS=80
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9An1DiKmNp
DESKTOP_SESSION=default
DIRSTACK=()
DISPLAY=:0.0
EUID=0
GDMSESSION=default
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/tmp/keyring-kLC8m2/socket
GROUPS=()
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=1
HISTFILE=/root/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.6.0_16
KDEDIR=/usr
LANG=en_US.UTF-8
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36i=40;33:so=00;35:bd=40;33;01:cd=40;33;01r=01;05;37;41:mi =01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=0 0;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.g z=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00; 35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/root
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/libexec/gcc/i386-redhat-linux/3.4.3:/usr/java/jdk1.6.0_16/bin:/usr/apache-ant-1.7.1/bin:/root/bin
PIPESTATUS=([0]="0" [1]="0")
PPID=3757
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
PS1='[\u@\h \W]\$ '
PS2='> '
PS4='+ '
PWD=/root
RHINO_HOME=/usr/RhinoSDK
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/3814
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=3844
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-MfaKTe3843/agent.3843
SUPPORTED=en_US.UTF-8:en_US:en
TERM=xterm
UID=0
USER=root
WINDOWID=35660772
XAUTHORITY=/root/.Xauthority
_
to my knowledge there is a previous version of gcc is installed in /usr/libexec/i386-......
so I set the environmental variable for the new gcc and don't know whether it has been correctly set .The above command would display all my efforts in setting up environmental variable and the following I tried after above stuff

[root@localhost gcc-build]# make
Configuring in ./libiberty
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
make: *** [configure-target-libiberty] Error 1


[root@localhost gcc-build]# make install
/bin/sh /usr/gcc/gcc-3.0.4/mkinstalldirs /opt-program-suffix=-3.0.4 /opt-program-suffix=-3.0.4
mkdir /opt-program-suffix=-3.0.4


please anybody who got answers for the above situation reply immediately because we are stuck in the middle of a PROJECT AND IM AN APPRENTICER ...TO THIS FIELD
 
Old 10-14-2009, 08:17 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
It looks like you're trying to compile a compiler, without a compiler; clasic

It also looks like you might be running RedHat; so why don't you just install the RPM?
 
Old 10-14-2009, 08:42 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,808

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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
how to set a variable in a script and have the variable still set after script termin john test Linux - Newbie 9 10-21-2008 05:21 PM
set variable in G_CALLBACK? bendeco13 Programming 2 05-12-2007 12:50 PM
how to set $PATH variable definitely unihiekka Linux - Software 2 12-15-2005 10:12 AM
Set variable with value of another Ephracis Programming 7 12-25-2004 10:34 AM
how do you set the environment variable CC? mr.moto Linux - General 0 12-17-2001 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:23 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
Open Source Consulting | Domain Registration