Clickable: C++ template does not work on Focal (20.04)
-
The default C++ project stub generated by Clickable cannot run on my Pixel 3a (20.04 Stable channel).
When I build the project with the command
CLICKABLE_FRAMEWORK=ubuntu-sdk-20.04 clickable
, it fails at the installation step with this message:Installing the app. Error: GDBus.Error:com.lomiri.click.OperationFailed: failed to install /home/phablet/appname.yourname_1.0.0_amd64.click Command ran on device via ADB failed. See output above.
The only thing I've changed from the freshly generated stub is in the appname.apparmor file. I changed
"policy_version": 16.04
to"policy_version": 20.04
.Some things I've tried:
- The pure QML, Python and HTML templates work fine. The Rust template gives the same error as the C++ template. The Go and Godot templates gave each their own unrelated error.
- Using
CLICKABLE_FRAMEWORK=ubuntu-sdk-20.04 clickable
versus justclickable
and specifyingframework: ubuntu-sdk-20.04
in clickable.yaml. - I cleared my cache a few times ("Is it okay to delete and re-download it?" -> yes) and created a few different projects to ensure it wasn't a problem with a project in particular.
- I reinstalled the core apps on my phone through the Settings app.
- I switched to the 20.04 Development channel.
Is there something I can do to narrow down the problem? I found no other issue about this, so I'm not sure if it's a problem with my device or if it's a bug in Clickable.
-
@Bokken What version of clickable are you using?
-
@arubislander Clickable 7.12.1, which says is the latest version.
Sorry for the new name, I lost access to my original account.
-
@Bokkenn I have seen reports similar to yours on Telegram, but I thought they would have been solved with the latest version.
Will have to give it a try when I get home.
-
@arubislander I just tried this. I updated clickable to 7.12.1, then I created a new C++ app and did the same as you did. The app installed and ran fine. I am on the devel channel.
-
@arubislander I solved the problem.
Despite reinstalling my phone entirely from the UBports installer, the issue persisted.
I tried to see if I could at least trace back the issue further... until I spotted somewhere in the logs: "For interaction with a target device you might want to specify the device architecture via --arch."
I forgot to specify the architecture.
Needless to say, adding
--arch arm64
to the command fixed the problem. Sorry for taking your time for such a trivial issue.I believe it would be good to have some mechanism in place to warn me if I attempt to install a .click with the wrong architecture. It only said "failed to install" from the command line, and installing manually though the phone only gave an "incorrect package format" from the OpenStore.
-
@Bokkenn said in Clickable: C++ template does not work on Focal (20.04):
I forgot to specify the architecture.
Needless to say, adding --arch arm64 to the command fixed the problem. Sorry for taking your time for such a trivial issue.Glad you got it sorted, although it is odd, as since a few versions --arch arm64 has been the default for clickable. Very odd indeed. Do you have setup somewhere in some configuration that amd64 should be the default on your development machine?
I believe it would be good to have some mechanism in place to warn me if I attempt to install a .click with the wrong architecture. It only said "failed to install" from the command line, and installing manually though the phone only gave an "incorrect package format" from the OpenStore.
Well, the 'failed to install' bit on the command line and especially the 'incorrect package format' that the OpenStore throws are the mechanisms I guess.
Now looking back at your original post, I see that the answer was staring us right in the face, in the name of the click: /home/phablet/appname.yourname_1.0.0_amd64.click.
I guess now we know.