Cross compiling for Ubuntu 14.04

Hi, I can’t seem to find a cross compiler for debian BBB that works (consistently) on Ubuntu 14.04

I’m using the latest debian image for BBB from beagleboard.org/latest-images.

I’m running 64 bit Ubuntu 14.04. I’ve managed to make my programs run on Angstrom, but I’ve been failing for about a week trying to port to Debian.

I tried the Linaro gcc at http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-uEnv.txtbasedbootscript and arm-linux-gnueabihf-g++ worked for most of my files. However, two of my files will compile and fail to run on the BBB.

I enter:
arm-linux-gnueabihf-g++ -Wall -Wno-unused-parameter -W -Wshadow -DARM_COMPILE -pthread -lstdc++ -lrt -o fileName $(SRCS)

and when I run the file on the BBB (./fileName, like I did for the other programs that worked), I get:
./fileName: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17’ not found (required by ./fileName)

What did I do wrong? Alternatively, is there a different cross tool chain?

Sorry to take up your time, and thanks in advance for the help.

Best,
Andrew

Hi, I can't seem to find a cross compiler for debian BBB that works
(consistently) on Ubuntu 14.04

I'm using the latest debian image for BBB from
beagleboard.org/latest-images.

I'm running 64 bit Ubuntu 14.04. I've managed to make my programs run on
Angstrom, but I've been failing for about a week trying to port to Debian.

I tried the Linaro gcc at
http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-uEnv.txtbasedbootscript
and arm-linux-gnueabihf-g++ worked for most of my files. However, two of my
files will compile and fail to run on the BBB.

I enter:
arm-linux-gnueabihf-g++ -Wall -Wno-unused-parameter -W -Wshadow
-DARM_COMPILE -pthread -lstdc++ -lrt -o fileName $(SRCS)

and when I run the file on the BBB (./fileName, like I did for the other
programs that worked), I get:
./fileName: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not
found (required by ./fileName)

Debian wheezy only has "GLIBC_2.13"..

What did I do wrong? Alternatively, is there a different cross tool chain?

Sorry to take up your time, and thanks in advance for the help.

These *.deb match Debian Wheezy, not sure if they'll install in 14.04:

http://rcn-ee.net/deb/cross/test/

built with:
https://github.com/RobertCNelson/cross-compiler

in a Wheezy VM.

Regards,

Robert, Yeah I was noticing that your build scripts pull in an additional Linaro GCC compiler when compiling the kernel. Last time I built, I seemed to recall that it was a different version too. So, we use one version to build u-boot, and another to build the kernel.

However with any GCC, “we” should be able to specify which LIBC we use . . . not that I know for sure offhand exactly how, as it is something I need to brush up on myself.

err, Linaro GCC toolchain but you get the idea.

After messing with a couple lines of the .sh file (removed every instance of apt-get update, updated aliases to the newest version), it downloaded. I did sudo dpkg -i *.deb in output… And it broke 40~ dependencies.

Software center is mad, Synaptic package manager can’t fix it, things are generally not ok. Haha, it’s been a long day :stuck_out_tongue:

It looks like your compiler would work, but the problem is Ubuntu doesn’t like it when you mess with dependencies. The dpkg command replaced some of my newer packages with older ones (the ones on the BBB), which apparently causes 80% of my third party programs to fail to open. And now it’s telling me that one of the packages I install is unremovable, meaning I can’t install the correct one.

Not really asking for help, just warning you that someone with only a couple months of Linux experience messed things up trying to put that tool chain on Ubuntu.

Andrew, suggestion. Get Virtualbox, and install Debian in a VM. It will make your life a whole lot easier. Or better yet if you have a spare box to dedicate use that. Then use it as a tool for your beaglebone only, and your life should become considerably simpler.

In general, not specific to this case, using dpkg -i is usually not
recommended, you could try gdebi (from gdebi-core) to check the
dependencies for you.

regards,
Nuno