Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Trying to install gcc with Command Line Tools - Mountain Lion

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

Posted on Jan 20, 2013 1:18 PM

Reply
6 replies

Jan 20, 2013 4:21 PM in response to Frank Caggiano

Thanks, Frank. I will install Xcode if I have too, but I would sure prefer not to install something so large just for this one purpose. Apple claims the Command Line Tools do it, but...............


A question, for my info.

Is the command

/usr/bin/gcc –-help

the correct command to verify that gcc was installed correctly?


I don't need to change the directory before I enter this, right?


I am just surprised that the reply appears to say gcc isn't installed, since the installation of the Command Line Tools went fine.

Jan 20, 2013 4:34 PM in response to Michael Holmes1

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.

Jan 20, 2013 5:11 PM in response to Frank Caggiano

(1) When I typed in the command

/usr/bin/gcc –v

I got this response:


Using built-in specs.

Target: i686-apple-darwin11

Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Deve loper/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1

Thread model: posix

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)


Does this say I successfully installed gcc? 4.2.1 is the latest version?

If I have successfully installed the latest version of gcc, then my problem lies with the installation of the CUDA driver.


If your command worked, then the NVIDIA "CUDA Getting Started Guide" doc I referenced above, which I am following, is just incorrect.


(2) I then went through the same steps as above, and got the same responses, until I got to the "make" command. This time I entered

make clean

And I got the response:


rm -f asyncAPI asyncAPI.o

rm -f cdpSimplePrint cdpSimplePrint.o

rm -f cdpSimpleQuicksort cdpSimpleQuicksort.o

rm -f clock clock.o *.bin

rm -f cppIntegration cppIntegration.o cppIntegration_gold.o main.o *.bin

rm -f cudaOpenMP cudaOpenMP.o

rm -f inlinePTX inlinePTX.o *.bin

rm -f matrixMul matrixMul.o

rm -f matrixMulCUBLAS.o matrixMulCUBLAS

rm -f matrixMulDrv matrixMulDrv.o data/matrixMul_kernel64.ptx matrixMul_kernel64.ptx

rm -f matrixMulDynlinkJIT matrixMulDynlinkJIT.o matrixMul_gold.o matrixMul_kernel_32_ptxdump.o matrixMul_kernel_64_ptxdump.o cuda_drvapi_dynlink.o

rm -f simpleAssert simpleAssert.o

rm -f simpleAtomicIntrinsics simpleAtomicIntrinsics.o simpleAtomicIntrinsics_cpu.o

rm -f simpleCallback simpleCallback.o multithreading.o *.bin

rm -f simpleCubemapTexture simpleCubemapTexture.o *.bin

rm -f simpleIPC simpleIPC.o

rm -f simpleLayeredTexture simpleLayeredTexture.o

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

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


Then I entered

make

And I got the response:


/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o asyncAPI.o -c asyncAPI.cu

g++ -arch x86_64 -o asyncAPI asyncAPI.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp asyncAPI ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -dc -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cdpSimplePrint.o -c cdpSimplePrint.cu

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_35,code=sm_35 -o cdpSimplePrint cdpSimplePrint.o -L/Developer/NVIDIA/CUDA-5.0/lib -lcudadevrt

mkdir -p ../../bin/darwin/release

cp cdpSimplePrint ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -dc -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cdpSimpleQuicksort.o -c cdpSimpleQuicksort.cu

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_35,code=sm_35 -o cdpSimpleQuicksort cdpSimpleQuicksort.o -L/Developer/NVIDIA/CUDA-5.0/lib -lcudadevrt

mkdir -p ../../bin/darwin/release

cp cdpSimpleQuicksort ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o clock.o -c clock.cu

g++ -arch x86_64 -o clock clock.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp clock ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cppIntegration.o -c cppIntegration.cu

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cppIntegration_gold.o -c cppIntegration_gold.cpp

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o main.o -c main.cpp

g++ -arch x86_64 -o cppIntegration cppIntegration.o cppIntegration_gold.o main.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp cppIntegration ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -lineinfo -Xcompiler -fopenmp -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o cudaOpenMP.o -c cudaOpenMP.cu

