我正在嘗試爲ARM cortex-8板構建QT。Qt配置freetype錯誤
我成功安裝主機配置爲每個給出的指令:http://qt-project.org/wiki/Building_Qt_for_Embedded_Linux
在ARM板目標構建配置的時候,我已經創建了自己的mkspec文件 Linux的TIarmv7-G ++具有配置如下:
> #
> # qmake configuration for building with arm-linux-g++
> #
>
> include(../../common/gcc-base-unix.conf)
> include(../../common/g++-unix.conf) include(../../common/linux.conf)
> include(../../common/qws.conf)
>
> # modifications to g++.conf
> #Toolchain
>
>
> #Compiler Flags to take advantage of the ARM architecture QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon
> -mfloat-abi=softfp QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp QMAKE_CC = arm-none-linux-gnueabi-gcc QMAKE_CXX = arm-none-linux-gnueabi-g++ QMAKE_LINK =
> arm-none-linux-gnueabi-g++ QMAKE_LINK_SHLIB =
> arm-none-linux-gnueabi-g++
>
> # modifications to linux.conf QMAKE_AR = arm-none-linux-gnueabi-ar cqs QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy QMAKE_STRIP =
> arm-none-linux-gnueabi-strip
>
> QMAKE_INCDIR += $$TSLIB_INCDIR QMAKE_LIBDIR += $$TSLIB_LIBDIR
> QMAKE_LIBS += -lts
>
> load(qt_config)
我已經安裝了CodeSourcery的工具鏈,我的環境是Ubuntu的12.04的64位操作系統和目標板ARM-cortex8
我configurat離子如下:
./configure -prefix/usr/local/qt-embedded -embedded arm -platform qws/linux-x86_64 -g ++ -xplatform qws/linux-TIarmv7 -g ++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no -accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse -linuxtp -qt-鼠標linuxinput -plugin-鼠標linuxtp -plugin鼠標-PC -fast -Confirm許可-v
執行冗長後,我得到以下錯誤:相關的FreeType庫
> m-none-linux-gnueabi/bin/ld: cannot find -lts collect2: ld returned 1
> exit status make: *** [sound] Error 1 sound disabled. FreeType
> auto-detection...() arm-none-linux-gnueabi-g++ -c -pipe -O3
> -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W -I../../../mkspecs/qws/linux-TIarmv7-g++ -I. -o freetype.o freetype.cpp freetype.cpp:42:22: fatal error: ft2build.h: No such file
> or directory compilation terminated. make: *** [freetype.o] Error 1
> FreeType disabled. Determining machine byte-order...
> (/home/rootx/qt-everywhere-opensource-src-4.8.1/mkspecs/qws/linux-TIarmv7-g++
> yes /home/rootx/qt-everywhere-opensource-src-4.8.1
> /home/rootx/qt-everywhere-opensource-src-4.8.1)
> arm-none-linux-gnueabi-g++ -Wl,-O1 -o endiantest endiantest.o -lts
> /home/rootx/toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld:
> cannot find -lts collect2: ld returned 1 exit status make: ***
> [endiantest] Error 1 Unknown byte order!
>
> The target system byte order could not be detected!
如何解決這個錯誤?
它已經安裝 – user1426143
好吧,堅持兩件事:它看起來像你正在運行make -j4或類似的東西。你可以不用線程運行make嗎?通過這種方式,我們仔細檢查確定這是事情失敗的路線,而不是更早或更晚。另外,你可以做'updatedb &&'找到'ft2build.h',這樣我們就可以知道ft2build.h在哪裏,並且它是否在包含路徑中? – MrFox
我只給了'make'命令。 /rootx/freetype-2.4.9/devel/ft2build.h /home/rootx/freetype-2.4.9/include/ft2build.h /home/rootx/qt-everywhere-opensource-src-4.8.1/src /3rdparty/freetype/devel/ft2build.h /home/rootx/qt-everywhere-opensource-src-4.8.1/src/3rdparty/freetype/include/ft2build.h /usr/include/ft2build.h – user1426143