{"id":465,"date":"2023-06-18T10:58:39","date_gmt":"2023-06-18T10:58:39","guid":{"rendered":"https:\/\/blogs.gentoo.org\/gsoc\/?p=465"},"modified":"2023-06-18T10:58:39","modified_gmt":"2023-06-18T10:58:39","slug":"week-3-report-on-porting-gentoo-packages-to-modern-c","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/18\/week-3-report-on-porting-gentoo-packages-to-modern-c\/","title":{"rendered":"Week 3 report on porting Gentoo packages to modern C"},"content":{"rendered":"<p>Hello all,<\/p>\n<p>I&#8217;m here with my week 3 report for Modern C porting of Gentoo&#8217;s<br \/>\npackages. For this week I diverted from my initial idea a bit and<br \/>\nfocused on the &#8220;C++17 does not allow register storage class specific&#8221; type<br \/>\nerror. Basically, C++14 deprecated the register storage class and it has<br \/>\nbeen completely removed in C++17, thus resulting in C++ packages that<br \/>\nuse register keywords with this kind of error. A general fix is it<br \/>\neither removes the keywords or replaces them with *int* where applicable.<\/p>\n<p>For example, in this PR [1] for the fox toolkit, I&#8217;m using sed to remove<br \/>\nregister keywords from various folders of the source. Whenever possible<br \/>\nI&#8217;m sending patches upstream as well, for example, I&#8217;ve sent this [2]<br \/>\npatch upstream while also applying it Gentoo tree.<\/p>\n<p>Not to mention, I&#8217;ve been sticking to my proposal timeline as well and<br \/>\npatching -Wimplicit-int error [3][4][5] (Initially I planned on taking<br \/>\nup this particular bug type in the latter half of the week). But<br \/>\nsometimes the error messages are not that straightforward and can be<br \/>\nmiss leading. For example in this PR [3], although the bugs say that<br \/>\nit might be a -Wimplicit-int bug it was rather just a wrong inclusion of<br \/>\nheader where the data type off_t was not being found and it was assumed<br \/>\nto be the parameter.<\/p>\n<p>Next:<br \/>\nAs per my proposal, I&#8217;m going to stick to -Wimplicit-int for the rest few<br \/>\ndays of the week and then slowly move to<br \/>\n-Wimplicit-function-declaration. I did come across some<br \/>\n-Wimplicit-function-declaration type of bugs which I&#8217;ve patched and<br \/>\ncreated a PR [6][7].<\/p>\n<p>I&#8217;ve also come across two main language-specific blockers with<br \/>\nclang-16, namely Fortran and Vala. Lots of packages from sci-libs are<br \/>\ndependent on the package sci-libs\/lapack which is failing to build on<br \/>\nwith clang-16. As a result, I&#8217;ve to keep some of the sci-libs bugs on<br \/>\nhalt for now. On the Vala front, not much we (as in Gentoo people\/devs)<br \/>\ncan do, this is a main blocker for some GNOME packages.<\/p>\n<p>That&#8217;s it for this week, hopefully, I&#8217;ll be able to patch more packages<br \/>\nin the coming weeks.<\/p>\n<p>[1]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31357\/files#diff-aaf358e6aacd565fcdd354d1ff87b08b1b2c679aaf978af900caa00c70a7978eR46\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31357\/files%23diff-aaf358e6aacd565fcdd354d1ff87b08b1b2c679aaf978af900caa00c70a7978eR46&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw0agiMchJ8lXUfjBr5X5gce\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31357\/files#diff-aaf358e6aacd565fcdd354d1ff87b08b1b2c679aaf978af900caa00c70a7978eR46<\/a><br \/>\n[2]: <a href=\"https:\/\/github.com\/VirtualGL\/virtualgl\/commit\/441c4e77d8e33edb28d3015b573e4e45bb13d684\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/VirtualGL\/virtualgl\/commit\/441c4e77d8e33edb28d3015b573e4e45bb13d684&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw1cw0LFzgg5n2XJGeBrUx7s\">https:\/\/github.com\/VirtualGL\/virtualgl\/commit\/441c4e77d8e33edb28d3015b573e4e45bb13d684<\/a><br \/>\n[3]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31520\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31520&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw3BZymVxlKRikPG7cVkIcLf\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31520<\/a><br \/>\n[4]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31464\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31464&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw0qX30qGmI_2cX39Isv_oB0\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31464<\/a><br \/>\n[5]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31411\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31411&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw3514A6Y5P92L3mFqH392aZ\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31411<\/a><br \/>\n[6]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31476\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31476&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw3EPs3KNWHcuow7IdACjbfV\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31476<\/a><br \/>\n[7]: <a href=\"https:\/\/github.com\/gentoo\/gentoo\/pull\/31513\" target=\"_blank\" rel=\"noopener noreferrer\" data-saferedirecturl=\"https:\/\/www.google.com\/url?q=https:\/\/github.com\/gentoo\/gentoo\/pull\/31513&amp;source=gmail&amp;ust=1687171430403000&amp;usg=AOvVaw2C_HYxXwX1izlHy4gtHpwX\">https:\/\/github.com\/gentoo\/gentoo\/pull\/31513<\/a><span style=\"color: #888888\"><br \/>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello all, I&#8217;m here with my week 3 report for Modern C porting of Gentoo&#8217;s packages. For this week I diverted from my initial idea a bit and focused on the &#8220;C++17 does not allow register storage class specific&#8221; type &hellip; <a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/18\/week-3-report-on-porting-gentoo-packages-to-modern-c\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":176,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,20],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/465"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/users\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/comments?post=465"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/465\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/posts\/465\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/media?parent=465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/categories?post=465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/tags?post=465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}