ptxas warning : Command line option '--generate-line-info' not supported for 'sm_1x architecture', will be ignored

g++ -arch x86_64 -o cudaOpenMP cudaOpenMP.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lgomp

mkdir -p ../../bin/darwin/release

cp cudaOpenMP ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o inlinePTX.o -c inlinePTX.cu

g++ -arch x86_64 -o inlinePTX inlinePTX.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp inlinePTX ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMul.o -c matrixMul.cu

g++ -arch x86_64 -o matrixMul matrixMul.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp matrixMul ../../bin/darwin/release

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMulCUBLAS.o -c matrixMulCUBLAS.cpp

g++ -arch x86_64 -o matrixMulCUBLAS matrixMulCUBLAS.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lcublas

mkdir -p ../../bin/darwin/release

cp matrixMulCUBLAS ../../bin/darwin/release

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMulDrv.o -c matrixMulDrv.cpp

g++ -arch x86_64 -o matrixMulDrv matrixMulDrv.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -framework CUDA

mkdir -p ../../bin/darwin/release

cp matrixMulDrv ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o matrixMul_kernel64.ptx -ptx matrixMul_kernel.cu

mkdir -p data

cp matrixMul_kernel64.ptx ./data

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMulDynlinkJIT.o -c matrixMulDynlinkJIT.cpp

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_gold.o -c matrixMul_gold.cpp

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_kernel_32_ptxdump.o -c matrixMul_kernel_32_ptxdump.c

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o matrixMul_kernel_64_ptxdump.o -c matrixMul_kernel_64_ptxdump.c

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -o cuda_drvapi_dynlink.o -c cuda_drvapi_dynlink.c

g++ -arch x86_64 -o matrixMulDynlinkJIT matrixMulDynlinkJIT.o matrixMul_gold.o matrixMul_kernel_32_ptxdump.o matrixMul_kernel_64_ptxdump.o cuda_drvapi_dynlink.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -framework CUDA

mkdir -p ../../bin/darwin/release

cp matrixMulDynlinkJIT ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAssert.o -c simpleAssert.cu

g++ -arch x86_64 -o simpleAssert simpleAssert.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp simpleAssert ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAtomicIntrinsics.o -c simpleAtomicIntrinsics.cu

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleAtomicIntrinsics_cpu.o -c simpleAtomicIntrinsics_cpu.cpp

g++ -arch x86_64 -o simpleAtomicIntrinsics simpleAtomicIntrinsics.o simpleAtomicIntrinsics_cpu.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp simpleAtomicIntrinsics ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleCallback.o -c simpleCallback.cu

g++ -arch x86_64 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o multithreading.o -c multithreading.cpp

g++ -arch x86_64 -o simpleCallback simpleCallback.o multithreading.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart -lpthread

mkdir -p ../../bin/darwin/release

cp simpleCallback ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleCubemapTexture.o -c simpleCubemapTexture.cu

g++ -arch x86_64 -o simpleCubemapTexture simpleCubemapTexture.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp simpleCubemapTexture ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleIPC.o -c simpleIPC.cu

g++ -arch x86_64 -o simpleIPC simpleIPC.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp simpleIPC ../../bin/darwin/release

/Developer/NVIDIA/CUDA-5.0/bin/nvcc -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -I/Developer/NVIDIA/CUDA-5.0/include -I. -I.. -I../../common/inc -o simpleLayeredTexture.o -c simpleLayeredTexture.cu

g++ -arch x86_64 -o simpleLayeredTexture simpleLayeredTexture.o -Xlinker -rpath /Developer/NVIDIA/CUDA-5.0/lib -L/Developer/NVIDIA/CUDA-5.0/lib -lcudart

mkdir -p ../../bin/darwin/release

cp simpleLayeredTexture ../../bin/darwin/release

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

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


There is still an "Error 2" at the end, so something still appears to be wrong.

Jan 20, 2013 5:29 PM in response to Michael Holmes1

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

Trying to install gcc with Command Line Tools - Mountain Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.