Skip navigation

Trying to install gcc with Command Line Tools - Mountain Lion

1641 Views 6 Replies Latest reply: Jan 20, 2013 5:29 PM by Frank Caggiano RSS
Michael Holmes1 Level 1 Level 1 (65 points)
Currently Being Moderated
Jan 20, 2013 1:18 PM

I am trying to update the CUDA driver for an NVIDIA GeForce GTX 570 card. To do that, I need gcc installed.

It appears I have not been able to install gcc, and I need help doing this.

 

I am a newbie to both Terminal commands and to updating CUDA drivers, so please bear with me.

I am running Mountain Lion (10.8.2) on a dual quad core Mac Pro (mid 2010 model).

 

I have been following the guide here:

http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-mac-os-x/index.html

 

To install gcc w/o having to install Xcode (I don’t need all of Xcode and so don’t want it installed), I downloaded the “Command Line Tools (OS X Mountain Lion) for Xcode – November 2012” from the Apple Developer Downloads page:

xcode452cltools10_86938211a.dmg

 

I also downloaded the “Mac OS X CUDA 5 Production Release” from the NVIDIA Developers Download page:

cuda_5.0.36_macos.pkg

 

I installed the Command Line Tools, and then installed the CUDA 5 Release (driver, toolkit, samples). Both installed successfully.

 

To verify that gcc was installed, I entered the Terminal command (the guide above says this is how I check):

/usr/bin/gcc –-help

 

The resulting message was:

i686-apple-darwin11-llvm-gcc-4.2: –-help: No such file or directory

i686-apple-darwin11-llvm-gcc-4.2: no input files

 

I take it this means I did not successfully install gcc.

Please tell me what I am doing wrong.


................................................................................ ................................................................................ .................................

NOTE: The steps below may not be of interest to you, since they are steps to verify the CUDA driver was updated (once gcc is successfully installed).

But I included them in the post, in case they are helpful..

 

I went to “Define the environment variables”.

I entered the command

export PATH=/Developer/NVIDIA/CUDA-5.0/bin:$PATH

I got no message

 

I then entered the command:

export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.0/lib:$DYLD_LIBRARY_PATH

I got no message

 

To verify that the CUDA kernel extension is loaded, I then entered the command:

kextstat | grep -i cuda

 

I got this message:

123 0 0xffffff7f81e69000 0x2000 0x2000 com.nvidia.CUDA (1.1.0)

 

I then checked the CUDA Toolkit version by entering the command:

nvcc –V

 

I got the message:

nvcc: NVIDIA (R) Cuda compiler driver

Copyright (c) 2005-2012 NVIDIA Corporation

Built on Fri_Sep_28_16:10:16_PDT_2012

Cuda compilation tools, release 5.0, V0.2.1221

 

To change the directory, I then entered:

cd /Developer/NVIDIA/CUDA-5.0/samples

 

Then to compile the samples, I entered:

make

 

The resulting message was:

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

make[1]: Nothing to be done for `all'.

Makefile:79: *** MPI not found, not building simpleMPI.. Stop.

make: *** [0_Simple/simpleMPI/Makefile.ph_build] Error 2

 

To run the binaries, I changed the directory by entering:

cd /Developer/NVIDIA/CUDA-5.0/samples/C/bin/darwin/release

and then entered

deviceQuery

I got the message:

-bash: cd: /Developer/NVIDIA/CUDA-5.0/samples/C/bin/darwin/release: No such file or directory

Final Cut Pro X, OS X Mountain Lion (10.8.2), Mac Pro 2 x 2.4GHz Quad-Core Intel
  • etresoft Level 7 Level 7 (23,930 points)

    You appear to have installed gcc correctly. Why would you want to do that if you don't know how it works?

  • Frank Caggiano Level 7 Level 7 (22,905 points)

    I would install the complete Xcode form the App Store. There are dependencies that might be affecting this.

     

    Also once you've done that when you run make run make clean first, then run make. This will remove any possible files that are left behind and might be causing problems.

  • Frank Caggiano Level 7 Level 7 (22,905 points)

    As for Xcode, I don;t know if that will help your situation but it seems like a good first step to figure out whats going on. I know that with the current version of Xcode Apple has changed a bunch of things around. If it helps fine if not getting rid of it (or getting rid of it after you do what you have to) is fairly easy.

     

    I don't know that I would use ---help to confirm a good install. What does /usr/bin/gcc -v show?

     

    Before you do any of this you can try doing the make clean then the make to see if that has any affect.

  • Frank Caggiano Level 7 Level 7 (22,905 points)

    Weel it looks like at least now you should have the directory you tried to cd into in your first post

    cd /Developer/NVIDIA/CUDA-5.0/samples/C/bin/darwin/release

    that command should work.  The darwin/release directory was made by the make command and files were copied into it.

     

    Hunting around this appears to be a common error when doing this on a OS X. MPI is another bit of code you would need to load but it appears that simpleMPI is just some test/demo stuff you may not need. (again all this is from searchin on hte web not direct knowledge)

     

    Try running make -k which will tell make to keep going it it gets any errors and see what it produces. As I wrote above it appears you now have the darwin/release directory so you can cd into it and see what's there.

     

    regards

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.