I have a Beaglebone Black with debian 7.5 on it.
My host is a 32bit Ubuntu 14.10 installation.
I'm using Qt4.8.6 for arm cross-compilation
I am trying create an application which uses a touchscreen and also reads MIDI input from a keyboard. I've used the following tutorial (http://embedded.von-kannen.net/2014/05/21/qt-4-8-6-on-beaglebone-black/) to install Qt embedded so I can crosscompile to my beaglebone (Tutorial needs some fixes, I've got a 'fixed' doc ready if anyone needs one)
The files got deployed to the beagle and they worked, though getting the screen calibrated always required some extra inputs. This all worked fine-ish until my Qt project had need of the RtMidi libraries for reading and sending MIDI signals. I can compile everything with RtMidi just fine on my desktop, however when I try to build for the BBB I'm greeted with following:
Cannot find -lasound
collect2: error: ld returned 1 exit status
I suspected I need to build ALSA for arm, which I tried to do with the help of this: http://www.omappedia.org/wiki/ALSA_Setup
Took some effort but I think I managed to get something. Alas when I added my creation to Qt:
DEFINES += __LINUX_ALSA__
LIBS += -L/path/to/folder/containing/asound -lasound
I was greeted with:
undefined reference to: '__pol_chk#GLIBC_2.16' in /.../libasound.so file
collect2: error: ld returned 1 exit status
I've either done it wrong, or it just doesn't work anymore.
I used arm-linux-gnueabi-c++/gcc instead of arm-none-linux-gnueabi-c++/gcc as from what I understood the arm-none-linux-gnueabi stuff belongs to the codesourcery toolchain? I didn't have the arm-none-linux-gnueabi stuff anyway... If that's my whole issue how do I get it?
Frankly I'm pretty lost. I don't even know if arm ALSA is the issue at all. I'm not particularly familiar nor comfortable with Ubuntu, but I have no choice. Tutorials for Windows all require the codesourcery toolchain which is no longer available for free and the ubuntu tutorials are much more informative and slightly less rare... All the tutorials for what I'm doing seem to be incredibly outdated. Everything is made for the old Angstrom Distribution and not really valid anymore... I have at this point lost track entirely of what I should do to get it to work.
I need help. preferably with instructions you'd give to a 5-year-old (with steps and terminal inputs spelled out clearly...)
I'm not sure what other information I need to provide, so if I'm missing anything please ask.
I found my answer. It turns out the compiler I was using was indeed the issue. After getting my hands on arm-none-linux-gnueabi the issue progressed a little but ultimately came to a halt again when I started running into VFP register issues...
My solution in the end was to use the linaro compiler I had used previously to compile Qtembedded as well. that is: arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-c++.
I had also partially misunderstood the instructions in the alsa tutorial and was compiling stuff to the wrong paths.
for whomever noob finds this by googling: if you're getting told the compiler toolchain can't create an executable use:
$ PATH=/home/<user>/......./linaro-lotsa-version-numbers/bin/:$PATH
(the folder that contains a whole lot of executable looking stuff with the words arm-linux-gnueabihf in them)
before doing the CC=/bla/bla/bla commands.
similarly the configure's --prefix option is going to likely look to something like this:
/home/<user>/....../linaro-lotsa-version-numbers/arm-linux-gnueabihf/libc/usr
in Qt use:
LIBS += -L/home/<user>/....../linaro-lotsaversionnumbers/arm-linux-gnueabihf/libc/usr/lib -lasound
(you're looking for the folder containing libasound.so)
That is, obviously assuming you did your work in your home folder like I did following the above tutorial.