libcutil.a, archive has no table of contents

All -

I’m trying to build NVIDIA_CUDA_SDK_2.02.0807.1535_MACOSX and the make fails with “ld: in …/…/lib/libcutil.a, archive has no table of contents”.

OS X 10.5.5, XCode Version 3.0

/Developer/CUDA$ make

q - obj/release/bank_checker.cpp_o

q - obj/release/cmd_arg_reader.cpp_o

q - obj/release/cutil.cpp_o

q - obj/release/stopwatch.cpp_o

q - obj/release/stopwatch_linux.cpp_o

q - obj/release/multithreading.cpp_o

q - obj/release/paramgl.cpp_o

q - obj/release/param.cpp_o

q - obj/release/rendercheck_gl.cpp_o

make -C projects/alignedTypes/

ld: in …/…/lib/libcutil.a, archive has no table of contents

collect2: ld returned 1 exit status

make[1]: *** […/…/bin/darwin/release/alignedTypes] Error 1

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

I receive the same error when trying to build cuda-lame,

gcc -O3 -ffast-math -funroll-loops -Wall -fno-common -o lame main.o get_audio.o lametime.o parse.o portableio.o timestatus.o brhist.o -L/usr/local/cuda/lib -L/Users/username/NVIDIA_CUDA_SDK/lib …/libmp3lame/.libs/libmp3lame.a -lncurses -lcudart -lcutil -lm

ld: in /Users/username/NVIDIA_CUDA_SDK/lib/libcutil.a, archive has no table of contents

However, the archive appears to be valid –

$ ar -t /Developer/CUDA/lib/libcutil.a

bank_checker.cpp_o

cmd_arg_reader.cpp_o

cutil.cpp_o

stopwatch.cpp_o

stopwatch_linux.cpp_o

multithreading.cpp_o

bank_checker.cpp_o

cmd_arg_reader.cpp_o

cutil.cpp_o

stopwatch.cpp_o

stopwatch_linux.cpp_o

multithreading.cpp_o

bank_checker.cpp_o

cmd_arg_reader.cpp_o

cutil.cpp_o

stopwatch.cpp_o

stopwatch_linux.cpp_o

multithreading.cpp_o

$ cd /Developer/CUDA/common/

$ make

q - obj/release/bank_checker.cpp_o

q - obj/release/cmd_arg_reader.cpp_o

q - obj/release/cutil.cpp_o

q - obj/release/stopwatch.cpp_o

q - obj/release/stopwatch_linux.cpp_o

q - obj/release/multithreading.cpp_o

$ (Build generates no errors)

Any suggestions?

Thanks for your assistance.

Solved:

$ ranlib libcutil.a

(and later *.a)

Thanks for posting this, that was very helpful. Is there any chance this will make its way into the official Makefile?