HowTo: contributing to app development with crossbuilder
-
@mardy I deleted both the containers, added the new required line in the script and then run the crossbuilder command. Please check here below the output:
-
I tried to re-setup the environment and I got caught in an error (or maybe that's what I feel about). Here below the output:
https://paste.ubuntu.com/p/DGN3642VNg/
Then I tried to cross build the OSK package to the connected device, a Pro5, by just typing "crossbuilder" in the OSK directory and this is the result (again a final error it seems):
https://paste.ubuntu.com/p/Crwm65FyQV/
Any suggestion?
Matteo
-
Sorry, if I run the same command "crossbuilder" in the OSK directory, now there is a complain with a missing "dch" command:
-
@mardy I found this issue on Github which explains why my container doesn't connect to the internet as well as experienced by @jonius: https://github.com/ubports/crossbuilder/issues/2
But now, how to fix it?
Thank you.
P.S. my laptop is running Ubuntu 16.04 LTS (Xenial) but I see that in your answer on the Github issue you are indicating that the devscripts are installed by means of a repo available for Vivid?? Could it be the culprit?
Matteo
-
Hi @matteo! I think your issue might not be related to https://github.com/ubports/crossbuilder/issues/2
Instead, can you please update your crossbuilder again, then remove all of your existing lxc containers (those created with crossbuilder, at least) and run the
crossbuilder setup-lxd
command again (and collect the logs in the same way you did before)? -
@mardy I'm not sure what you do mean for "update crossbuilder"...would you please help me to figure this out? Maybe I'm failing this step...Anyhow, I deleted the previous lxc containers and ran the "crossbuilder setup-lxd" command; this is the output: https://paste.ubuntu.com/p/hhDr699mmH/
If I re-create the keyboard container with my phone connected I got always the same error: "Container is not connected to the Internet."
-
@mardy I'd need your help on this. Not being able to update crossbuilder as per your request, I just got rid of the previous installation and I started a fresh installation from scratch. Everything went smooth, so I tried again to build the OSK app onto my phone but I still get the error complaining for a missing command dch, I guess near to the end of the building process:
Thank you in advance.
Matteo
-
Hi @matteo!
To update crossbuilder, just go to the directory where it's located and rungit pull
. As for the error, I would really need to see the full logs, as the real error most likely happens much before thatdch
line. -
@mardy ok for the hint, I'll try it but I'm not sure git command will work to me, because I tried to use it before but it failed miserably; so, what I did to install crossbuilder before, was to manually copy the folder from Github to my local folder on my PC and then manually installing from there. I don't know if this makes any difference though.
However, I already posted the complete output for the "dch error"; if you scroll upwards the previous messages, you can find it. I re-post here for ease of reference:
https://paste.ubuntu.com/p/dRpvrK8thY/
Thank you for the help, much appreciated
-
Yes, copying the folder from GutHub works as well
About the logs, I need to see those relative to the first time the container is setup: you should delete all your crossbuilder containers, then run crossbuilder again (with the
set -e
option as well). Those logs will show all the packages being installed, and I'll hopefully understand whydch
is not there. The logs you pasted seem to refer to a situation where the container had already been set up. -
@mardy here what I have done:
- Previous lxd installation deleted with Synaptic (lxd and lxd-client packages);
- crossbuilder folder downloaded from https://github.com/ubports/crossbuilder;
- I checked that the crossbuilder file got the 'set -e' command at the beginning already provided; however I see that the 'set -x' part is no more there....should I add to the crossbuilder file or leave it as it is, with only the 'set -e' specification? Needless to say, I tried also adding both the commands at the same time but still the 'dch' error is thrown;
- Typed 'crossbuilder setup-lxd' to install the container dependencies.
This is the output: https://paste.ubuntu.com/p/Jd4w6y4BYK/
-
@mardy any suggestion? I know that you are probably busy but I'm stuck with that and really no clue how to fix this issue.
Thank you.
-
Sorry @matteo, it's just that I don't read the forum everyday.
Yes, indeed I meant that you need to add
set -x
The setup phase seems to be OK, I cannot spot any problems there. Now can you please try to create a new container and show the output? -
@mardy I know, sorry if I'm bothering you but this thing is driving me nuts...I feel this to be the last hurdle before to start helping pro-actively UBports, that's why I'm insisting
Here you go, with the latest output I produced trying to create the OSK container....always complaining about 'dch' missing:https://paste.ubuntu.com/p/8KTf8TjKVs/
Hope you'll find a clue in here.
Thank you mardy!
-
Hi, today I finally had another try with crosscompile.
I got this in the setup https://paste.ubuntu.com/p/5KWj5j9HjQ/
and this trying to execute the rotation-lock indicator https://paste.ubuntu.com/p/hDntZ43mRy/but what about merging this tool with clickable? it already creates working containers (with docker and not lxc) and I think it just need to add the code to build something that isn't a click package and to install it on the device. also you'll use a unique container ans save disk space. but idk, maybe it's just a silly suggestion...
-
Oh, wait. I re-run crossbuilder and it has now a long log https://paste.ubuntu.com/p/vSxrr4K7Gn/ and it is complaining about some deps for indicator-display but idk if it's crossbuilder fault or it's indicator's...
-
@mymike Michele, would you mind trying to create a container also with the keyboard package cloning it from here as I already did before? I have had several errors (see previous outputs from me) and I'd like to see what's different from your output. Thanks.
P.S. what's your Desktop OS? Mine is Ubuntu 16.04.
-
Just want to add my findings in trying to use crossbuilder:
Ubuntu 17.04 (32bit)setup-lxd without zfs went well.
When trying to build with "crossbuilder --ubuntu=16.04" it stops with this error:
https://paste.ubuntu.com/p/YzNbHgGPpJ/ -
@luksus Why is your output so short? Did you cut it up to the essential?
For the error which states 'no device' are you sure you connected your phone to your PC prior to send the crossbuilder command? A tip for you: once connected the device to your PC, you don't need to type the complete command but you just need to write 'crossbuilder' and the script will detect by itself the OS (16.04 or 15.04). -
@mardy I think I made one step further. First I just realized that the
-su: dch: command not found
error is only thrown when I try to crossbuild again the keyboard package when it has been already created. If I wipe the container bylxc stop ubuntu-keyboard-usdk-16-04-amd64-armhf-dev
and thenlxc delete ubuntu-keyboard-usdk-16-04-amd64-armhf-dev
and I crossbuild it at its location, therefore theContainer is not connected to the Internet.
error is generated.
Secondly, I dug into the crossbuilder script and I found that this error, for my case at least, is a fake error. In fact, if I type in the terminallxc info ubuntu-keyboard-usdk-16-04-amd64-armhf-dev
I got this output:
As you can see the connection is actually available for the container (
eth0: inet6
).
However, running the script it is not detected because there is a typo in the concerned code rows:If I get rid of the
\b
ingrep -e "eth0.*inet\b"
then the connection is correctly detected and the setup can move forward.
Moving forward I got new errors in fetching some repositories. I'm not sure if the crossbuilt succeeded this time; trying to make a small change locally to the keyboard package and crossbuilding it on my phone, it seems I'm not able to see any difference...maybe it's me and probably I touched something not graphically evident as I thought. I'll make other attempts before to be sure I'm not able yet to make crossbuilder to properly work.
The very latest output, if you want to help me to understand if the repositories fetching error is problematic and how to circumvent this, is the following: https://paste.ubuntu.com/p/5w78Gz2MJx/.