Hi, I’m having trouble in finding a gcc cross toolchain for BBB.
I’m using the latest debian image for BBB from beagleboard.org/latest-images.
As host I have a debian wheezy VM. now I’m looking for some days to find a way to compile my project for the debian version.
(I already had it working on angstrom, but now as you move on t debian I need to port my code to debian)
I already tried emdebian.org (https://wiki.debian.org/EmdebianToolchain#Get_the_binaries) but got stuck anywhere. (Can’t remember where)
I tried miltiarch support from https://wiki.debian.org/MultiarchCrossToolchainBuild?action=show&redirect=MultiarchCrossToolchains but this doesn’t work.
Has anybody a working toolchain for 32bit debian wheezy as tar.gz file.
I’m stuck, please help.
Regards, Ben
Well, i posted 64 bit test versions here:
http://rcn-ee.net/deb/cross/test/
The script to generate them should run fine for 32 bit.
https://github.com/RobertCNelson/cross-compiler/blob/master/build-wheezy-compiler.sh
Just make sure you build it in a 100% Debian Wheezy distro (no
testing/sid/etc), and we "might" have to bump some of the file
versions as it was a month or ago that i wrote it.
Regards,
Thanks Robert,
I’m just wondering right now why the hell I didn’t see that repo in your github…
I will try this out.
Many thanks so far!
regards, Ben
Back again!
I your script did run a while on my machine, now I have some .deb packages in the ./deploy folder.
(I’m using my debian wheezy 32Bit vm (Linux debian-wheezy-vm 3.2.0-4-486 #1 Debian 3.2.51-1 i686 GNU/Linux)
As far as I could see the script did run without problems.
Binutils and some other stuff already did get installed to my /usr/bin folder.
g++ is not installed.
As far as I understand your script as a linux novice it should have been installed by some call to dpkg_cross.
I already tried to manually install all the .deb packages from deploy folder with
dpkg -i xzz.deb -force
but this is failing because of dependency problems.
Two questions:
- Is there a possibility to specify a prefix for the whole toolchain? (like angstrom toolchain has /usr/local/angstrom)
- how to install the .deb packages
Regards,
Ben
Robert,
Can’t we simply use one of the Linaro cross compiling toolchains to cross-compile for a Debian based BBB installation?
Does this mean we absolutely must run Wheezy on our PC to be able to cross-compile for the BBB with a Debian image.?
Thanks Hussam.
Back again!
I your script did run a while on my machine, now I have some .deb packages
in the ./deploy folder.
(I'm using my debian wheezy 32Bit vm (Linux debian-wheezy-vm 3.2.0-4-486 #1
Debian 3.2.51-1 i686 GNU/Linux)
As far as I could see the script did run without problems.
Binutils and some other stuff already did get installed to my /usr/bin
folder.
g++ is not installed.
As far as I understand your script as a linux novice it should have been
installed by some call to dpkg_cross.
Correct, the "cross" built binutils needs to be installed to build "gcc/g++"
I already tried to manually install all the .deb packages from deploy folder
with
dpkg -i xzz.deb -force
but this is failing because of dependency problems.
"sudo dpkg -i *.deb" from the output directory "should" install it
Two questions:
1. Is there a possibility to specify a prefix for the whole toolchain? (like
angstrom toolchain has /usr/local/angstrom)
It'll be something like that, i need to fire up my wheezy vm and
double check (running jessie)
2. how to install the .deb packages
Regards,
This cross compiler script/deb's are for people who want to cross
build using the same exact libraries/gcc/g++ versions that are on the
debian image.
You can use Linaro's cross tools as is.
Regards,
Yeah!
“sudo dpkg -i *.deb” did do the trick.
I see now that only one dpkg call specifying all deb packages at once resolves the dependencies but fireing dpkg -i command for each file alone (even in a “for each x in”-loop) does not work. - something new learned-
Many thanks, I will now try to compile my project (using qt; this means I need to recompile my qteverywhere also… damn… so much left to do…)
BTW: I also stumbled upon the linaro toolchain you mention here (http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-uEnv.txtbasedbootscript)
Is it an “worth considering alternative” for this “home-brew-self-compiled-toolchain” ?
regards,
Ben
There's nothing wrong with the "linaro" toolchain. Some
users/customers want an exact gcc/lib/etc match with the gcc/lib/etc
on the debian image.
Regards,
OK, thanks for making things clear.
So I also think the way to go is using the same toolchain for the kernel and the “user binaries”
→ I will (try to) use the linaro toolchain.
thanks so far.
regards,
Ben
I use Robert’s instructions from that kernel built from scratch instructions partially because it does make cross compiling very simple. All you have to do is match the Linaro toolchain.
The Windows binaries for Linaro work fine too for what it is worth. Or at least did last I built “from scratch”. I wrote a mini howto setup LInaro + Code::Blocks on WIndows, and posted it on beaglefu forums last year. But it is very simplistic, and I probably need to revisit / rewrite the instructions. Mainly I just wrote it to share the gist of what was possible.
Code::Bocks btw is a very flexible cross platform IDE, that isn’t written in java. If that is important to you.