• [gentoo-user] How to cmake?

    From Jack@21:1/5 to Peter Humphrey on Thu Aug 26 05:10:02 2021
    On 8/25/21 22:49, Peter Humphrey wrote:
    Hello list,

    I wanted to try KDFM, which I read about in Linux Format. It's a file manager with some interesting features. So I went to sourceforge.net/projects/kdfm, downloaded the source and extracted it to /usr/local/src/kdfm-code.

    What do I do next? I tried 'cmake ./src' and similar and got Unknown CMake command "qt5_wrap_ui". Googling for that found a few helpful pages, but I think I'd need to be a Qt5 developer to understand them.

    Can anyone point me in the direction to find out what to do?

    Minor point, I would recommend creating a build subid, cc into it and
    the "cmake path-to-source-dir".  I think most KDE stuff doesn't like
    building in-tree.  Equery doesn't identify any package for qt5_wrap_ui. 
    If it's part of the source, then you might need some parameter for
    cmake, or else there's another dependency not packaged in Gentoo.

    Jack

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Thu Aug 26 05:00:01 2021
    Hello list,

    I wanted to try KDFM, which I read about in Linux Format. It's a file manager with some interesting features. So I went to sourceforge.net/projects/kdfm, downloaded the source and extracted it to /usr/local/src/kdfm-code.

    What do I do next? I tried 'cmake ./src' and similar and got Unknown CMake command "qt5_wrap_ui". Googling for that found a few helpful pages, but I
    think I'd need to be a Qt5 developer to understand them.

    Can anyone point me in the direction to find out what to do?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tastytea@21:1/5 to peter@prh.myzen.co.uk on Thu Aug 26 12:00:01 2021
    On 2021-08-26 03:49+0100 Peter Humphrey <peter@prh.myzen.co.uk> wrote:

    Hello list,

    I wanted to try KDFM, which I read about in Linux Format. It's a file
    manager with some interesting features. So I went to sourceforge.net/projects/kdfm, downloaded the source and extracted it
    to /usr/local/src/kdfm-code.

    What do I do next? I tried 'cmake ./src' and similar and got Unknown
    CMake command "qt5_wrap_ui". Googling for that found a few helpful
    pages, but I think I'd need to be a Qt5 developer to understand them.

    Can anyone point me in the direction to find out what to do?


    You need to run cmake in the directory that has the top-level
    CMakeLists.txt. Use cmake -S . -B build from the top-level directory.
    This whill use . as source directory and build as build directory.
    You will need kde-frameworks/extra-cmake-modules.¹

    Kind regards, tastytea

    ¹ <https://sourceforge.net/p/kdfm/code/ci/master/tree/CMakeLists.txt#l8>

    --
    Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at <https://tastytea.de/tastytea.asc>.

    -----BEGIN PGP SIGNATURE-----

    iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCYSdjsgAKCRDPw5SX8bJu B6DCAP9BrS0bbhi7pGJnjhIpEkXzEy6+v0s3XiREXyeu/cm88wD/bm11Ar9Z7ph8 /At5kSpMJZODKv7hxHhZ6UDhD6f+q3w=
    =wQFT
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Knecht@21:1/5 to All on Thu Aug 26 16:50:01 2021
    On Thu, Aug 26, 2021 at 7:25 AM Peter Humphrey <peter@prh.myzen.co.uk>
    wrote:

    On Thursday, 26 August 2021 10:49:38 BST tastytea wrote:

    You need to run cmake in the directory that has the top-level CMakeLists.txt. Use cmake -S . -B build from the top-level directory.
    This whill use . as source directory and build as build directory.
    You will need kde-frameworks/extra-cmake-modules.¹

    Okay, I did that. It ran for much longer, and threw no errors, and once
    again
    it ended with 'Build files have been written to:
    /usr/local/src/kdfm-code/src'.
    Then:

    wstn /usr/local/src/kdfm-code # cmake ./src
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    -- Could not set up the appstream test. appstreamcli is missing.
    [...]
    -- Configuring done
    [...]
    -- Generating done
    -- Build files have been written to: /usr/local/src/kdfm-code/src

    Google hasn't helped with appstreamcli being missing.

    Have the build files been written or not? What do I do with them?

    ¹ <https://sourceforge.net/p/kdfm/code/ci/master/tree/CMakeLists.txt#l8>

    I don't see the relevance of that.

    Sorry to be thick, but my coding days are >30 years behind me, and that
    was in a different area entirely.

    --
    Regards,
    Peter.

    Peter,
    I'm no expert at this but a year ago I wanted to try fixing a few bugs
    in the KDE solitaire game and was faced with understanding and building the code. After numerous problems like yours above I ended up deciding I needed
    a development environment and chose KDevelop. Once I did that, with a
    little more study, I was able to build the program and run it. You might
    give something like that a try.

    On the downside, KDevelop is pretty big and heavy. I don't know how the updates run on that program but building it would likely be a bit of a time sink if you don't already have it installed and then keeping it updated
    could possibly be more time. On Ubuntu it's a non-issue.

    Good luck,
    Mark

    <div dir="ltr"><br><br>On Thu, Aug 26, 2021 at 7:25 AM Peter Humphrey &lt;<a href="mailto:peter@prh.myzen.co.uk">peter@prh.myzen.co.uk</a>&gt; wrote:<br>&gt;<br>&gt; On Thursday, 26 August 2021 10:49:38 BST tastytea wrote:<br>&gt;<br>&gt; &gt; You need
    to run cmake in the directory that has the top-level<br>&gt; &gt; CMakeLists.txt. Use cmake -S . -B build from the top-level directory.<br>&gt; &gt; This whill use . as source directory and build as build directory.<br>&gt; &gt; You will need kde-
    frameworks/extra-cmake-modules.¹<br>&gt;<br>&gt; Okay, I did that. It ran for much longer, and threw no errors, and once again<br>&gt; it ended with &#39;Build files have been written to: /usr/local/src/kdfm-code/src&#39;.<br>&gt; Then:<br>&gt;<br>&gt;
    wstn /usr/local/src/kdfm-code # cmake ./src<br>&gt; QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to &#39;/tmp/runtime-<br>&gt; root&#39;<br>&gt; QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to &#39;/tmp/runtime-<br>&gt; root&#39;<br>&gt;
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to &#39;/tmp/runtime-<br>&gt; root&#39;<br>&gt; -- Could not set up the appstream test. appstreamcli is missing.<br>&gt; [...]<br>&gt; -- Configuring done<br>&gt; [...]<br>&gt; -- Generating done<br>&gt;
    -- Build files have been written to: /usr/local/src/kdfm-code/src<br>&gt;<br>&gt; Google hasn&#39;t helped with appstreamcli being missing.<br>&gt;<br>&gt; Have the build files been written or not? What do I do with them?<br>&gt;<br>&gt; &gt; ¹ &lt;<a
    href="https://sourceforge.net/p/kdfm/code/ci/master/tree/CMakeLists.txt#l8">https://sourceforge.net/p/kdfm/code/ci/master/tree/CMakeLists.txt#l8</a>&gt;<br>&gt;<br>&gt; I don&#39;t see the relevance of that.<br>&gt;<br>&gt; Sorry to be thick, but my
    coding days are &gt;30 years behind me, and that<br>&gt; was in a different area entirely.<br>&gt;<br>&gt; --<br>&gt; Regards,<br>&gt; Peter.<br><br><div>Peter,</div><div>   I&#39;m no expert at this but a year ago I wanted to try fixing a few bugs in
    the KDE solitaire game and was faced with understanding and building the code. After numerous problems like yours above I ended up deciding I needed a development environment and chose KDevelop. Once I did that, with a little more study, I was able to
    build the program and run it. You might give something like that a try.</div><div><br></div><div>   On the downside, KDevelop is pretty big and heavy. I don&#39;t know how the updates run on that program but building it would likely be a bit of a time
    sink if you don&#39;t already have it installed and then keeping it updated could possibly be more time. On Ubuntu it&#39;s a non-issue.</div><div><br></div><div>Good luck,</div><div>Mark </div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Thu Aug 26 16:30:02 2021
    On Thursday, 26 August 2021 10:49:38 BST tastytea wrote:

    You need to run cmake in the directory that has the top-level
    CMakeLists.txt. Use cmake -S . -B build from the top-level directory.
    This whill use . as source directory and build as build directory.
    You will need kde-frameworks/extra-cmake-modules.¹

    Okay, I did that. It ran for much longer, and threw no errors, and once again it ended with 'Build files have been written to: /usr/local/src/kdfm-code/src'.
    Then:

    wstn /usr/local/src/kdfm-code # cmake ./src
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-
    root'
    -- Could not set up the appstream test. appstreamcli is missing.
    [...]
    -- Configuring done
    [...]
    -- Generating done
    -- Build files have been written to: /usr/local/src/kdfm-code/src

    Google hasn't helped with appstreamcli being missing.

    Have the build files been written or not? What do I do with them?

    ¹ <https://sourceforge.net/p/kdfm/code/ci/master/tree/CMakeLists.txt#l8>

    I don't see the relevance of that.

    Sorry to be thick, but my coding days are >30 years behind me, and that
    was in a different area entirely.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tastytea@21:1/5 to peter@prh.myzen.co.uk on Thu Aug 26 16:50:01 2021
    On 2021-08-26 15:24+0100 Peter Humphrey <peter@prh.myzen.co.uk> wrote:

    On Thursday, 26 August 2021 10:49:38 BST tastytea wrote:

    You need to run cmake in the directory that has the top-level CMakeLists.txt. Use cmake -S . -B build from the top-level
    directory. This whill use . as source directory and build as build directory. You will need kde-frameworks/extra-cmake-modules.¹

    Okay, I did that. It ran for much longer, and threw no errors, and
    once again it ended with 'Build files have been written to: /usr/local/src/kdfm-code/src'. Then:

    Don't run cmake in src/, run it in the directory src is in.

    -- Could not set up the appstream test. appstreamcli is missing.

    appstreamcli is in dev-libs/appstream.

    Have the build files been written or not? What do I do with them?

    # This configures the build (checks for dependencies and so on)
    cmake -S . -B build
    # This compiles the sources
    cmake --build build

    The binary is in ./build/src/kdfm – you can install it globally with
    sudo cmake --install build

    Kind regards, tastytea

    --
    Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at <https://tastytea.de/tastytea.asc>.

    -----BEGIN PGP SIGNATURE-----

    iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCYSenuQAKCRDPw5SX8bJu B5fBAP9fwXQkzc8Nx7CBmP4hb/1O9nvZHRPvAipc9PVbSKwiuwEAhFPBV6x+mvqc QJMlQtIDKIgRzRe/OwWdG97gi4/MLI0=
    =qCry
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Thu Aug 26 17:10:01 2021
    On Thursday, 26 August 2021 15:39:53 BST tastytea wrote:

    Don't run cmake in src/, run it in the directory src is in.

    I have been doing so.

    8

    # This configures the build (checks for dependencies and so on)
    cmake -S . -B build
    # This compiles the sources
    cmake --build build

    The binary is in ./build/src/kdfm – you can install it globally with
    sudo cmake --install build

    Excellent! Many thanks, kind Sir!

    Aside: how much training and experience would be needed to reach that
    level of competence?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From tastytea@21:1/5 to peter@prh.myzen.co.uk on Thu Aug 26 18:30:01 2021
    On 2021-08-26 15:59+0100 Peter Humphrey <peter@prh.myzen.co.uk> wrote:

    On Thursday, 26 August 2021 15:39:53 BST tastytea wrote:

    Don't run cmake in src/, run it in the directory src is in.

    I have been doing so.

    8

    # This configures the build (checks for dependencies and so on)
    cmake -S . -B build
    # This compiles the sources
    cmake --build build

    The binary is in ./build/src/kdfm – you can install it globally with
    sudo cmake --install build

    Excellent! Many thanks, kind Sir!

    You're welcome. 😊

    Aside: how much training and experience would be needed to reach that
    level of competence?

    It's really easy… if you're a programmer who uses cmake every day. 😄
    I would expect projects to put this info into the readme file (and most
    do), but apparently they didn't think that users might want to compile
    it? 🙄

    --
    Get my PGP key with `gpg --locate-keys tastytea@tastytea.de` or at <https://tastytea.de/tastytea.asc>.

    -----BEGIN PGP SIGNATURE-----

    iHUEAREKAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCYSfBIQAKCRDPw5SX8bJu B3ExAP9Nqu+WC3lQdJfySMkTvTzxKcPd9SeY3yaIbZlKxGWjjAD+Kwu0IedrM24A GS6QReHn0UlGUBRr4wBzO8tJdbbw3Xs=
    =dv0f
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)