Bug 455118 - Documentation on development workflow
Summary: Documentation on development workflow
Status: RESOLVED NOT A BUG
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-10 10:45 UTC by Albert Zeyer
Modified: 2022-06-11 10:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Zeyer 2022-06-10 10:45:25 UTC
I did not find documentation on this, so this is a request to create some documentation on this process. (This is not just asking for help but asking to improve the documentation.)

I wonder how the standard process looks like, how to work on the code.

You configure cmake in some build directory, and then do make to recompile.

But then what? Always make install first to some temp dir? Or can you directly execute the binary? Do you need to setup the LD path such that it finds the so files?
Comment 1 Yuri Chornoivan 2022-06-10 10:50:08 UTC
Actually, we have many docs on this.

https://community.kde.org/Get_Involved/development
Comment 2 Albert Zeyer 2022-06-10 11:10:15 UTC
Ah so I should follow the general KDE dev docs?

I did that now and then I get this error:
```
$ kdesrc-build okular                   
kdesrc-build requires some minimal support to operate, including support
from the Perl runtime that kdesrc-build is built upon.

Some mandatory Perl modules are missing, and kdesrc-build cannot operate
without them.  Please ensure these modules are installed and available to Perl:

        IO::Socket::SSL
        one of (YAML::XS, YAML::PP, YAML::Syck)

kdesrc-build can do this for you on many distros:
Run 'kdesrc-build --initial-setup'
```
(Of course I ran `kdesrc-build --initial-setup` already.)

I thought that other KDE/Qt packages usually use qmake, so I thought that Okular is an exception by using cmake and it would not follow the regular KDE packages.
Comment 3 Luigi Toscano 2022-06-10 11:13:55 UTC
Yes, please follow the general KDE doc, which is also referenced from the Okular website: https://okular.kde.org/build-it/

In any case, this is not a product bug.
Comment 4 Albert Zeyer 2022-06-10 11:16:16 UTC
Ok I changed the product to "kdesrc-build" as I still have this kdesrc-build error.
Comment 5 Nate Graham 2022-06-10 15:04:10 UTC
Our bug trackers is for reporting bugs in the software. This isn't a bug, it's a setup issue. The error message is even telling you exactly what you need to do: install the missing Perl modules that it lists. So go do that. :) 

In the future, if you need help with build setup, a better place to ask for it would be in the #kde-devel room on Matrix/IRC.
Comment 6 Albert Zeyer 2022-06-10 15:14:18 UTC
> The error message is even telling you exactly what you need to do: install the missing Perl modules that it lists. So go do that. :)

I already did that and I still have the error.

Also I thought that `kdesrc-build --initial-setup` should also do that. So isn't this a bug in `kdesrc-build` then?

Also, I specifically asked about documentation here. So the bug tracker is not about issues or requests on the documentation? Where else should I post documentation issues then?

Also, I don't just want to have this resolved for me. I thought it would be of some value that other people could easily have access to the information of how you can do development with Ubuntu, for example, or whatever other information. I think IRC is not the right place for persistent information which other people in the future can easily find. A wiki or forum (or issue tracker) would be.
Comment 7 Albert Zeyer 2022-06-10 15:14:45 UTC
> The error message is even telling you exactly what you need to do: install the missing Perl modules that it lists. So go do that. :)

I already did that and I still have the error.

Also I thought that `kdesrc-build --initial-setup` should also do that. So isn't this a bug in `kdesrc-build` then?

Also, I specifically asked about documentation here. So the bug tracker is not about issues or requests on the documentation? Where else should I post documentation issues then?

Also, I don't just want to have this resolved for me. I thought it would be of some value that other people could easily have access to the information of how you can do development with Ubuntu, for example, or whatever other information. I think IRC is not the right place for persistent information which other people in the future can easily find. A wiki or forum (or issue tracker) would be.
Comment 8 Nate Graham 2022-06-10 15:30:00 UTC
Our developer documentation is wiki-based; instead of documenting and reporting documentation issues, you can just fix them yourself. :) See https://community.kde.org/Get_Involved/development. That's the documentation that you should read, edit, pass on to others, etc.

I agree that the --initial-setup flag should take care of this. kdesrc-build's bugs seem to be slowly migrating to https://invent.kde.org/sdk/kdesrc-build/-/issues, so please open an issue there reporting that the --initial-setup flag failed to install the necessary Perl modules. Thanks!
Comment 9 Laura David Hurka 2022-06-11 10:20:54 UTC
> But then what? Always make install first to some temp dir?
> Or can you directly execute the binary?
> Do you need to setup the LD path such that it finds the so files?

This should be explained in Okulars README, see https://invent.kde.org/graphics/okular#build-instructions.

In particular, prefix.sh sets the path variables of your shell, so that you can successfully run the newly compiled Okular.

> I thought that other KDE/Qt packages usually use qmake,
> so I thought that Okular is an exception by using cmake
> and it would not follow the regular KDE packages.

Maybe you have been misleaded by the long description of the cmake workflow, compared to the one-line link to the kdesrc-build introduction.
The usual workflow, including Okular, is to use kdesrc-build.
But under the hood it is cmake, because KDE prefers cmake over qmake.