{"id":3093,"date":"2023-02-21T13:40:04","date_gmt":"2023-02-21T21:40:04","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=3093"},"modified":"2023-02-21T13:40:04","modified_gmt":"2023-02-21T21:40:04","slug":"kernel-gcc-13-plugins-fail-and-fix","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=3093","title":{"rendered":"Kernel &#8211; GCC 13 Plugins fail &#8211; and Fix.."},"content":{"rendered":"<p><strong>Fedora 38<\/strong> (beta..) has <strong>GCC 13<\/strong>, and this causes an error when compiling the kernel with &#8216;<em>gcc_plugins<\/em>&#8216; selected:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/span><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\"> CC scripts\/mod\/devicetable-offsets.s<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">cc1: error: cannot load plugin .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: undefined symbol: tree_code_type<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">make[1]: *** [scripts\/Makefile.build:252: scripts\/mod\/empty.o] Error 1<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">make[1]: *** Waiting for unfinished jobs&#8230;.<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">cc1: error: cannot load plugin .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: undefined symbol: tree_code_type<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">make[1]: *** [scripts\/Makefile.build:114: scripts\/mod\/devicetable-offsets.s] Error 1<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">make: *** [Makefile:1297: prepare0] Error 2<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">make: *** Waiting for unfinished jobs&#8230;.<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">LD \/usr\/src\/linux-6.2\/tools\/objtool\/objtool-in.o<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">LINK \/usr\/src\/linux-6.2\/tools\/objtool\/objtool<\/span><\/strong><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/span><\/p>\n<p><strong><span style=\"font-family: Courier New, Courier, monospace;\"># gcc &#8211;version<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">gcc (GCC) 13.0.1 20230215 (Red Hat 13.0.1-0)<\/span><\/strong><\/p>\n<p>The workaround is to simply de-select &#8216;gcc_plugins&#8217; in the kernel config, but if you need this, then there is a patch &#8211; and more info &#8211; at:\u00a0\u00a0 <a href=\"https:\/\/www.spinics.net\/lists\/kernel\/msg4674124.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.spinics.net\/lists\/kernel\/msg4674124.html<\/a><\/p>\n<p>I have applied this to Kernel 6.2 on Fedora 38 \/ GCC 13.0.1, and the kernel compile etc. now works OK..<\/p>\n<p><em>Robert Gadsdon\u00a0 February 21st 2023.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fedora 38 (beta..) has GCC 13, and this causes an error when compiling the kernel with &#8216;gcc_plugins&#8216; selected: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. CC scripts\/mod\/devicetable-offsets.s cc1: error: cannot load plugin .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: undefined symbol: tree_code_type make[1]: *** [scripts\/Makefile.build:252: scripts\/mod\/empty.o] Error 1 make[1]: *** Waiting for unfinished jobs&#8230;. cc1: error: cannot load plugin .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: .\/scripts\/gcc-plugins\/randomize_layout_plugin.so: undefined symbol: tree_code_type make[1]: *** [scripts\/Makefile.build:114: scripts\/mod\/devicetable-offsets.s] <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=3093\"><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":[5,10,1238,1617,14,15,19],"tags":[2539,161,2536,2538,2540,2537,296,418],"class_list":["post-3093","post","type-post","status-publish","format-standard","hentry","category-compilation","category-fedora","category-fix","category-gcc","category-kernel","category-linux-2","category-opinion","tag-fedora-38","tag-fix","tag-gcc-13","tag-gcc_plugins","tag-kernel-6-2","tag-kernel-compile-fail","tag-patch","tag-workaround"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3093","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=3093"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3093\/revisions"}],"predecessor-version":[{"id":3095,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3093\/revisions\/3095"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}