Bugzilla – Bug 1225956
Package xf86-video-nouveau does not build with gcc14 because of new errors
Last modified: 2024-07-08 16:06:50 UTC
GCC 14 newly by default treats as errors a number of situations which before were only warnings. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. Because of this, package xf86-video-nouveau fails to compile. This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/xf86-video-nouveau/standard/x86_64 It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc There's a Gentoo bug which might be relevant: https://bugs.gentoo.org/885763 The (first) error (that halts the build) is: [ 15s] nv_driver.c: In function 'NVScreenInit': [ 15s] nv_driver.c:1451:23: error: implicit declaration of function 'wfbScreenInit'; did you mean 'fbScreenInit'? [-Wimplicit-function-declaration] [ 15s] 1451 | ret = wfbScreenInit(pScreen, FBStart, pScrn->virtualX,
Ok. Tried the Gentoo patch against our Xserver, but with that the Xserver build fails. [ 100s] /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: /tmp/ccrZjhf3.ltrans8.ltrans.o:(.data.rel+0x1fc8): undefined reference to `wfbFinishScreenInit' [ 100s] /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: /tmp/ccrZjhf3.ltrans8.ltrans.o:(.data.rel+0x1fd0): undefined reference to `wfbScreenInit'
I'm afraid fixing this is beyond my skills :-(
Created attachment 875471 [details] U_fb-Declare-wfbFinishScreenInit-wfbScreenInit-for-FB_.patch
Index: xorg-x11-server.changes =================================================================== --- xorg-x11-server.changes (revision 1255d8cf54391a590f1d676d98f5568c) +++ xorg-x11-server.changes (working copy) @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 4 20:12:15 UTC 2024 - Stefan Dirsch <sndirsch@suse.com> + +- U_fb-Declare-wfbFinishScreenInit-wfbScreenInit-for-FB_.patch + * should fix build of xf86-video-nouveau driver with gcc14 + (boo#1225956) + ------------------------------------------------------------------- Wed Apr 10 13:20:43 UTC 2024 - Stefan Dirsch <sndirsch@suse.com> Index: xorg-x11-server.spec =================================================================== --- xorg-x11-server.spec (revision 1255d8cf54391a590f1d676d98f5568c) +++ xorg-x11-server.spec (working copy) @@ -239,6 +239,8 @@ Patch1960: u_sync-pci-ids-with-Mesa.patch +Patch2000: U_fb-Declare-wfbFinishScreenInit-wfbScreenInit-for-FB_.patch + Patch1218176: u_miCloseScreen_check_for_null_pScreen_dev_private.patch Patch1222442: U_render-Avoid-possible-double-free-in-ProcRenderAddGl.patch @@ -396,6 +398,7 @@ %patch -P 1921 -p1 %patch -P 1930 -p1 %patch -P 1960 -p1 +%patch -P 2000 -p1 %patch -P 1218176 -p1
Martin, can you help me with that? --> X11:XOrg/xorg-x11-server
I wonder how this patch is supposed to work without switching to --> fb/meson.build wfb_args = '-DFB_ACCESS_WRAPPER' completely.
I will try to drop xf86-video-nouveau package.
(In reply to Stefan Dirsch from comment #2) > I'm afraid fixing this is beyond my skills :-( Please, always feel free to just add -fpermissive to optflags. This is still on my list of things to look at but I'm progressing more slowly than I'd like to.
Thanks. Fixed by now. ------------------------------------------------------------------- Mon Jul 8 15:23:22 UTC 2024 - Stefan Dirsch <sndirsch@suse.com> - added "-fpermissive" to optflags to workaround fatal warnings with gcc14 (boo#1225956)
If you don't object, I'll re-open the bug to track the use of -fpermissive (so that in a year or three I can check whether it is still necessary) and assign the bug to myself. Thanks a lot for the workaround and all the time you have spent on this.
This is an autogenerated message for OBS integration: This bug (1225956) was mentioned in https://build.opensuse.org/request/show/1186217 Factory / xf86-video-nouveau
Ok. As you wish.