{"id":576,"date":"2023-08-26T09:24:27","date_gmt":"2023-08-26T09:24:27","guid":{"rendered":"https:\/\/blogs.gentoo.org\/gsoc\/?page_id=576"},"modified":"2023-08-28T16:28:48","modified_gmt":"2023-08-28T16:28:48","slug":"listouts-gsoc-2023-final-work-products","status":"publish","type":"page","link":"https:\/\/blogs.gentoo.org\/gsoc\/listouts-gsoc-2023-final-work-products\/","title":{"rendered":"listout 2023"},"content":{"rendered":"<p><span data-preserver-spaces=\"true\">As this year\u2019s Google Summer of Code has ended, it\u2019s time for me to summarize all my work at Gentoo Linux foundation for Google Summer of Code 2023. In a nutshell, I was able to complete most of my deliverables, while there are still open bugs in the tracker but I&#8217;ve managed to close many of them and also port MATE and GNOME for llvm profile.<br \/>\n<\/span><\/p>\n<div id=\"attachment_608\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-608\" loading=\"lazy\" class=\"wp-image-608 size-large\" src=\"http:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-1024x496.jpg\" alt=\"\" width=\"640\" height=\"310\" srcset=\"https:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-1024x496.jpg 1024w, https:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-300x145.jpg 300w, https:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-768x372.jpg 768w, https:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-1536x745.jpg 1536w, https:\/\/blogs.gentoo.org\/gsoc\/files\/2023\/08\/test-1-2048x993.jpg 2048w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><p id=\"caption-attachment-608\" class=\"wp-caption-text\">Me using GNOME on LLVM profile<\/p><\/div>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Overview_of_my_work\"><span class=\"toc_number toc_depth_1\">1<\/span> Overview of my work<\/a><\/li><li><a href=\"#What_I_learned_from_GSoC_2023_Project\"><span class=\"toc_number toc_depth_1\">2<\/span> What I learned from GSoC 2023 Project<\/a><\/li><li><a href=\"#My_weekly_work\"><span class=\"toc_number toc_depth_1\">3<\/span> My weekly work<\/a><ul><li><a href=\"#Week_1\"><span class=\"toc_number toc_depth_2\">3.1<\/span> Week 1<\/a><\/li><li><a href=\"#Week_2\"><span class=\"toc_number toc_depth_2\">3.2<\/span> Week 2<\/a><\/li><li><a href=\"#Week_3\"><span class=\"toc_number toc_depth_2\">3.3<\/span> Week 3<\/a><\/li><li><a href=\"#Week_4\"><span class=\"toc_number toc_depth_2\">3.4<\/span> Week 4<\/a><\/li><li><a href=\"#Week_5\"><span class=\"toc_number toc_depth_2\">3.5<\/span> Week 5<\/a><\/li><li><a href=\"#Week_6\"><span class=\"toc_number toc_depth_2\">3.6<\/span> Week 6<\/a><\/li><li><a href=\"#Week_7\"><span class=\"toc_number toc_depth_2\">3.7<\/span> Week 7<\/a><\/li><li><a href=\"#Week_8\"><span class=\"toc_number toc_depth_2\">3.8<\/span> Week 8<\/a><\/li><li><a href=\"#Week_9\"><span class=\"toc_number toc_depth_2\">3.9<\/span> Week 9<\/a><\/li><li><a href=\"#Week_10\"><span class=\"toc_number toc_depth_2\">3.10<\/span> Week 10<\/a><\/li><li><a href=\"#Week_11\"><span class=\"toc_number toc_depth_2\">3.11<\/span> Week 11<\/a><\/li><li><a href=\"#Week_12\"><span class=\"toc_number toc_depth_2\">3.12<\/span> Week 12<\/a><\/li><\/ul><\/li><li><a href=\"#About_me\"><span class=\"toc_number toc_depth_1\">4<\/span> About me<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Overview_of_my_work\"><strong>Overview of my work<\/strong><\/span><\/h2>\n<p>The main focus of my project for GSoC 2023 was to work towards closing as much as bug possible from the &#8220;<span id=\"summary_container\"><span id=\"short_desc_nonedit_display\">Modern C (C99) porting<\/span><\/span>&#8221; tracker bug, along with that also to make sure at least some of the desktop environments are building proper with either llvm or musl llvm profile. So many of these bugs included fixing bugs related to improper function declaration, calling functions with improper parameters, and not inclusion of proper header files, while some were also related to build and\/or configuration issues with llvm toolchain and lld (LLVM) linker.<\/p>\n<p>To give an example, very often I would come across packages which gave build errors such as &#8220;<span id=\"summary_container\"><span id=\"short_desc_nonedit_display\">incompatible function pointer types<\/span><\/span>&#8221; or &#8220;<span id=\"summary_container\"><span id=\"short_desc_nonedit_display\">call to undeclared function<\/span><\/span>&#8220;. All of these were either invalid in C99, invalid even in C89, or extremely dubious. Compilers just tolerated them as quasi-extensions for a while (until now) to avoid disruption. But with newer compilers such as Clang 16 and GCC 14 turns on some of these errors by default which results in such build failures.<\/p>\n<p>For most of them the fix was to go into to the source code find the source files that had the error\/mistake and fix them, then recompile to check whether my changes fixed them. If the errors were *correctly* patched then make a diff\/patch file that could be applied via the ebuild, the ebuild would most of the time require a revision bump along with the patch.<\/p>\n<p>Most of the time I tried to send my patches upstream while keeping a note int the GitHub PR so that Sam and Jonas would be able to track my progress know when I&#8217;m able to send my patches upstream or if I had any issues doing so (some times it was confusing for me to find upstream, as they didn&#8217;t have a GitHub repo\/mirror and would operate via mailing list)<\/p>\n<h2><span id=\"What_I_learned_from_GSoC_2023_Project\">What I learned from GSoC 2023 Project<\/span><\/h2>\n<ul>\n<li>First and foremost I learned the how older C compilers worked and different are they from the newer generation of compilers, especially Clang 16 and GCC 13 and 14. Like how sometimes the older ones allowed bad code\/coding habits and compilers just allowed them to avoid disruption.<\/li>\n<li>Secondly I learned a lot of various C standards (for example C89, C99, C11 and very recent C23).<\/li>\n<li>Next I came across the various compiler flags and how to affect the errors and warnings during compilation of the program.<\/li>\n<li>Then I learned about the difference between libcxx and libstdc++, and how programs differ when compiled against them.<\/li>\n<li>Then I came across problem of effectively testing out my patches and\/or pull requests. This is where I learnt to setup custom LXD gentoo images from various stage 3 tarball and setup scripts to easy test out my PR with various combination of USE flags.<\/li>\n<li>After that, This year I felt fairly confident enough to approach upstream developers and work with mailing list. But I&#8217;m still in the processing of learning to use them and send patches via mailing lists.<\/li>\n<\/ul>\n<h2><span id=\"My_weekly_work\">My weekly work<\/span><\/h2>\n<p>I&#8217;ll try to put down my weekly work for the whole 12 weeks in brief and points while linking the archived emails of the actual report<\/p>\n<h3><span id=\"Week_1\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/04\/week-1-modern-c-porting\/\">Week 1<\/a><\/span><\/h3>\n<p>I\u2019ve been mainly stuck to the plan and<br \/>\nworked on *<strong>Wincompatible-function-pointer-types<\/strong>* bugs. Since I was already kind of familiar with some of the working, environment, and tools for Gentoo, I started a bit early and had been working on the aforementioned bugs during the community bonding period which gave me some time to set up a musl machine. This has helped me<br \/>\nsolve some of the most specific bugs as *<strong>Wincompatible-function-pointer-types<\/strong>* is not limited to only one particular lib, in this case, glibc and musl.<\/p>\n<h3><span id=\"Week_2\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/11\/week-2-report-on-porting-gentoo-packages-to-modern-c\/\">Week 2<\/a><\/span><\/h3>\n<p>I\u2019ve stuck to my proposal and mainly worked on the<br \/>\n\u201cWincompatible-function-pointer-types\u201d bugs. Honestly, nothing much<br \/>\ninteresting did happen. I was not able to work for 2 days, due to some personal health issues, I plan on making up for them in the following weeks\/days.\u00a0 I finished setting up MUSL testing environment (chroot). Got some reviews by my mentor\/s meanwhile.<\/p>\n<h3><span id=\"Week_3\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/18\/week-3-report-on-porting-gentoo-packages-to-modern-c\/\">Week 3<\/a><\/span><\/h3>\n<p>For this week I diverted from my initial idea a bit and<br \/>\nfocused on the \u201cC++17 does not allow register storage class specific\u201d 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<h3><span id=\"Week_4\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/06\/25\/week-4-report-on-porting-gentoo-packages-to-modern-c\/\">Week 4<\/a><\/span><\/h3>\n<p>Well nothing interesting to report this week, just following my proposal<br \/>\nand focused on -Wimplicit-int type of bug for the first half of the week<br \/>\nwhile moving to -Wimplicit-function-declaration. But I diverted a bit and picked up some random bug that I sent pull requests for.<\/p>\n<h3><span id=\"Week_5\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/07\/13\/week-5-report-on-porting-gentoo-packages-to-modern-c\/\">Week 5<\/a><\/span><\/h3>\n<p>Patched MATE desktop and related packages. Not only just in Modern C, but it\u2019s now compatible with gettext-0.22. So someone using llvm-musl or the llvm profile<br \/>\ncan use MATE desktop.<\/p>\n<p>While fixing MATE settings-daemon I\u2019ve learned two very valuable<br \/>\nlesson (thanks to my Sam),<br \/>\n\u2013 Getting feedback from upstream devs is important<br \/>\n\u2013 Casting variables in incompatible function pointer type of errors is<br \/>\nnot always correct, it might only temporarily fix the problem\/silence<br \/>\nthe warning.<br \/>\nI\u2019m going to keep this two points in mind for the next and upcoming<br \/>\nweeks.<\/p>\n<p>Apart from the MATE work, I mostly adhered to my proposal timeline and<br \/>\nfixed more -Wimplicit-function-declaration bug, and more misc. bugs.<\/p>\n<h3><span id=\"Week_6\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/07\/13\/week-6-report-on-porting-gentoo-packages-to-modern-c\/\">Week 6<\/a><\/span><\/h3>\n<p>This week I couldn\u2019t do much as I caught a bit of cold and fell ill. But<br \/>\nI\u2019m doing much better now and will begin working again starting this<br \/>\nweek. I plan on making up for last weeks work in the coming week and<br \/>\nin case there is still remaining work, I will make it up in the<br \/>\nextra\/emergency week at the end. This was also the reason I could not update my blogs for the last week.<\/p>\n<h3><span id=\"Week_7\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/07\/13\/week-6-report-on-porting-gentoo-packages-to-modern-c\/\">Week 7<\/a><\/span><\/h3>\n<p>I picked up where I left before week 6. Sent sent in some patches (no upstream unfortunately).<br \/>\nThis week I mainly worked with Juippis (my other mentor) on reviews of<br \/>\nmy already submitted PRs. We came across some challenges while doing,<br \/>\nnamely reproduction of a bug, the case being juippis and sam_ were able<br \/>\nto reproduce the bug, but I couldn\u2019t due. It was most probably due to<br \/>\ncompiler-rt. I still have to send in a proper fix for that bug. Which<br \/>\nbrings us the to second topic of setting up a test environment. Juippis<br \/>\nhas an excellent guide on using lxc containers for setting up test<br \/>\nenvironment.<\/p>\n<h3><span id=\"Week_8\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/07\/23\/week-8-report-on-porting-gentoo-packages-to-modern-c\/\">Week 8<\/a><\/span><\/h3>\n<p>Testing environments were set. I now had three environments to test my<br \/>\nPRs on.<br \/>\n\u2013 GCC 13 with glibc<br \/>\n\u2013 Clang-16 with llvm profile<br \/>\n\u2013 Clang-16 with musl-llvm profile<\/p>\n<p>I\u2019ve picked up various random bugs from the tracker list and worked on them. But I\u2019ve come to the realization that my work isn\u2019t just limited to c99 or c11 porting.<br \/>\nIt\u2019s is mix between c99 porting, using Clang-16 as the default compiler<br \/>\nand perhaps using lld as the system linker as well. Which of course I\u2019m<br \/>\nvery happy about.<\/p>\n<p>Sam wanted me keep him informed when I&#8217;m sending my patches upstream or if I had any issues in doing so he can help. So I took care of that from week 8 onwards.<\/p>\n<h3><span id=\"Week_9\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/07\/30\/week-9-report-on-porting-gentoo-packages-to-modern-c\/\">Week 9<\/a><\/span><\/h3>\n<p>Similar to last week, I picked up bugs at random and started submitting<br \/>\npatches. But this time I made sure to check out the upstream and send in<br \/>\npatches whenever possible, if it turned out to be difficult or I<br \/>\ncouldn\u2019t find upstream I made sure to make a note about it in the PR<br \/>\neither via commit message or through a separate comment. This way it<br \/>\nhelped my Sam keep track of things and my progress.<\/p>\n<h3><span id=\"Week_10\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/08\/06\/week-10-report-on-porting-gentoo-packages-to-modern-c\/\">Week 10<\/a><\/span><\/h3>\n<p>So apart from the usual patching of packages from the tracker the most<br \/>\nsignificant work done this week is getting GNOME desktop on llvm<br \/>\nprofile. But it is to be noted that the packages gui-libs\/libhandy,<br \/>\ndev-libs\/libgee and sys-libs\/libblockdev require gcc fallback<br \/>\nenvironment. net-dialup\/ppp was also on our list but thanks to Sam its<br \/>\nhas been patched [0] (and fix sent upstream).<\/p>\n<h3><span id=\"Week_11\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/08\/14\/week-11-report-on-porting-gentoo-packages-to-modern-c\/\">Week 11<\/a><\/span><\/h3>\n<p>Similar to last two weeks I took up bugs from the tracker randomly and<br \/>\npatched them, sending patch upstream whenever possible. Unfortunately,<br \/>\nnothing new or interesting.<\/p>\n<p>Also worked on some reviews with Sam and Joonas.<\/p>\n<h3><span id=\"Week_12\"><a href=\"https:\/\/blogs.gentoo.org\/gsoc\/2023\/08\/21\/week-12-report-on-porting-gentoo-packages-to-modern-c\/\">Week 12<\/a><\/span><\/h3>\n<p>Similar to last week I took up bugs from the tracker randomly and<br \/>\npatched them, sending patch upstream whenever possible. Unfortunately,<br \/>\nnothing new or interesting.<\/p>\n<p>Also been working with Joonas on masking firefox-bin and rust-bin in<br \/>\nglibc llvm profile, Joonas has for now reverted the commit masking<br \/>\nthose bin packages, but likely a proper fix will be committed soon.<\/p>\n<p>Just wrapped things up for final review. I\u2019m also in 1:1 contact with<br \/>\nSam in case there is some major work needed on a particular section of<br \/>\nmy project or a package.<\/p>\n<h2><span id=\"About_me\">About me<\/span><\/h2>\n<p>If you want to know a bit about me or want to contact me, you can find relevant information <a href=\"https:\/\/blogs.gentoo.org\/gsoc\/listouts-gsoc-2022-final-work-products\/about-listout\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As this year\u2019s Google Summer of Code has ended, it\u2019s time for me to summarize all my work at Gentoo Linux foundation for Google Summer of Code 2023. In a nutshell, I was able to complete most of my deliverables, &hellip; <a href=\"https:\/\/blogs.gentoo.org\/gsoc\/listouts-gsoc-2023-final-work-products\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":176,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/pages\/576"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/types\/page"}],"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=576"}],"version-history":[{"count":16,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/pages\/576\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/pages\/576\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/gsoc\/wp-json\/wp\/v2\/media?parent=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}