Здравствуйте. Компилирую qt под raspberry-pi на ubuntu. Работаю по источнику
http://exploreembedded.tumblr.com/post/115333857238/guide-to-cross-compile-qt-54-for-the-raspberry-piСодержимое файла ./fixQualifiedLibraryPaths:
#!/bin/bash
#This script is ugly, feel free to fix it
if [ "$#" -ne 1 ]; then
echo "usage ./cmd target-rootfs"
exit -1
fi
#passed args
ROOTFS=$1
TOOLCHAIN=arm-linux-gnueabihf
INITIAL_DIR=$PWD
function adjustSymLinks
{
echo "Adjusting the symlinks in $1 to be relative"
cd $1
find . -maxdepth 1 -type l | while read i;
do qualifies=$(file $i | sed -e "s/.*\`\(.*\)'/\1/g" | grep ^/lib)
if [ -n "$qualifies" ]; then
newPath=$(file $i | sed -e "s/.*\`\(.*\)'/\1/g" | sed -e "s,\`,,g" | sed -e "s,',,g" | sed -e "s,^/lib,$2/lib,g");
echo $i
echo $newPath;
sudo rm $i;
sudo ln -s $newPath $i;
fi
done
cd $INITIAL_DIR
}
adjustSymLinks $ROOTFS/usr/lib "../.."
echo "Testing for existence of potential debian multi-arch dir: $DEB_MULTI_ARCH_MADNESS"
if [ -n "$DEB_MULTI_ARCH_MADNESS" -a -e "$DEB_MULTI_ARCH_MADNESS" ]; then
echo "Debian multiarch dir exists, adjusting"
adjustSymLinks $DEB_MULTI_ARCH_MADNESS "../../.."
fi
После запуска скрипта ./fixQualifiedLibraryPaths в терминале выдает следующее: ./cmd target-rootfs
После команды ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -skip qtwebkit в терминале следующее:
+ cd qtbase
+ /home/user/Qt/5.4/Src/qtbase/configure -top-level -v -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE= -sysroot -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -skip qtwebkit
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
c
This is the Qt Technology Preview Edition.
You have already accepted the terms of the Technology Preview license.
Precompiled-headers support enabled.
g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
g++ --sysroot=-opensource -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
Symbolic function binding enabled.
DEFAULT_INCDIRS="/usr/include
/usr/local/include"
DEFAULT_LIBDIRS="/lib
/usr/lib"
Creating qmake...
g++ -c -o qlibraryinfo.o -pipe -ffunction-sections -O2 -g -I/home/user/Qt/5.4/Src/qtbase/qmake -I/home/user/Qt/5.4/Src/qtbase/qmake/library -I/home/user/Qt/5.4/Src/qtbase/qmake/generators -I/home/user/Qt/5.4/Src/qtbase/qmake/generators/unix -I/home/user/Qt/5.4/Src/qtbase/qmake/generators/win32 -I/home/user/Qt/5.4/Src/qtbase/qmake/generators/mac -I/home/user/Qt/5.4/Src/qtbase/qmake/generators/integrity -I/home/user/Qt/5.4/Src/qtbase/include -I/home/user/Qt/5.4/Src/qtbase/include/QtCore -I/home/user/Qt/5.4/Src/qtbase/include/QtCore/5.4.2 -I/home/user/Qt/5.4/Src/qtbase/include/QtCore/5.4.2/QtCore -I/home/user/Qt/5.4/Src/qtbase/src/corelib/global -DHAVE_QCONFIG_CPP -I/home/user/Qt/5.4/Src/qtbase/mkspecs/linux-g++ -I/home/user/Qt/5.4/Src/qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS /home/user/Qt/5.4/Src/qtbase/src/corelib/global/qlibraryinfo.cpp
g++ -o "/home/user/Qt/5.4/Src/qtbase/bin/qmake" project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o gbuild.o cesdkhandler.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o -Wl,--gc-sections
Running configuration tests...
Failed to process makespec for platform 'devices/linux-rasp-pi-g++'
Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=<path>
Could not read qmake configuration file /home/user/Qt/5.4/Src/qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
Error processing project file: /dev/null
Команда make выдает затем ошибку: make: *** Не заданы цели и не найден make-файл. Останов.
Кто знает, в чем проблема??? Спасибо