← Back to team overview

ubuntu-phone team mailing list archive

Re: Compiling armhf binaries for a phone target - toolchain from where?

 

Sorry, forgot to send this to the list as well. Second try.

I've had success compiling my packaged app for armhf using pbuilder-dist.
It uses virtualization, so it's rather slow.

Creating a Debian source package with qt c++ compiling support involves
some googling, but debhelper supports it and it's not really difficult.

The resulting deb file works on my phone. Not sure how c++ code will be
handled with click packages, AFAIK they will land soon and apt will no
longer work, unless you enable developer mode.

Cheers
Am 15.07.2013 12:20 schrieb "John McAleely" <john.mcaleely@xxxxxxxxxxxxx>:

> Hi,
>
> I have some C/C++ code that (eventually) I want to run on an Ubuntu Touch
> phone or tablet.
>
> This may be some sort of interim step before achieving Qt/QML nirvana, or
> this may be a subsystem a Qt app will depend on (I'm doing some early
> experimentation, and may yet be chasing the wrong ideas).
>
> I'm not (for the sake of this question) planning to build the Android
> underpinnings, so one of my start points has been not to assume I have that
> source tree available (I understand it may have some toolchains in it). Is
> that wise?
>
> I believe I need a toolchain to compile this code, and I have (at least)
> three options presented in chats/wikis/docs I've googled/assumed might work:
>
>  (1) Compile on the device itself
>  (2) Install the Ubuntu SDK
>  (3) Install a cross-compilation toolchain on my (amd64) Ubuntu dev machine
>
> I can succeed at (1), by installing whatever defaults build-essential
> requires.
>
> I'm not sure if (2) should succeed - it's not clear to me if the Ubuntu
> SDK does or will recommend/install a c/c++ toolchain. The one I installed
> today doesn't appear to. Will it at some point? Did I just not see the one
> it did install?
>
> for (3), if I try:
>
> # apt-get install crossbuild-essential-armhf
>
> I get:
>
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies.
>  crossbuild-essential-armhf : Depends: libc6-dev:armhf but it is not
> installable
> E: Unable to correct problems, you have held broken packages.
>
> My initial troubleshooting (I'm definitely inexperienced in Ubuntu package
> matters) hasn't turned up a way to proceed past that error yet.
>
> So, which is the most pragmatic way to proceed? I'm keen to get a cross
> compilation toolchain working. Should I be?
>
> In the future, what will the options be to compile C/C++ for touch devices?
>
> Thanks!
>
> J
>
> --
> Mailing list: https://launchpad.net/~ubuntu-**phone<https://launchpad.net/~ubuntu-phone>
> Post to     : ubuntu-phone@lists.launchpad.**net<ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~ubuntu-**phone<https://launchpad.net/~ubuntu-phone>
> More help   : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>

References