Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
EDIT: So I went ahead and impatiently installed the gcc compiler on the HPC Website. I again ran the command gcc -v and it returned the exact same info. --enable gfortran was NOT included. So I am thinking that the compilers are the same. And I am still getting the same "error trying to exec 'f951': execvp: No such file or directory" error.

You probably have two gccs on your system now the one from Xcode and the one for gfortran. Did you install the gfortran one in /usr/local/bin? If not, substitute the right path.

If so, ether moving /usr/local/bin before /usr/bin in your path e.g.
Code:
export PATH=/usr/local/bin:$PATH

EDIT: You might also be able to set the environment variable CC to the exact path where the "right" gcc is located.

B
 
You probably have two gccs on your system now the one from Xcode and the one for gfortran. Did you install the gfortran one in /usr/local/bin? If not, substitute the right path.

If so, ether moving /usr/local/bin before /usr/bin in your path e.g.
Code:
export PATH=/usr/local/bin:$PATH

EDIT: You might also be able to set the environment variable CC to the exact path where the "right" gcc is located.

B

I'll be honest b, I don't really know what this means :eek: I did the install like it said to. I don't know how I would or would not have installed gfortran to /usr/local/bin or not. Was I supposed to instruct that to happen somewhere? I really do not know anything about these terminal commands either; I am just "monkey-see monkey-do" at this point. I don't even know what language these commands are in.


Here's a question I already know the answer to: Is there any way to easily UNINSTALL the gfortran and gcc compiler that I installed via Terminal? I would really like to just start fresh. If not ...meh ... I'll live.
 
Here's a question I already know the answer to: Is there any way to easily UNINSTALL the gfortran and gcc compiler that I installed via Terminal? I would really like to just start fresh. If not ...meh ... I'll live.

Not trivially. There is no installer, you basically just created a bunch of files somewhere in the /usr/local folder tree from the tar.gz file (like a ZIP or RAR) file.

I just checked. The gcc-snwleo-intel-bin.tar.gz archive is all you need. it contains both the right version of gfortran and gcc and installs them both to /usr/local/bin.

You just need to make sure that when it tries to run gcc it finds the /usr/local version not the Xcode /usr version.

The PATH statement I wrote before should get you past the compiler error, I'm not sure if the include and library paths are set right though, but we can deal with that.

EDIT:

Actually I had no problems with it even without the PATH statement.

create a test file using your code above as ~/Documents/deleteme.f

downloaded gcc-snwleo-intel-bin.tar.gz to ~/Downloads then in Terminal

Code:
$ cd /
$ sudo tar zxvf ~/Downloads/gcc-snwleo-intel-bin.tar.gz
$ cd ~/Documents
$ gfortran -o deleteme deleteme.f
$ ./deleteme
   3.0000000000000000
Works fine. I wonder if you have some environment variables getting in the way. Can you post the output of the set command?

B
 
Hi b. What is the "set command" now? I really don't know what is going on here. Sorry. I need really explicit instructions like: Go to the terminal and type "xyz" and post the results back here.

Thanks again for all of your time guys.
 
What is the "set command" now?

That would be type
Code:
$ set
;)

Let me put together a complete start to finish set of instructions that worked for me.

EDIT: I was trying to get the file download in the instructions, but I can't seem to get ti to download with curl.

So anyhow to repeat:

Assumptions:
Your source file is in ~/Documents/deleteme.f
gcc-snwleo-intel-bin.tar.gz has been downloaded as ~/Downloads/gcc-snwleo-intel-bin.tar.gz

Code:
$ cd /
$ sudo tar zxvf ~/Downloads/gcc-snwleo-intel-bin.tar.gz
$ cd ~/Documents
$ ls /usr/local/bin
$ which gfortran
$ which gcc
$ gfortran -o deleteme deleteme.f
$ ./deleteme
   3.0000000000000000

if that doesn't work, something in your environment must be getting in the way, so type:
Code:
$ set
and post the results.

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.