CUDA nvcc error in func_common.inl(442)
Squelsh opened this issue · 1 comments
Squelsh commented
Hi!
After updating my Ubuntu, I get a nvcc error when compiling my code that uses GLM:
../detail/func_common.inl(442): error: expected a field name
Problem can be solved by additional temporary variable:
Replacing
// mod
template <typename genType>
GLM_FUNC_QUALIFIER genType mod(genType x, genType y)
{
return mod(tvec1<genType>(x), y).x;
}
with
// mod
template <typename genType>
GLM_FUNC_QUALIFIER genType mod(genType x, genType y)
{
tvec1<genType> ret_vec(mod(tvec1<genType>(x), y));
return ret_vec.x;
}
Any suggestions how to make it compile without patching GLM?
My system:
Ubuntu 16.04.1
CUDA 7.5 with nvcc V7.5.17
Ubuntu glm package (libglm-dev:i386 (= 0.9.7.2-1))
But problem also occurs with latest code from master.
Thanks,
Andreas
Groovounet commented
This issue is fixed with you proposed workaround... another annoying Cuda compiler bug!
Thanks for contributing,
Christophe