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
-
@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 ?
-
@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
-