{"id":3213,"date":"2024-03-06T17:19:30","date_gmt":"2024-03-07T01:19:30","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=3213"},"modified":"2024-03-06T17:19:30","modified_gmt":"2024-03-07T01:19:30","slug":"nvidia-gcc-14-breaks-compile-and-fix-vmware-ok","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=3213","title":{"rendered":"NVIDIA &#8211; GCC 14 Breaks Compile &#8211; and Fix.. (VMware OK..)"},"content":{"rendered":"<p>Testing <strong>Fedora 40<\/strong>, which now includes <strong>GCC 14<\/strong>, and this breaks the NVIDIA driver 550.54.14 compile:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\"><strong>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<code><br \/>\nCC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-connector.o<br \/>\nCC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.o<br \/>\n\/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:115:16: error: initialization of \u2018int (*)(struct drm_gem_object *, struct iosys_map *)\u2019 from incompatible pointer type \u2018void * (*)(struct drm_gem_object *)\u2019 [-Wincompatible-pointer-types]<br \/>\n115 | .vmap = nv_drm_gem_prime_vmap,<br \/>\n| ^~~~~~~~~~~~~~~~~~~~~<br \/>\n\/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:115:16: note: (near initialization for \u2018nv_drm_gem_funcs.vmap\u2019)<br \/>\n\/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:116:16: error: initialization of \u2018void (*)(struct drm_gem_object *, struct iosys_map *)\u2019 from incompatible pointer type \u2018void (*)(struct drm_gem_object *, void *)\u2019 [-Wincompatible-pointer-types]<br \/>\n116 | .vunmap = nv_drm_gem_prime_vunmap,<br \/>\n| ^~~~~~~~~~~~~~~~~~~~~~~<br \/>\n\/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:116:16: note: (near initialization for \u2018nv_drm_gem_funcs.vunmap\u2019)<br \/>\nmake[3]: *** [scripts\/Makefile.build:243: \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.o] Error 1<br \/>\nmake[2]: *** [\/usr\/src\/linux-6.7.8\/Makefile:1911: \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel] Error 2<br \/>\nmake[1]: *** [Makefile:234: __sub-make] Error 2<br \/>\nmake[1]: Leaving directory '\/usr\/src\/linux-6.7.8'<br \/>\nmake: *** [Makefile:85: modules] Error 2<\/code><\/strong><\/span><\/p>\n<p>Fortunately, there is already a fix\/workaround for this, and details can be found on the NVIDIA Forum, at <a href=\"https:\/\/forums.developer.nvidia.com\/t\/nvidia-modules-build-failure-with-upcoming-gcc-14-and-recent-kernels-due-to-misfiring-conftest-sh-test-heads-up\/279072\" target=\"_blank\" rel=\"noopener\">https:\/\/forums.developer.nvidia.com\/t\/nvidia-modules-build-failure-with-upcoming-gcc-14-and-recent-kernels-due-to-misfiring-conftest-sh-test-heads-up\/279072<\/a><\/p>\n<p>I have successfully applied this to 550.54.14 (with some fuzz..), and it now compiles and runs OK..\u00a0\u00a0\u00a0\u00a0\u00a0 Thanks to <strong><em>ionen<\/em><\/strong> on the forum for providing this&#8230;.\u00a0\u00a0 Hopefully, NVIDIA will release a driver version that addresses this..<\/p>\n<p>It is worth mentioning that the latest VMware <strong>17.5.1<\/strong> patchset is OK with GCC 14&#8230; at <a href=\"https:\/\/github.com\/mkubecek\/vmware-host-modules\/tree\/workstation-17.5.1\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/mkubecek\/vmware-host-modules\/tree\/workstation-17.5.1<\/a><\/p>\n<p><strong><em>Robert Gadsdon.\u00a0\u00a0\u00a0 March 6th 2024.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Testing Fedora 40, which now includes GCC 14, and this breaks the NVIDIA driver 550.54.14 compile: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-connector.o CC [M] \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.o \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:115:16: error: initialization of \u2018int (*)(struct drm_gem_object *, struct iosys_map *)\u2019 from incompatible pointer type \u2018void * (*)(struct drm_gem_object *)\u2019 [-Wincompatible-pointer-types] 115 | .vmap = nv_drm_gem_prime_vmap, | ^~~~~~~~~~~~~~~~~~~~~ \/home\/rgadsdon\/NVIDIA-Linux-x86_64-550.54.14\/kernel\/nvidia-drm\/nvidia-drm-gem.c:115:16: note: (near initialization for \u2018nv_drm_gem_funcs.vmap\u2019) <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=3213\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1238,1617,15,18,19],"tags":[2636,2635,2637,2633,1021,2634,2638],"class_list":["post-3213","post","type-post","status-publish","format-standard","hentry","category-fix","category-gcc","category-linux-2","category-nvidia","category-opinion","tag-550-54-14","tag-breaks-nvidia-compile","tag-conftest-sh","tag-fedora-40","tag-fix-available","tag-gcc-14","tag-vmware-patchset-ok"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3213"}],"version-history":[{"count":3,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3213\/revisions"}],"predecessor-version":[{"id":3216,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3213\/revisions\/3216"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}