[Odroid-pc] ubuntu12.04 64bit Android4.0.3 source code compilation error and solution, android4.4 source code download

Source: Internet
Author: User

[Odroid-pc] ubuntu12.04 64bit Android4.0.3 source code compilation error and solution, android4.4 source code download
First error:
Host Executable: cmu2nuance (out/host/linux-x86/obj/EXECUTABLES/cmu2nuance_intermediates/cmu2nuance)
/Usr/bin/ld: cannot find-lncurses
Collect2: ld returned 1 exit status
Make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
Make: *** Waiting for unfinished jobs ....
Host Executable: coverage (out/host/linux-x86/obj/EXECUTABLES/coverage_intermediates/coverage)

Installation libncurses5-dev: i386 can solve

Sudo apt-get install libncurses5-dev: i386

The following error occurs when compiling the kernel source code:

HOSTLD scripts/kconfig/mconf
Scripts/kconfig/mconf. o: In function 'show _ help ':
Mconf. c :(. text + 0x811): undefined reference to 'stdscr'
Scripts/kconfig/mconf. o: In function 'main ':
Mconf. c :(. text + 0x1286): undefined reference to 'initscr'
Mconf. c :(. text + 0x128d): undefined reference to 'stdscr'
Scripts/kconfig/lxdialog/checklist. o: In function 'print _ arrows ':
Checklist. c :(. text + 0x41): undefined reference to 'wmove'
Checklist. c :(. text + 0x61): undefined reference to 'acs _ map'

Installing libncurses5-dev can solve

Sudo apt-get install libncurses5-dev

Second error:
Cc1plus: all warnings being treated as errors
Make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main. o] Error 1
Solution: access and modify the/build/core/combo/HOST_linux-x86.mk file in the source code directory through the SMBA server:

Run the following statement:
HOST_GLOBAL_CFLAGS + =-D_FORTIFY_SOURCE = 0
Change
HOST_GLOBAL_CFLAGS + =-U_FORTIFY_SOURCE-D_FORTIFY_SOURCE = 0

Third error:
Make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach
Open the following makefile file in the project root directory:
Source code directory frameworks/compile/slang/Android. mk
In the open makefile file, follow the following changes:
# Local_cflags_for_slang: =-Wno-sign-promo-Wall-Wno-unused-parameter-Werror
Local_cflags_for_slang: =-Wno-sign-promo-Wall-Wno-unused-parameter

The reason is that the warning is treated as an error.

Fourth error:
Make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker. o] Error 1

Solutions: external/mesa3d/src/glsl/linker. cpp
+ # Include <stddef. h>
# Include <cstdlib>
# Include <cstdio>


Fifth error:
In file encoded ded from external/oprofile/libpp/arrange_profiles.cpp: 24: 0:
External/oprofile/libpp/format_output.h: 94: 22: Error: reference 'counts' cannot be declared 'mutable' [-fpermissive]
Make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1

Modify external/oprofile/libpp/format_output.h: 94 rows
Mutable counts_t & counts;
Changed:

Counts_t & counts;

Sixth error:

Target arm C: libc <= bionic/libc/bionic/pthread. c
Arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
Make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread. o] Error 1

Gcc-print-prog-name = PC3

Run the following command: export PATH = path/to/PC3: $ PATH


The following error and solution: refer to the http://www.cnblogs.com/xingfuzzhd/archive/2012/09/05/2672000.html

After compilation:

Root @ sjc-pc :~ # Vim ~ /. Bashrc


Add an appropriate location in the file
# Java program development/running environment variables
Export ANDROID_PRODUCT_OUT = ~ /Out/target/product/generic

ANDROID_PRODUCT_OUT_BIN = ~ /Out/host/linux-x86/bin

Export PATH =$ {PATH }:$ {ANDROID_PRODUCT_OUT_BIN }:: {ANDROID_PRODUCT_OUT };
# Add 20140303 for songjiachen


Root @ sjc-pc :~ # Source ~ /. Bashrc
Root @ sjc-pc :~ # Cd ~ /Out/target/product/generic
Root @ sjc-pc :~ /Out/target/product/generic # emulator-system. img-data userdata. img-ramdisk. img

Emulator: WARNING: system partition size adjusted to match image file (166 MB> 66 MB)

The simulator has been successfully run.

Cocould not configure '/dev/hpet' to have a 1024Hz timer. This is not a fatal
Error, but for better emulation accuracy type:
'Echo 1024>/proc/sys/dev/hpet/max-user-freq' as root.

Root @ sjc-pc :~ /Out/target/product/generic # emulator-system. img-data userdata. img-ramdisk. img-partition-size 1024

At this time, the simulator has been successfully run and added-partition-size 1024 to enable = warning elimination.

You can also enter emulator directly.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.