android 4.3源码编译
16lz
2022-03-18
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ source build/envsetup.shincluding device/samsung/maguro/vendorsetup.shincluding device/samsung/tuna/vendorsetup.shincluding device/ti/panda/vendorsetup.shincluding sdk/bash_completion/adb.bashjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch full-eng full_maguro-userdebug full_panda-eng full_tuna-userdebug full_x86-eng vbox_x86-engjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch full-eng full_maguro-userdebug full_panda-eng full_tuna-userdebug full_x86-eng vbox_x86-engjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch full-eng ============================================PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=4.0.1TARGET_PRODUCT=fullTARGET_BUILD_VARIANT=engTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armTARGET_ARCH_VARIANT=armv7-aHOST_ARCH=x86HOST_OS=linuxHOST_BUILD_TYPE=releaseBUILD_ID=ITL41D============================================jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ make -- --environment-overrides -k --no-print-directory -S--always-make -f --keep-going -o --silent--assume-new --file -l --old-file --stop--assume-old -h --load-average -p -t-b --help -m --print-data-base --touch-B -i --makefile --print-directory -v-C -I --max-load -q --version-d --ignore-errors -n --question -w--debug --include-dir --new-file --quiet -W--directory -j --no-builtin-rules -r --warn-undefined-variables--dry-run --jobs --no-builtin-variables -R --what-if-e --just-print --no-keep-goind --recon
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ cd /usr/bin/jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -al gcc*lrwxrwxrwx 1 root root 7 8月 5 12:48 gcc -> gcc-4.6-rwxr-xr-x 1 root root 306200 4月 16 2012 gcc-4.6jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -l g++*lrwxrwxrwx 1 root root 7 3月 14 2012 g++ -> g++-4.6-rwxr-xr-x 1 root root 310296 4月 16 2012 g++-4.6jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install gcc-4.4[sudo] password for jianguoliao: Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following packages were automatically installed and are no longer required: linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-paeUse 'apt-get autoremove' to remove them.The following extra packages will be installed: cpp-4.4 gcc-4.4-baseSuggested packages: gcc-4.4-locales gcc-4.4-multilib libmudflap0-4.4-dev gcc-4.4-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7The following NEW packages will be installed: cpp-4.4 gcc-4.4 gcc-4.4-base0 upgraded, 3 newly installed, 0 to remove and 21 not upgraded.Need to get 6,697 kB of archives.After this operation, 13.8 MB of additional disk space will be used.Do you want to continue [Y/n]? YGet:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main gcc-4.4-base i386 4.4.7-1ubuntu2 [12.0 kB]Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main cpp-4.4 i386 4.4.7-1ubuntu2 [3,606 kB]Get:3 http://cn.archive.ubuntu.com/ubuntu/ precise/main gcc-4.4 i386 4.4.7-1ubuntu2 [3,079 kB] Fetched 6,697 kB in 24s (276 kB/s) Selecting previously unselected package gcc-4.4-base.(Reading database ... 180229 files and directories currently installed.)Unpacking gcc-4.4-base (from .../gcc-4.4-base_4.4.7-1ubuntu2_i386.deb) ...Selecting previously unselected package cpp-4.4.Unpacking cpp-4.4 (from .../cpp-4.4_4.4.7-1ubuntu2_i386.deb) ...Selecting previously unselected package gcc-4.4.Unpacking gcc-4.4 (from .../gcc-4.4_4.4.7-1ubuntu2_i386.deb) ...Processing triggers for man-db ...Setting up gcc-4.4-base (4.4.7-1ubuntu2) ...Setting up cpp-4.4 (4.4.7-1ubuntu2) ...Setting up gcc-4.4 (4.4.7-1ubuntu2) ...jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install g++-g++-4.4 g++-4.5-multilib g++-arm-linux-gnueabig++-4.4-arm-linux-gnueabi g++-4.6 g++-arm-linux-gnueabihfg++-4.4-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabi g++-mingw-w64g++-4.4-multilib g++-4.6-arm-linux-gnueabihf g++-mingw-w64-i686g++-4.5 g++-4.6-multilib g++-mingw-w64-x86-64g++-4.5-arm-linux-gnueabi g++-4.6-multilib-arm-linux-gnueabi g++-multilibg++-4.5-arm-linux-gnueabihf g++-4.6-multilib-arm-linux-gnueabihf jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install g++-4.4Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following packages were automatically installed and are no longer required: linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-paeUse 'apt-get autoremove' to remove them.The following extra packages will be installed: libstdc++6-4.4-devSuggested packages: g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg libstdc++6-4.4-docThe following NEW packages will be installed: g++-4.4 libstdc++6-4.4-dev0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.Need to get 6,274 kB of archives.After this operation, 19.5 MB of additional disk space will be used.Do you want to continue [Y/n]? YGet:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main libstdc++6-4.4-dev i386 4.4.7-1ubuntu2 [1,494 kB]Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main g++-4.4 i386 4.4.7-1ubuntu2 [4,780 kB]Fetched 6,274 kB in 23s (271 kB/s) Selecting previously unselected package libstdc++6-4.4-dev.(Reading database ... 180316 files and directories currently installed.)Unpacking libstdc++6-4.4-dev (from .../libstdc++6-4.4-dev_4.4.7-1ubuntu2_i386.deb) ...Selecting previously unselected package g++-4.4.Unpacking g++-4.4 (from .../g++-4.4_4.4.7-1ubuntu2_i386.deb) ...Processing triggers for man-db ...Setting up g++-4.4 (4.4.7-1ubuntu2) ...Setting up libstdc++6-4.4-dev (4.4.7-1ubuntu2) ...jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -l gcc*lrwxrwxrwx 1 root root 7 8月 5 12:48 gcc -> gcc-4.6-rwxr-xr-x 1 root root 224544 4月 16 2012 gcc-4.4-rwxr-xr-x 1 root root 306200 4月 16 2012 gcc-4.6jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo mv gcc gcc.bakjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo ln -s gcc-4.4 gccjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -l g++*lrwxrwxrwx 1 root root 7 3月 14 2012 g++ -> g++-4.6-rwxr-xr-x 1 root root 228640 4月 16 2012 g++-4.4-rwxr-xr-x 1 root root 310296 4月 16 2012 g++-4.6jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo mv g++ g++.bakjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo ln -s g++-4.4 g++
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ g++ --versiong++ (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7Copyright (C) 2010 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ gcc --versiongcc (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7Copyright (C) 2010 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
为什么要更改位低版本的g++和gcc因为android编译环境需要,不然会在编译过程中出现如下错误:
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]<built-in>:0:0: note: this is the location of the previous definitioncc1plus: all warnings being treated as errorsmake: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ make
Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.imgInstall system fs image: out/target/product/generic/system.imgTarget ram disk: out/target/product/generic/ramdisk.imgTarget userdata fs image: out/target/product/generic/userdata.imgjianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$
在次过程中还会遇到如下错误:
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-ar only run on 64-bit linuxmake: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a] Error 1
更多相关文章
- Android中一些错误
- 64位Fedora中搭建Android环境没有兼容的32位包引起的错误的解决
- Android如何监听输入框的出现和隐藏
- Android(安卓)源码编译
- 判断可用的intent和更改Drawable的透明度
- Android(安卓)关于build.gradle的一些配置问题
- Compilation failed to complete:Program type already present:
- make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_inter
- Eclipse 开发 Android, Hello FormStuff(学习9)