NVIDIA / NVIDIA/open-gpu-kernel-modules
Can't compile with DEBUG flag set on 535.86.05 (error: unknown type name ‘class’)
Open
Nobody has claimed this yet.
build-problem
- Dominant language
- C
- Stars
- 17.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
NVIDIA Open GPU Kernel Modules Version
535.86.05
Operating System and Version
Ubuntu 22.04
Kernel Release
5.19.0-32-generic
Build Command
make modules DEBUG=1
Terminal output/Build Log
lachlan@lachlan-ubuntu-server:~/Downloads/open-gpu-kernel-modules-535.86.05$ make modules DEBUG=1
make -C src/nvidia
make[1]: Entering directory '/home/lachlan/Downloads/open-gpu-kernel-modules-535.86.05/src/nvidia'
[ nvidia ] CC generated/g_access_cntr_buffer_nvoc.c
[ nvidia ] CC generated/g_all_dcl_pb.c
[ nvidia ] CC generated/g_binary_api_nvoc.c
[ nvidia ] CC generated/g_bindata.c
[ nvidia ] CC generated/g_ccsl_nvoc.c
[ nvidia ] CC generated/g_ce_utils_nvoc.c
In file included from generated/g_ce_utils_nvoc.c:8:
generated/g_ce_utils_nvoc.h:169:25: error: unknown type name ‘class’
169 | NVOC_PREFIX(ceutilsapi) class CeUtilsApi : GpuResource
| ^~~~~
generated/g_ce_utils_nvoc.h:169:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
169 | NVOC_PREFIX(ceutilsapi) class CeUtilsApi : GpuResource
| ^
make[1]: *** [Makefile:196: _out/Linux_x86_64/g_ce_utils_nvoc.o] Error 1
make[1]: Leaving directory '/home/lachlan/Downloads/open-gpu-kernel-modules-535.86.05/src/nvidia'
make: *** [Makefile:34: src/nvidia/_out/Linux_x86_64/nv-kernel.o] Error 2
More Info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with make modules DEBUG=1 from the repository root, then inspect src/nvidia/generated/g_ce_utils_nvoc.h at line 169 and the surrounding build rules in src/nvidia/Makefile. Trace why this generated header is compiled as C and confirm the fix by rerunning the same build successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, ubuntu
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100