Cuda #include_next math.h not found


I’m using l4t-r32.4.3 based yocto environment. When I try to compile my cuda program I’m stuck with the following compiler issue that #include_next math.h not found.

I found this issue with both gcc versions 7.3.0 and 8.3.0. I’m using cmake enable_laguage(cuda) to enable cuda compilation.

How to get rid of this issue? I have noticed that the cuda is using isystem to include the files rather than -I.

| In file included from work/armv8a_tegra194-oe4t-linux/testsoftware/6.x.y-r0/recipe-sysroot-native/usr/local/cuda-10.2/bin/..//include/crt/math_functions.h:8841:0,
|                  from /work/armv8a_tegra194-oe4t-linux/testsoftware/6.x.y-r0/recipe-sysroot-native/usr/local/cuda-10.2/bin/..//include/crt/common_functions.h:267,
|                  from /work/armv8a_tegra194-oe4t-linux/testsoftware/6.x.y-r0/recipe-sysroot-native/usr/local/cuda-10.2/bin/..//include/cuda_runtime.h:115,
|                  from <command-line>:0:
| /work/armv8a_tegra194-oe4t-linux/testsoftware/6.x.y-r0/recipe-sysroot/usr/include/c++/7.3.0/cmath:45:15: fatal error: math.h: No such file or directory
|  #include_next <math.h>
|                ^~~~~~~~
| compilation terminated.

hi anishmonachan7:
could you find math.h in your environment, if exist , try to include it like this :
INCLUDE_PATH+= /usr/include