Problem compiling CUDA SDK 3.1 compiling CUDA SDK 3.1 on mac os 10.6.3 for Geforce 320m

Hello all,

   Recently I purchased Macbook pro and wanted to install CUDA. I had successfully installed CUDA driver, tool kit, and sdk.
   But when tried to compile sdk I am getting compile error. 

   bash-3.2$ make i386=1

a - obj/i386/release/bank_checker.cpp.o
a - obj/i386/release/cmd_arg_reader.cpp.o
a - obj/i386/release/cutil.cpp.o
a - obj/i386/release/stopwatch.cpp.o
a - obj/i386/release/stopwatch_linux.cpp.o
a - obj/i386/release/multithreading.cpp.o
make -C src/alignedTypes/
i686-apple-darwin10-g+±4.0.1: …/…/bin/darwin/release/alignedTypes: No such file or directory
make[1]: *** […/…/bin/darwin/release/alignedTypes] Error 1
make: *** [src/alignedTypes/Makefile.ph_build] Error 2

     I do not understand why make file is picking i686-apple-darwin10-g++-4.0.1 compiler. it is supposed to pick g++-4.0 compiler.

     Can anyone help me on this issue. Please let me know if you guys find anything, that I am doing wrong. Any help would be appreciated. 

Thanks,
Sri.

You should install last version of XCode. You should have at least gcc 4.2.1 and anyway on Mac OS X it’s an Apple version of gcc.

I have installed the latest version of Xcode 3.2.3. (OS 10.6.4)

I see the same errors when compiling the CUDA_SDK:

[codebox]$ make emu=1

a - obj/i386/release/bank_checker.cpp.o

a - obj/i386/release/cmd_arg_reader.cpp.o

a - obj/i386/release/cutil.cpp.o

a - obj/i386/release/stopwatch.cpp.o

a - obj/i386/release/stopwatch_linux.cpp.o

a - obj/i386/release/multithreading.cpp.o

make -C src/alignedTypes/

sh: /usr/local/cuda/bin/…/open64/bin/nvopencc: Bad CPU type in executable

make[1]: *** [obj/i386/emurelease/alignedTypes.cu.o] Error 126

make: *** [src/alignedTypes/Makefile.ph_build] Error 2[/codebox]

Thanks in advance

Hi,

I imagine you compiled the first bunch of files with the old compiler, then installed the

new compiler, but it sees a version mismatch in the binary.

When I get this error, I clean all the binary file (or better, delet and extract the SDK from sctratch!)

bye

giammy

Deleted the GPU Computing folder in /Developer and did a fresh install

Still getting the same error.

Uninstalled everything using

[codebox]sudo kextunload /System/Library/Extensions/CUDA.kext

cd /Library/Frameworks/

sudo rm -rf CUDA.framework

cd /System/Library/Extensions/

sudo rm -rf CUDA.kext

cd /Library/LaunchAgents/

sudo rm -rf com.nvidia.CUDASoftwareUpdate.plist

cd /Library/PreferencePanes/

sudo rm -rf “CUDA Preferences.prefPane/”

cd /System/Library/StartupItems/

sudo rm -rf CUDA

cd /usr/local/

sudo rm -rf cuda[/codebox]

Installed the CUDA3.1.10 driver followed by toolkit and then SDK.

GCC version is

[codebox]$ gcc -v

Using built-in specs.

Target: i686-apple-darwin10

Configured with: /var/tmp/gcc/gcc-5664~38/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/[1][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/usr/include/c++/4.2.1 --host=i686-apple-darwin10 --target=i686-apple-darwin10

Thread model: posix

gcc version 4.2.1 (Apple Inc. build 5664)[/codebox]

[codebox]$ make emu=1

a - obj/i386/release/bank_checker.cpp.o

a - obj/i386/release/cmd_arg_reader.cpp.o

a - obj/i386/release/cutil.cpp.o

a - obj/i386/release/stopwatch.cpp.o

a - obj/i386/release/stopwatch_linux.cpp.o

a - obj/i386/release/multithreading.cpp.o

a - obj/i386/release/paramgl.cpp.o

a - obj/i386/release/param.cpp.o

a - obj/i386/release/rendercheck_gl.cpp.o

src/shrUtils.cpp: In function ‘int shrLogV(int, int, const char*, char*)’:

src/shrUtils.cpp:399: warning: format not a string literal and no format arguments

src/shrUtils.cpp:403: warning: format not a string literal and no format arguments

src/shrUtils.cpp:406: warning: format not a string literal and no format arguments

./…/shared//inc/shrUtils.h: At global scope:

./…/shared//inc/shrUtils.h:55: warning: ‘nGpuArchCoresPerSM’ defined but not used

./…/shared//inc/shrUtils.h:55: warning: ‘nGpuArchCoresPerSM’ defined but not used

a - obj/i386/release/shrUtils.cpp.o

a - obj/i386/release/rendercheckGL.cpp.o

a - obj/i386/release/cmd_arg_reader.cpp.o

make -C src/alignedTypes/

sh: /usr/local/cuda/bin/…/open64/bin/nvopencc: Bad CPU type in executable

make[1]: *** [obj/i386/emurelease/alignedTypes.cu.o] Error 126

make: *** [src/alignedTypes/Makefile.ph_build] Error 2

[/codebox]

Also, I have

[codebox]export PATH=/usr/local/cuda/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin:/opt/local/include:$PATH

export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/lib:$DYLD_LIBRARY_PATH

[/codebox]

Any suggestions??

Thanks in advance


  1. cg ↩︎