CUDA compilation failure

After no problems at all, suddenly I’m getting CUDA failures on Linux. Neither kernel nor nvidia upgraded (except, now nvidia is since the problem cropped up, but with the same results).

The initial error is:

compiling CUDA kernel …
“nvcc” -arch=sm_30 -m64 --cubin “/usr/share/blender/2.77/scripts/addons/cycles/kernel/kernels/cuda/kernel.cu” -o “/home/steve/.config/blender/2.77/cache/cycles_kernel_sm30_311C6CB52A88568C18C3DA3897396C20.cubin” --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/2.77/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=75
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: identifier “nullptr” is undefined

/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include/stddef.h(436): error: expected a “;”

/usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++config.h(202): error: expected a “;”

/usr/include/c++/6.1.1/exception(63): error: expected a “;”

/usr/include/c++/6.1.1/exception(69): error: expected a “;”

/usr/include/c++/6.1.1/exception(77): error: expected a “;”

/usr/include/c++/6.1.1/exception(85): error: expected a “;”

/usr/include/c++/6.1.1/exception(95): error: expected a “{”

But there’s much more. Ideas?

GTX670 2GB.

EDIT: I should add (though not sure it’s relevant) CPU rendering works. Cycles both times.

Hi, got no problems to build kernel yesterday, GTX 670 too, but I am never build kernels during compiling Blender.
You have to build the kernel every time, don´t you.
Anyway should work.
Step by at #blendercoders IRC freenode.net, may you can catch Cycles developer, the don´t often read in forums.
Best time is CET daytime.

Cheers, mib

I’m pretty sure that the problem here is your GCC version, which seems to be 6.1.1 - try installing an older version as well and setting CUDA_HOST_COMPILER in CMake to the older gcc.

Hm, should be fixed with:

https://developer.blender.org/rBScefbe8fe54016d4a16a9ba06c56d6c3c0c3d6024

Cheers, mib

Excellent, thank you all. On CPU at the moment since downgrading GCC breaks dependencies.

OK, I hope that the change has made it into the git version - currently building. We’ll see.

Hello,

I have pretty much the same problem, did you manage to build a proper version?

thanks

No. Couldn’t get Blender to build, so switched to the buildbot version and working fine.

gcc 6.1 are you by chance on Fedora 24

No, Arch linux 64 bit.