Yes, its true that struggle makes it work.
Before starting on actual tasks, one of my warm up task was to learn about Igt test cases, for which I needed to install Igt-gpu-tools on my system.I cloned from official repo and started as per the instructions mentioned. I installed dependencies. But the stumbling block appeared when it was time to build and run tests.
I got lot of dependency related errors and in the process tried to fix it by installing each of the library dependencies right away from .tar file. And sooner realized this will take a lot of time and effort and some how greatly I altered pkg-config and my Kernel crashed 😦 .
Compiler for C supports arguments -Wimplicit-fallthrough=0: YES Found pkg-config: /usr/local/bin/pkg-config (0.29.1) Dependency libdrm found: YES 2.4.90 Dependency libdrm_intel found: YES 2.4.90 Dependency libdrm_nouveau found: YES 2.4.90 Dependency libdrm_amdgpu found: YES 2.4.90 Dependency pciaccess found: YES 0.14 Dependency libkmod found: YES 25 Dependency libprocps found: YES 3.3.12 Dependency libunwind found: YES 1.2.1 Dependency libdw found: NO meson.build:106:0: ERROR: Could not generate cargs for libdw:
And then I realised I should look for the root cause and sooner updated my Linux distro to Ubuntu 18.04. So no error related to meson – build. Soon learnt to debug the problems and got to know about few hacks as well related to pkg-config such as –
1.To check where pkg-config looks for all packages use-
pkg-config --variable pc_path pkg-config
2. To check if same path appears or not-
3. Most of the packages have .pc file , so using the ‘locate’ command find the .pc file location and add using command below.
4. To add a new path for pkg-config use-
export PKG_CONFIG_PATH =" /new path"
Still I missed one of the dependencies which I thought is not relevant. So I decided to approach my mentor and he helped me with the dependency related issue and also taught me few better commands to debug the issues. And finally got all the tests built and running for driver to be tested. So all the struggle during installation taught me how to debug and learn about how so many dependencies work. So along with getting things working, this proved to be a learning experience. Not only struggle ultimately made things work but also helped to think about a problem from multiple perspectives.
I started working on my first task which was to Add Igt test to check extreme alpha values i.e. fully opaque and fully transparent for cursor plane. Before jumping off to write actual code and submit it as patch , I started exploring and digging deeper to understand how Igt tests are actually written and what properties for each driver is tested. To test a particular driver I made changes in the kernel , enabling only the driver for which I want to run the tests and disabling GUI and removing rest of the graphics related drivers. Installing the kernel again and then bringing it back to normal mode with enabled GUI and driver. At first it seems easy ,but repeating this seemed tedious job later. So I decided to ask for alternative and greatly got to know about FORCE-MODULE option which was added by previous intern but patch was not in main-line. So this option added through this patch simplified things. Further I finished my task and the patch  is under review.So mentioning about struggles , even you feel it’s not relevant, actually can bring out some better solutions.
Struggles are actually the part of process and it brings a lot of lessons. Therefore it’s good to struggle 🙂 .
“If there is no Struggle, there is no Progress ” .