You are not logged in.

#1 2025-04-30 23:14:20

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I did a full upgrade which included the various parts of gcc version 15.1.1+r7+gf36ec88aa85a-1

full upgrade command

 pacman -Syu 

Subsequent attempts to compile NVIDIA modules both the open source and proprietary and several versions failed with errors including

 ././conftest/functions.h:75:2: error: #error dma_buf_export() conftest failed!
      75 | #error dma_buf_export() conftest failed! 


amongst many others

downgrading to 14.2.1+r753+g1cd744a6828f-1 fixed the issues and everything would compile again

downgrade command

 pacman -U gcc-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst gcc-fortran-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst gcc-libs-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst lib32-gcc-libs-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst 

Last edited by TuxThepenguin76 (2025-05-01 11:13:12)

Offline

#2 2025-04-30 23:17:14

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

1. please post the exact command you used.
2. Please post the exact output you received.
3. Please use code tags

Offline

#3 2025-04-30 23:34:43

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I have added code tags and shown the exact commands

the errors output would be horrible and I was doing it on a basic shell and I wasn't "tee"-ing my output ( and because the gui was broken ) so I can post the logs but they would be huge and not all that helpful. I'm happy to dig them up and send them zipped if we think there is value to them

the basics are with the new 15.1.1 GCC compiling Nvidia modules was broken on multiple versions of the kernel , on multiple versions of the driver , with both the open and proprietary versions of the  kernel module.
as soon as the 14.2.1 revision from Feb was reinstalled everything was fixed and worked perfectly

Offline

#4 2025-04-30 23:56:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,656

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

Are you holding back the kernel? The modules MUST be built with the same version of gcc that built the kernel.

Offline

#5 2025-05-01 01:26:02

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

well this is the first and only time i'm hearing about this, and there is no arcch news about this so there's something about your system that is preventing this and it seems like user intervention that is causing this. What is your Linux Kernel version

Offline

#6 2025-05-01 05:57:46

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

there was a kernel upgrade at the same time as the GCC one

[2025-04-30T23:17:22+0100] [ALPM] upgraded linux-zen (6.14.4.zen1-1 -> 6.14.4.zen1-2)

One of the first things I tried was rolling back the kernel before I tried variations of driver versions noted above and then rolled back gcc.

I'm not aware of any non standard behaviors, configs  or packages which would make me an outlier.
I was so concerned about the compile issue I ended up running memtest86 on the system for 30 mins thinking it might be a hardware issue.

Offline

#7 2025-05-01 06:03:51

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

and you are using the nvidia-dkms from pacman repos correct? both propriety and open?

Offline

#8 2025-05-01 06:42:36

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I tried the nvidia-all packages ( 2 driver versions ) and the vendor .run files ( 2 driver versions ) and I tried both the GPL and proprietary kernel modules
the dkms update failed after the gcc upgrade but there had been no change in the driver packages in the interim
I can supply a copy of the nvidia-installer.log if needed but compressed it is 288k and I don't think I can attach files

Offline

#9 2025-05-01 07:11:47

seth
Member
Registered: 2012-09-03
Posts: 63,504

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I tried […] and the vendor .run files

You may thank the gods that this has failed.

https://wiki.archlinux.org/title/Dynami … ld_modules
You can use "… |& tee wtf.log" or https://man.archlinux.org/man/core/util … cript.1.en and then

cat wtf.log | curl -F 'file=@-' 0x0.st

Do NOT try to use the upstream install script again!

Online

#10 2025-05-01 08:16:30

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

cleaning out old versions of the drivers and switching to the nvidia-beta-dkms AUR tier packages appears to have fixed the issue.
the 570 series is much less functional/stable than the 575 branch which precludes me from using mainline pacman repos

Offline

#11 2025-05-01 08:22:45

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

TuxThepenguin76 wrote:

there was a kernel upgrade at the same time as the GCC one

[2025-04-30T23:17:22+0100] [ALPM] upgraded linux-zen (6.14.4.zen1-1 -> 6.14.4.zen1-2)

One of the first things I tried was rolling back the kernel before I tried variations of driver versions noted above and then rolled back gcc.

I'm not aware of any non standard behaviors, configs  or packages which would make me an outlier.
I was so concerned about the compile issue I ended up running memtest86 on the system for 30 mins thinking it might be a hardware issue.

We need the exact errors and full output. you stated the dkms update failed, we would need the full output for that

Offline

#12 2025-05-01 11:11:48

TuxThepenguin76
Member
Registered: 2023-07-06
Posts: 8

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

As the error seems to not be repeatable with supported packages I'm not sure the value of pursuing it.

Offline

#13 2025-05-01 12:16:59

ZTreiber
Member
Registered: 2025-05-01
Posts: 2

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I can confirm this behavior. After updating gcc from 14 to 15 the nvidia modules won't compile.
After downgrading to 14.2. it works. Took me 6 hours to fix this lol

Offline

#14 2025-05-01 12:47:36

tekstryder
Member
Registered: 2013-02-14
Posts: 298

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

Looks as though some folks on this thread are not using the official arch packages for the nVidia driver.

It's not so much about GCC version itself, but rather that the modules are built with the C17 standard.

AUR and other versions would need to accommodate this patch:

https://gitlab.archlinux.org/archlinux/ … 56d2d59d4b

My kernel was built with GCC 14 and nvidia modules recompiled today with GCC 15 without any issue.

Offline

#15 2025-05-01 15:26:08

mackin_cheese
Member
Registered: 2025-01-07
Posts: 459

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

TuxThepenguin76 wrote:

As the error seems to not be repeatable with supported packages I'm not sure the value of pursuing it.

then mark the post as abandoned, not solved. solved means you figured out a working solution and not a temporary workaround.

also, why was this posted in the pacman issues when this is a compiling issues?

Offline

#16 2025-05-01 15:33:15

seth
Member
Registered: 2012-09-03
Posts: 63,504

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

TuxThepenguin76 wrote:

cleaning out old versions of the drivers and switching to the nvidia-beta-dkms AUR tier packages appears to have fixed the issue.
the 570 series is much less functional/stable than the 575 branch which precludes me from using mainline pacman repos

OP doesn't use nvidia-dkms from the repos but some (dated) AUR package and either just re-fetched the (now patched) nvidia-beta-dkms or abandoned an orphaned, dated, bogus AUR package.

@TuxThepenguin76 you should probably record the problematic package, but the problem has indeed been solved by either properly updating an AUR package or replacing a bogus AUR package.

The board is btw "Pacman & Package Upgrade Issues", the latter part would seem appropriate (cause a gcc upgrade caused an issue/necessity to upgrade another package) - NC would be an alternative (but then, it almost always would be…)

Online

#17 2025-05-03 10:21:52

ZTreiber
Member
Registered: 2025-05-01
Posts: 2

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

I HAD to use the dkms Version. As mentioned in the Wiki Article https://wiki.archlinux.org/title/NVIDIA i used the dkms version for my GTX650 (Kepler).
There is no fix or patch mentioned for this package.

But i will give it another try. At the moment, i'm holding back the GCC update.

Offline

#18 2025-05-03 11:18:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,379

Re: Latest GCC broke compiling NVIDIA kernel modules [Resolved]

You can use the patch mentioned in https://aur.archlinux.org/packages/nvid … nt-1021957 to force building the driver with std=gnu-17 without needing to hold back GCC. But ideally the AUR maintainer will integrate that.

Offline

Board footer

Powered by FluxBB