解压交叉编译工具后在终端中执行:
export PATH="你的交叉编译工具文件/user/bin":$PATH
./setARM_QpeEnv
./arm-qtopia-2.2.0-konqueror_build
arm-linux-g++ -c -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -fPIC -DQT_NO_QWS_SNAP -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MACH64 -DQT_NO_QWS_MATROX -DQT_NO_QWS_VNC -DQT_NO_QWS_VGA_16 -DQT_NO_QWS_DEPTH_4 -DQT_NO_QWS_DEPTH_8 -DQT_NO_QWS_DEPTH_18 -DQT_NO_QWS_DEPTH_24 -DQT_NO_QWS_VFB -DQT_BUILTIN_GIF_READER=1 -DQT_NO_IMAGEIO_MNG -DQT_NO_SM_SUPPORT -DQT_NO_XKB -DQT_QWS_TSLIB -fno-exceptions -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src/3rdparty/zlib -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src/3rdparty/libpng -I/usr/X11R6/include -I3rdparty/kernel -I3rdparty/tools -o tmp/release-shared-linux-arm-g++-no-keypad/kernel/qwsmouse_qws.o kernel/qwsmouse_qws.cpp
kernel/qwsmouse_qws.cpp:63:19: error: tslib.h: No such file or directory
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:189: warning: deprecated conversion from string constant to 'char*'
kernel/qwsmouse_qws.cpp:1623: warning: unused parameter 'mouseDev'
kernel/qwsmouse_qws.cpp: In member function 'void QTSLibHandlerPrivate::openTs()':
kernel/qwsmouse_qws.cpp:1773: error: 'ts_open' was not declared in this scope
kernel/qwsmouse_qws.cpp:1780: error: 'ts_config' was not declared in this scope
kernel/qwsmouse_qws.cpp:1784: error: 'ts_fd' was not declared in this scope
kernel/qwsmouse_qws.cpp: In member function 'void QTSLibHandlerPrivate::closeTs()':
kernel/qwsmouse_qws.cpp:1793: error: 'ts_close' was not declared in this scope
kernel/qwsmouse_qws.cpp: In member function 'void QTSLibHandlerPrivate::readMouseData()':
kernel/qwsmouse_qws.cpp:1855: error: aggregate 'ts_sample sample' has incomplete type and cannot be defined
kernel/qwsmouse_qws.cpp:1863: error: 'ts_read' was not declared in this scope
kernel/qwsmouse_qws.cpp: In member function 'void QTSLibHandlerPrivate::interpolateSample()':
kernel/qwsmouse_qws.cpp:1882: error: elements of array 'ts_sample samples [25]' have incomplete type
kernel/qwsmouse_qws.cpp:1882: error: storage size of 'samples' isn't known kernel/qwsmouse_qws.cpp:1893: error: 'ts_read_raw' was not declared in this scope kernel/qwsmouse_qws.cpp:1916: error: invalid application of 'sizeof' to incomplete type 'ts_sample' kernel/qwsmouse_qws.cpp:1920: error: invalid application of 'sizeof' to incomplete type 'ts_sample' kernel/qwsmouse_qws.cpp: In static member function 'static int QTSLibHandlerPrivate::sortByX(const void*, const void*)': kernel/qwsmouse_qws.cpp:1931: error: invalid use of incomplete type 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1931: error: forward declaration of 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1932: error: invalid use of incomplete type 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1931: error: forward declaration of 'const struct ts_sample' kernel/qwsmouse_qws.cpp: In static member function 'static int QTSLibHandlerPrivate::sortByY(const void*, const void*)': kernel/qwsmouse_qws.cpp:1942: error: invalid use of incomplete type 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1942: error: forward declaration of 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1943: error: invalid use of incomplete type 'const struct ts_sample' kernel/qwsmouse_qws.cpp:1942: error: forward declaration of 'const struct ts_sample' make[1]: *** [tmp/release-shared-linux-arm-g++-no-keypad/kernel/qwsmouse_qws.o] 错误 1 make[1]:正在离开目录 `/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src'
解决办法
将tslib-1.4.1/src/中的tslib.h tslib-private.h tslib-filter.h 文件复制到arm-qtopia-2.2.0/qt2/include/路径下
cp tslib.h tslib-private.h tslib-filter.h /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/include/
arm-linux-g++ -c -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -fPIC -DQT_NO_QWS_SNAP -DQT_NO_QWS_VOODOO3 -DQT_NO_QWS_MACH64 -DQT_NO_QWS_MATROX -DQT_NO_QWS_VNC -DQT_NO_QWS_VGA_16 -DQT_NO_QWS_DEPTH_4 -DQT_NO_QWS_DEPTH_8 -DQT_NO_QWS_DEPTH_18 -DQT_NO_QWS_DEPTH_24 -DQT_NO_QWS_VFB -DQT_BUILTIN_GIF_READER=1 -DQT_NO_IMAGEIO_MNG -DQT_NO_SM_SUPPORT -DQT_NO_XKB -DQT_QWS_TSLIB -fno-exceptions -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src/3rdparty/zlib -I/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src/3rdparty/libpng -I/usr/X11R6/include -I3rdparty/kernel -I3rdparty/tools -o tmp/release-shared-linux-arm-g++-no-keypad/kernel/qjpegio.o kernel/qjpegio.cpp
kernel/qjpegio.cpp:60:21: error: jpeglib.h: No such file or directory
kernel/qjpegio.cpp:67: error: expected class-name before '{' token
kernel/qjpegio.cpp:76: error: variable or field 'my_error_exit' declared void
kernel/qjpegio.cpp:76: error: 'j_common_ptr' was not declared in this scope
kernel/qjpegio.cpp:92: error: expected class-name before '{' token
kernel/qjpegio.cpp:95: error: 'JOCTET' does not name a type
kernel/qjpegio.cpp: In constructor 'jpegSmoothScaler::jpegSmoothScaler(jpeg_decompress_struct*, const char*)':
kernel/qjpegio.cpp:106: error: invalid use of incomplete type 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:105: error: forward declaration of 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:106: error: invalid use of incomplete type 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:105: error: forward declaration of 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:112: error: invalid use of incomplete type 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:105: error: forward declaration of 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp: In member function 'virtual QRgb* jpegSmoothScaler::scanLine(int, const QImage*)':
kernel/qjpegio.cpp:130: error: 'jpeg_read_scanlines' was not declared in this scope
kernel/qjpegio.cpp:137: error: invalid use of incomplete type 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp:105: error: forward declaration of 'struct jpeg_decompress_struct'
kernel/qjpegio.cpp: At global scope:
kernel/qjpegio.cpp:162: error: variable or field 'qt_init_source' declared void
kernel/qjpegio.cpp:162: error: 'j_decompress_ptr' was not declared in this scope
kernel/qjpegio.cpp:167: error: 'boolean' does not name a type
kernel/qjpegio.cpp:190: error: variable or field 'qt_skip_input_data' declared void
kernel/qjpegio.cpp:190: error: 'j_decompress_ptr' was not declared in this scope
kernel/qjpegio.cpp:190: error: expected primary-expression before 'long'
make[1]: *** [tmp/release-shared-linux-arm-g++-no-keypad/kernel/qjpegio.o] 错误 1 make[1]:正在离开目录 `/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src'
解决办法:
1>下载jpegsrc.v6b.tar.gz 地址为:http://www.ijg.org/files/。
2>解压缩压缩包,建立文档
mkdir /opt/jpeg/jpeg-6b-release
./configure CC=arm-linux-gcc --prefix=/opt/jpeg/jpeg-6b-release --enable-shared --enable-static --host=arm-linux
mkdir /opt/jpeg/jpeg-6b-release/bin
mkdir /opt/jpeg/jpeg-6b-release/include
mkdir /opt/jpeg/jpeg-6b-release/lib
mkdir /opt/jpeg/jpeg-6b-release/man
mkdir /opt/jpeg/jpeg-6b-release/man/man1
make
3>配置
./configure CC=arm-linux-gcc --prefix=/opt/jpeg/jpeg-6b-release --enable-shared --enable-static --host=arm-linux
4>编译:make
./libtool --mode=compile arm-linux-gcc -O2 -I. -c ./jcapimin.c
make: ./libtool:命令未找到
make: *** [jcapimin.lo] 错误 127
make失败
5>安装libtool,xz
下载 libtool-2.4.tar.gz
http://pan.baidu.com/share/link?shareid=1317841432&uk=691958493&fid=576164544674918
下载 xz-4.999.9beta.tar.bz2
http://tukaani.org/xz/xz-4.999.9beta.tar.bz2
解压安装xz工具
tar -jxvf xz-4.999.9beta.tar.bz2
cd xz-4.999.9beta
./configure --prefix=/
4、make && make install
解压安装libtool
./configure CC=arm-linux-gcc --host=arm-linux --prefix=/opt/jpeg/libtool-release
make && make install
查看安装结果
cd /opt/jpeg/libtool-release/bin
复制libtool工具至jpeg文件夹中
cd ..
cp ../libtool-release/bin/* ../jpeg-6b/
6>再次编译jpeg库
cd ../jpeg-6b
./configure CC=arm-linux-gcc --prefix=/opt/jpeg/jpeg-6b-release --enable-shared --enable-static --host=arm-linux
make && mak install
编译成功
7>复制编译好的jped到qtopia文件中
cp /opt/jpeg/jpeg-6b-release/include/* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/include
cp /opt/jpeg/jpeg-6b-release/lib/* /opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/lib/
8>更改qmake.conf
sudo gedit arm-qtopia-2.2.0/qtopia/mkspecs/qws/linux-arm-g++/qmake.conf
将
QMAKE_LIBS_QT = -lqte
改为
QMAKE_LIBS_QT = -lqte -ljpeg
9>再次编译
./arm-qtopia-2.2.0-konqueror_build
解决了问题
/usr/local/arm/4.2.2-eabi/usr/bin-ccache/../lib/gcc/arm-unknown-linux-gnueabi/4.2.2/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lts
collect2: ld returned 1 exit status
make[1]:正在离开目录 `/opt/EmbedSky/Qte/arm-qtopia-2.2.0/qt2/src'
解决办法
查看ld -lts执行详情:
./ld -lts -verbose
attempt to open /home/jeremy/ut6410/4.2.2-eabi/usr/arm-unknown-linux-gnueabi/bin/../lib/libts.so failed
attempt to open /home/jeremy/ut6410/4.2.2-eabi/usr/arm-unknown-linux-gnueabi/bin/../lib/libts.a failed
attempt to open /usr/local/arm/4.2.2-eabi//usr/local/lib/libts.so failed
attempt to open /usr/local/arm/4.2.2-eabi//usr/local/lib/libts.a failed
attempt to open /usr/local/arm/4.2.2-eabi//lib/libts.so failed
attempt to open /usr/local/arm/4.2.2-eabi//lib/libts.a failed
attempt to open /usr/local/arm/4.2.2-eabi//usr/lib/libts.so failed
attempt to open /usr/local/arm/4.2.2-eabi//usr/lib/libts.a failed
./ld: cannot find -lts
基于友坚UT-S3C6410的qtopia移植宣告失败了,通过网络查询资料发现,可能是交叉编译工具链不是完全版造成的。
对于这种情况我也是充满了无奈,开发板厂家本来应该做好各种资料,针对自己的平台准备好各种内容的,但是开发板厂家似乎并不在意于这些。对于这些开发板厂家,以后还是敬谢不敏了。
其实更适合学生学习的并不是这些上来就让你吧各种系统都来回编译,而且各种编译工具各种出差的的东西。而是更省心更容易做出东西的好板子。