linker undefined reference error

Got this error when I use g++ to link:

$ make -B pbra_gpu.o
/usr/local/cuda/bin/nvcc -I/usr/local/cuda/include/ --compiler-options="-m64 -pipe -O2 -Wall -Wno-unused-result -fPIC -g" -arch="sm_20" -DUSE_TEXTURES -o pbra_gpu.o -c pbra_gpu.cu

$ make m3d_main
g++ -L/usr/local/cuda/lib64 -lcudart -g -m64 -Wl,-O1 -o m3d_main m3d_main.o pbra_read_data.o pbra.o pbra_beam_grid.o util.o nrutil.o beam_data.o pbra_gpu.o
pbra_gpu.o: In function `__device_stub__Z12kernel_Loop1iiiPKfS0_S0_S0_S0_S0_PfS1_S1_S1_S1_S1_S1_ffS0_S0_ff':
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: undefined reference to `cudaSetupArgument'
pbra_gpu.o:/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:12: more undefined references to `cudaSetupArgument' follow
pbra_gpu.o: In function `cudaLaunch<char>':
/usr/local/cuda/include/cuda_runtime.h:1072: undefined reference to `cudaLaunch'
pbra_gpu.o: In function `__device_stub__Z12kernel_Loop2iiiPfS_S_S_S_S_PKfS1_S1_S1_S1_S1_S_Pi':
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: undefined reference to `cudaSetupArgument'
/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: undefined reference to `cudaSetupArgument'
pbra_gpu.o:/tmp/tmpxft_00002716_00000000-3_pbra_gpu.cudafe1.stub.c:1: more undefined references to `cudaSetupArgument' follow
.... .... ....

This errors goes away when I use nvcc to link instead.

The strange thing is that this is only happening in one of four similar build machines I have. I am trying to figure out what could be the difference in configuration/environment that can lead to the difference in behavior.

Any idea?

EDIT: Silly me. This machine had gcc-4.6, not compatible with CUDA.