UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Package app for different architectures

    Scheduled Pinned Locked Moved Solved App Development
    3 Posts 2 Posters 303 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • L Offline
        lkroll
        last edited by

        Hello,

        I created a small app with QML + python that needs a precompiled binary to function properly. Therefore I wanted to restrict the architecture to only build for armhf for example. But now when I set the architecture in the manifest clickable prints out this error:

        Clickable is building for architecture "all", but "armhf" is specified in the manifest. You can set the architecture field to @CLICK_ARCH@ to let Clickable set the architecture field automatically.
        

        If I then set 'restrict_arch: armhf' in the clickable.yaml I get the following error:

        The "pure-qml-cmake" builder needs architecture "all", but "restrict_arch" was set to "armhf"
        

        That's probably because the builder is set to pure-qml-cmake in the clickable.yaml which expects the architecture to be set to 'all'.

        But how would I build the app for one arch only then? Do I need to use the 'precompiled' builder and do something else?
        Or can I just compile the app for 'all' and upload the click package for armhf for example.
        I mean technically the app compiles and runs on all architectures, it just won't work properly because it needs the bluepy-helper binary to be compiled for the specific architecture.

        I also thought about just including the binary for every architecture and then within the app detect the correct architecture and use the right binary, but I don't think that is a good approach.

        What would be the best / recommended way to deal with that?

        The code is on my gitlab for reference: https://gitlab.com/lkroll/lighthouse-control

        lduboeufL 1 Reply Last reply Reply Quote 0
        • lduboeufL Offline
          lduboeuf @lkroll
          last edited by

          @lkroll said in Package app for different architectures:

          Hello,

          I created a small app with QML + python that needs a precompiled binary to function properly. Therefore I wanted to restrict the architecture to only build for armhf for example. But now when I set the architecture in the manifest clickable prints out this error:

          Clickable is building for architecture "all", but "armhf" is specified in the manifest. You can set the architecture field to @CLICK_ARCH@ to let Clickable set the architecture field automatically.
          

          If I then set 'restrict_arch: armhf' in the clickable.yaml I get the following error:

          The "pure-qml-cmake" builder needs architecture "all", but "restrict_arch" was set to "armhf"
          

          That's probably because the builder is set to pure-qml-cmake in the clickable.yaml which expects the architecture to be set to 'all'.

          But how would I build the app for one arch only then? Do I need to use the 'precompiled' builder and do something else?
          Or can I just compile the app for 'all' and upload the click package for armhf for example.
          I mean technically the app compiles and runs on all architectures, it just won't work properly because it needs the bluepy-helper binary to be compiled for the specific architecture.

          I also thought about just including the binary for every architecture and then within the app detect the correct architecture and use the right binary, but I don't think that is a good approach.

          What would be the best / recommended way to deal with that?

          The code is on my gitlab for reference: https://gitlab.com/lkroll/lighthouse-control

          does it work if you just set "cmake" as the builder ?

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            lkroll @lduboeuf
            last edited by

            @lduboeuf That does work, thanks for the tip.

            I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

            1 Reply Last reply Reply Quote 1
            • L lkroll has marked this topic as solved on
            • First post
              Last post