Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Beaglebone Crossompile: Cannot find lib not so easy fix
I have been following this tutorial for cross compiling on the beaglebone black (BBB).
I have cross compiled QT 4.8.6 on my VM running Ubuntu 14.04.2 LTS for my BBB using an appropriate cross compiler. I then installed QT creator 2.8 on my VM. I set everything up in Qt Creator (the tool kit, etc). It connects to the BBB just fine. I built test app and this is where I hit the snag. When I try to run it (the green arrow) it errors out saying:
stdin: is not a tty
/home/debian/test: error while loading shared libraries: cannot find QtNetwork.so.4: cannot open shared object file: no such file or directory
Remote application finished with exit code 127.
I went into build environment and set LD_LIBRARY_PATH to /usr/local/Trollteh/QtEmbedded-4.8.6-arm/lib (where the cross compiled libs are). I copied the libs onto the beaglebone under the same directory path as well. I exported the path as LD_LIBRARY_PATH=/usr/local/.../lib. None of these fixes have worked and I have confirmed the exact file name exists within the lib directory. What do I do next?
Also, out of curiosity how backwards compatible is Qt Creator? Can I use the most recent version to develop on even though I'm cross compiling 4.8.6 or what is the newest version I can use with Qt4? 2.8?
Leonardo last edited by
I think you're setting the wrong variable. LD_LIBRARY_PATH is the runtime linkage directory, not compile time. You should add to your project file (.pro):
LIBS += -L/usr/local/.../lib
Then run qmake and try compiling again.
I don't know about the backward compatibility of Qt creator. Sorry.
Hi and welcome to devnet,
You can use the latest version of Qt Creator without any problem to build Qt 4 software. The only thing that you must take into account for the version of Qt Creator is that since Qt 5.2 you need at least Qt Creator 3
@Leonardo Unfortunately this did not work either. It came back with the same error. I have also tried inserting the path into the /etc/ld.so.conf file and changing the directories under which the files are located (simplifying it) and then repeating all these work arounds. :/
ld.so.conf is also used at run time. Adding the path to LIBS using -L is the way to go
Ian Landi last edited by
@SGaist It did not work. When I directly run the program on my BBB it comes up with a versioning error of GLIBC. When I fix this error and get it to run on my BBB I will try the console and update this post.
That means that your cross-compile build is using a different Qt version than the one you have on your BBB
@SGaist I followed a tutorial and it worked for them. I am going to find an old version of Ubuntu with eglibc2.13 to run on my VM and cross compile against since I cannot update glibc to 2.17 on my BBB as my Qt program says is needed. Does this sound like a good plan?
I'd rather go with building Qt using your BBB root filesystem so you can have all the most recent part you can