Skip to content

Building with gcc-15 fails #814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
heitbaum opened this issue Mar 19, 2025 · 8 comments · May be fixed by #841
Open
1 task done

Building with gcc-15 fails #814

heitbaum opened this issue Mar 19, 2025 · 8 comments · May be fixed by #841

Comments

@heitbaum
Copy link

NVIDIA Open GPU Kernel Modules Version

570.124.06

Operating System and Version

Ubuntu 24.04

Kernel Release

6.12

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • I am running on a stable kernel release.

Build Command

Build using gcc-14.2 completes.
Build with gcc-15.x fails with errors that were warnings in previous gcc.

Workaround is to add the following no-error statements, until the code is updated to avoid these warnings.

EXTRA_CFLAGS += -Wno-error=return-type -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-pointer-types

Terminal output/Build Log

As above

Also errors

./common/inc/nv-mm.h:29:13: error: conflicting types for 'vm_fault_t'; have 'int'
29 | typedef int vm_fault_t;
| ^~~~~~~~~~

./common/inc/nv-time.h:113:19: error: conflicting types for 'timespec64_to_ns'; have 's64(struct timespec64 *)' {aka 'long long int(struct timespec64 *)'}
113 | static inline s64 timespec64_to_ns(struct timespec64 *ts)
| ^~~~~~~~~~~~~~~~

More Info

EXTRA_CFLAGS += -DNV_VERSION_STRING=\"570.124.06\"

@edpil02
Copy link

edpil02 commented Mar 19, 2025

Builds fine with gcc-15 for me ( 570.124.04 and last update 570.133.07).

~$ gcc --version
gcc (GCC) 15.0.1 20250313 (Red Hat 15.0.1-0)
Copyright © 2025 Free Software Foundation, Inc.

Image

@edpil02
Copy link

edpil02 commented Mar 19, 2025

I'm using the development version of Fedora (rawhide), which started using gcc-15 in early January.
I had a lot of problems at first, but Fedora has worked hard to stabilize it.

@dekomote
Copy link

Fedora 42, not building neither 570 nor 575.

@ptr1337
Copy link

ptr1337 commented Apr 17, 2025

Fedora 42, not building neither 570 nor 575.

Maybe report the issue to the rpmfusion maintainers to apply the patches.

@dekomote
Copy link

dekomote commented Apr 17, 2025

Fedora 42, not building neither 570 nor 575.

Maybe report the issue to the rpmfusion maintainers to apply the patches.

This is when trying the .run file or compiling it by hand, not using the rpmfusion packages.
Switching to gcc-14 everything works as it should.

@edpil02
Copy link

edpil02 commented Apr 18, 2025

Rpmfusion added a patch (nvidia-kernel-ccflags-y.patch) for the latest 575.51.02 and fc43 rawhide ; but there is no build yet for fc42.

@heitbaum
Copy link
Author

I can confirm that using https://github.com/negativo17/nvidia-kmod/blob/fedora-42/nvidia-kernel-ccflags-y.patch allows for compile with gcc-15 and linux-6.14.1

@heitbaum
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants