2018/11/13 11:39
版本:V1.0
开发板:SC3817R
SDK:tina v3.0
1、01原始编译全志r16平台tinav3.0系统:
[email protected]:~$ cd /home/wwt
[email protected]:/home/wwt$
[email protected]:~$ cd /home/wwt
[email protected]:/home/wwt$
[email protected]:/home/wwt$
[email protected]:/home/wwt$ md5sum tina_v3.0_20180606_1711git.tar.gz
ebf7ea460473f13a7f64248ed61cf998 tina_v3.0_20180606_1711git.tar.gz
[email protected]:/home/wwt$
[email protected]:/home/wwt$ tar zxvf tina_v3.0_20180606_1711git.tar.gz
[email protected]:/home/wwt$
[email protected]:/home/wwt$ cd tina_v3.0/
[email protected]:/home/wwt/tina_v3.0$
[email protected]:/home/wwt/tina_v3.0$
[email protected]:/home/wwt/tina_v3.0$ source build/envsetup.sh
(请严重注意:lunch之后的选项是环境依赖的,请选择astar_parrot-tina前的实际数值!)
[email protected]:/home/wwt/tina_v3.0$ lunch
You‘re building on Linux
Lunch menu... pick a combo:
5. astar_parrot-tina
Which would you like?5
[email protected]:/home/wwt/tina_v3.0$ make -j12
[email protected]:/home/wwt/tina_v3.0$ pack -d
2、起因:服务器上最初是可以编译全志R系列的tina/Android系统的。但是突然编译不了tina v3.0的SDK了(tina v2.5也异常),但是可以编译tina v2.1和Android。
出错现象:
[email protected]:/home/wwt/tina_v3.0.4$ make -j12
[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestVC.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesStringWidget.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTarBZip2Generator.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGlobalVC.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestCVS.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestSVN.cxx.o
[ 97%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTarCompressGenerator.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestBZR.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestGIT.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesWidget.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackZIPGenerator.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestHG.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmCTestP4.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPack7zGenerator.cxx.o
[ 98%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackDebGenerator.cxx.o
[ 99%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackRPMGenerator.cxx.o
[ 99%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/ccmake.cxx.o
[ 99%] Linking CXX static library libCTestLib.a
[100%] Linking CXX executable ../bin/ccmake
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Built target CTestLib
make[6]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
Scanning dependencies of target ctest
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
make[6]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Building CXX object Source/CMakeFiles/ctest.dir/ctest.cxx.o
[100%] Linking CXX static library libCPackLib.a
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Built target CPackLib
make[6]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
Scanning dependencies of target cpack
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
make[6]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Building CXX object Source/CMakeFiles/cpack.dir/CPack/cpack.cxx.o
[100%] Linking CXX executable ../bin/ctest
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Built target ccmake
[100%] Linking CXX executable ../bin/cpack
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Built target ctest
make[6]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
[100%] Built target cpack
make[5]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
make[4]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3‘
touch /home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/cmake-3.4.3/.built
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/cmake‘
make[2]: Leaving directory `/home/wwt/tina_v3.0.4‘
make[1]: *** [/home/wwt/tina_v3.0.4/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2
make[1]: Leaving directory `/home/wwt/tina_v3.0.4‘
Build failed - please re-run with -j1 to see the real error message
make: *** [world] 错误 1
#### make failed to build some targets (03:37 (mm:ss)) ####
[email protected]:/home/wwt/tina_v3.0.4$
[email protected]:/home/wwt/tina_v3.0.4$ make -j1
make[4]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8‘
Making all in src
make[5]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/src‘
x86_64-linux-gnu-g++ -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.8\" -DPACKAGE_STRING=\"patchelf\ 0.8\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.8\" -I. -I/home/wwt/tina_v3.0.4/out/host/include -I/home/wwt/tina_v3.0.4/out/host/usr/include -g -O2 -MT patchelf.o -MD -MP -MF .deps/patchelf.Tpo -c -o patchelf.o patchelf.cc
mv -f .deps/patchelf.Tpo .deps/patchelf.Po
x86_64-linux-gnu-g++ -g -O2 -L/home/wwt/tina_v3.0.4/out/host/lib -L/home/wwt/tina_v3.0.4/out/host/usr/lib -o patchelf patchelf.o
make[5]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/src‘
Making all in tests
make[5]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/tests‘
make[5]: Nothing to be done for `all‘.
make[5]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/tests‘
make[5]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8‘
make[5]: Nothing to be done for `all-am‘.
make[5]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8‘
make[4]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8‘
touch /home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/.built
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/patchelf‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/patchelf‘
install -d -m0755 /home/wwt/tina_v3.0.4/out/host/bin
install -m0755 /home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/src/patchelf /home/wwt/tina_v3.0.4/out/host/bin/patchelf
mkdir -p /home/wwt/tina_v3.0.4/out/host/stamp
touch /home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/patchelf-0.8/.built
touch /home/wwt/tina_v3.0.4/out/host/stamp/.patchelf_installed
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/patchelf‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/mtools‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/mtools‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/mtools‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/mtools‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/dosfstools‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/dosfstools‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/dosfstools‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/dosfstools‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/lzma‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/lzma‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/lzma‘
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/lzma‘
make[3]: Entering directory `/home/wwt/tina_v3.0.4/tools/squashfs4‘
make -C /home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/squashfs4.3/squashfs-tools CC="gcc" XZ_SUPPORT=1 LZMA_XZ_SUPPORT=1 XATTR_SUPPORT=1 SELINUX_SUPPORT=0 LZMA_LIB="/home/wwt/tina_v3.0.4/out/host/lib/liblzma.a" EXTRA_CFLAGS="-I/home/wwt/tina_v3.0.4/out/host/include -I/home/wwt/tina_v3.0.4/out/host/usr/include" LDFLAGS="-L/home/wwt/tina_v3.0.4/out/host/lib -L/home/wwt/tina_v3.0.4/out/host/usr/lib " mksquashfs unsquashfs
make[4]: Entering directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/squashfs4.3/squashfs-tools‘
gcc -I/home/wwt/tina_v3.0.4/out/host/include -I/home/wwt/tina_v3.0.4/out/host/usr/include -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"gzip\" -Wall -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT -c -o gzip_wrapper.o gzip_wrapper.c
gzip_wrapper.c:38:13: error: ‘Z_FIXED‘ undeclared here (not in a function)
{ "fixed", Z_FIXED, 0 },
^
make[4]: *** [gzip_wrapper.o] Error 1
make[4]: Leaving directory `/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/squashfs4.3/squashfs-tools‘
make[3]: *** [/home/wwt/tina_v3.0.4/out/astar-parrot/compile_dir/host/squashfs4.3/.built] Error 2
make[3]: Leaving directory `/home/wwt/tina_v3.0.4/tools/squashfs4‘
make[2]: *** [tools/squashfs4/compile] Error 2
make[2]: Leaving directory `/home/wwt/tina_v3.0.4‘
make[1]: *** [/home/wwt/tina_v3.0.4/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2
make[1]: Leaving directory `/home/wwt/tina_v3.0.4‘
make: *** [world] 错误 2
#### make failed to build some targets (07:00 (mm:ss)) ####
[email protected]:/home/wwt/tina_v3.0.4$
就算你找到这个文件:
[email protected]:/home/wwt/tinav3.0$ find . -name gzip_wrapper.c
./out/astar-parrot/compile_dir/host/squashfs4.3/squashfs-tools/gzip_wrapper.c
[email protected]:/home/wwt/tinav3.0$
static struct strategy strategy[] = {
{ "default", Z_DEFAULT_STRATEGY, 0 },
{ "filtered", Z_FILTERED, 0 },
{ "huffman_only", Z_HUFFMAN_ONLY, 0 },
{ "run_length_encoded", Z_RLE, 0 },
{ "fixed", Z_FIXED, 0 },
{ NULL, 0, 0 }
};
修改为:
static struct strategy strategy[] = {
{ "default", Z_DEFAULT_STRATEGY, 0 },
{ "filtered", Z_FILTERED, 0 },
{ "huffman_only", Z_HUFFMAN_ONLY, 0 },
{ "run_length_encoded", Z_RLE, 0 },
{ "fixed", 4, 0 },
{ NULL, 0, 0 }
};
(来不及分清楚具体是哪个定义了,直接修改Z_FIXED为4了!^_)
[email protected]:/home/wwt/pugongying_tinav3.0.6$ grep Z_FIXED . -R
./lichee/brandy/u-boot-2011.09/include/u-boot/zlib.h:#define Z_FIXED 4
./lichee/brandy/u-boot-2014.07/include/u-boot/zlib.h:#define Z_FIXED 4
./package/allwinner/liballwinner_tina/liballwinner/LIBRARY/EXTERNAL/include/zlib/zlib.h:#define Z_FIXED 4
./package/allwinner/tina_multimedia/libcedarx/external/include/zlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/Python-2.7.11/Modules/zlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/zlib-1.2.8/contrib/pascal/zlibpas.pas: Z_FIXED = 4;
./out/astar-parrot/compile_dir/target/zlib-1.2.8/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/zlib-1.2.8/ipkg-install/usr/include/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/host/Python-2.7.11/Modules/zlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/libcedarx/libcedarx/external/include/zlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/target/gdb-7.10.1/zlib/contrib/pascal/zlibpas.pas: Z_FIXED = 4;
./out/astar-parrot/compile_dir/target/gdb-7.10.1/zlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/host/u-boot-2014.10/include/u-boot/zlib.h:#define Z_FIXED 4
./out/astar-parrot/compile_dir/host/cmake-3.4.3/Utilities/cmzlib/zlib.h:#define Z_FIXED 4
./out/astar-parrot/staging_dir/target/usr/include/zlib.h:#define Z_FIXED 4
你编译的话,还是会继续出问题的,错误欠奉。
排查了很久,后来同事说是因为他安装了miniGUI的模拟器,其中的glibc库导致的问题。最后他自己还原了,具体方法未知。
原文地址:https://www.cnblogs.com/wb4916/p/10035411.html