[Angstrom-devel] Cross-compiling Qt apps for Angstrom with CMake
Hi All, I've built the toolchain as described on the angstrom wiki as well as qt-x11-free and begun setting up CMake to cross compile. It's pretty much there (I expect it may even work, but I've not yet got a beagleboard to test it on), but I get a warning about being unable to find libc to link against. The error specifically is: /storage/Software/Angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: warning: libc.so, needed by /storage/Software/Angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/lib/libgcc_s.so, not found (try using -rpath or -rpath-link) The CMake file I put together for the toolchain is attached, and when I run cmake with --trace I see the directly containing libc.so listed in the implicit link directories. I'd rather not use rpath(-link), if I can avoid it, but I'm new to embedded dev, so if this is the preferred approach I'll go along with advice. I'm not certain I've set the toolchain up as intended, either. Any advice on how to configure this correctly would be fantastic. Cheers, Alan. # the name of the target operating system SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_PROCESSOR armv7a) SET(ANGSTROM_TEMP_DIR /storage/Software/Angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/) # which compilers to use for C and C++ SET(CMAKE_C_COMPILER ${ANGSTROM_TEMP_DIR}sysroots/x86_64-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-gcc) SET(CMAKE_CXX_COMPILER ${ANGSTROM_TEMP_DIR}sysroots/x86_64-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++) # here is the target environment located SET(CMAKE_FIND_ROOT_PATH ${ANGSTROM_TEMP_DIR}sysroots/x86_64-linux/usr/armv7a ${ANGSTROM_TEMP_DIR}sysroots/armv7a-angstrom-linux-gnueabi /storage/Software/Angstrom/external ) # Give some hints where to find the required Qt stuff for this SET(QT_HEADERS_DIR /usr/include/qt4 ) SET(QT_LIBRARY_DIR /usr/lib ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ___ Angstrom-distro-devel mailing list Angstrom-distro-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel
Re: [Angstrom-devel] Cross-compiling Qt apps for Angstrom with CMake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you're building a Qt app I would strongly advise using qmake. If you're not building a Qt apps I would strongly advise dropping cmake, it's horrible. CMake wasn't designed to support crosscompiling and that shows :( Since you seem to have a OE build setup already, write a recipe for it that inherits the cmake class, that should work around the worst cmake "features". regards, Koen On 10-09-10 00:18, Alan Jones wrote: > Hi All, > > I've built the toolchain as described on the angstrom wiki as well as > qt-x11-free and begun setting up CMake to cross compile. > > It's pretty much there (I expect it may even work, but I've not yet got a > beagleboard to test it on), but I get a warning about being unable to > find libc to link against. The error specifically is: > > /storage/Software/Angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: > warning: libc.so, needed by > /storage/Software/Angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/sysroots/x86_64-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/lib/libgcc_s.so, > not found (try using -rpath or -rpath-link) > > The CMake file I put together for the toolchain is attached, and when I > run cmake with --trace I see the directly containing libc.so listed in the > implicit link directories. > > I'd rather not use rpath(-link), if I can avoid it, but I'm new to embedded > dev, > so if this is the preferred approach I'll go along with advice. > > I'm not certain I've set the toolchain up as intended, either. Any advice > on how to configure this correctly would be fantastic. > > Cheers, > > Alan. > > > > ___ > Angstrom-distro-devel mailing list > Angstrom-distro-devel@linuxtogo.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFMieUMMkyGM64RGpERAnyoAJ9xDzb572VmSUaBD2rI21SDCBIj0gCcCN5b ryquuBywa7ixoU1FKFAi6Ho= =Pt5W -END PGP SIGNATURE- ___ Angstrom-distro-devel mailing list Angstrom-distro-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel
Re: [Angstrom-devel] Cross-compiling Qt apps for Angstrom with CMake
On 10 September 2010 09:58, Koen Kooi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > If you're building a Qt app I would strongly advise using qmake. If > you're not building a Qt apps I would strongly advise dropping cmake, > it's horrible. CMake wasn't designed to support crosscompiling and that > shows :( > > Since you seem to have a OE build setup already, write a recipe for it > that inherits the cmake class, that should work around the worst cmake > "features". Sorry for hijacking the thread. But could you please explain what is bad about CMake for cross-compilation? What of its "features" needs workarounds? The reason I ask is that in my own (limited) experience, CMake is a very good build system, also for cross-compilation. And I prefer CMake over Autotools. Shouldn't I? Best regards, Bjørn Forsman ___ Angstrom-distro-devel mailing list Angstrom-distro-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel