[odroid-pc] ubuntu12.04 64bit Android4.0.3 source code compilation error and solution

Source: Internet
Author: User

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)

Installing libncurses5-dev:i386 can solve

sudo apt-get install libncurses5-dev:i386

The following error occurred while compiling 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

A second error:
Cc1plus:all warnings being treated as errors
Make: * * [OUT/HOST/LINUX-X86/OBJ/EXECUTABLES/OBBTOOL_INTERMEDIATES/MAIN.O] Error 1
Workaround: Enter and modify the/build/core/combo/host_linux-x86.mk file under the source directory via the Smba server:

The following statement
Host_global_cflags + =-d_fortify_source=0
Revision changed to
Host_global_cflags + =-u_fortify_source-d_fortify_source=0

A third error:
Make: * * * [Out/host/linux-x86/obj/executables/llvm-rs-cc_intermediates/slang_rs_export_foreach
Under the project root directory, open the following makefile file:
SOURCE Directory Frameworks/compile/slang/android.mk
In the open makefile file, follow these 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 simply to treat the warning as error, so here to modify

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 included 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 Line
mutable counts_t & counts;
Switch

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=CC1

Execute command: Export path=path/to/cc1: $PATH


Subsequent errors and workarounds: refer to Http://www.cnblogs.com/xingfuzzhd/archive/2012/09/05/2672000.html

After successful compilation:

[Email protected]:~# vim ~/.BASHRC


Add in the appropriate location in the file
#java Some environment variables for program development/Run
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};
#以上为songjiachen添加20140303


[Email protected]:~# Source ~/.BASHRC
[Email protected]:~# cd ~/out/target/product/generic
[Email protected]:~/out/target/product/generic# emulator-system system.img-data Userdata.img-ramdisk ramdisk.img

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

The emulator is now running successfully

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

[Email protected]:~/out/target/product/generic# emulator-system system.img-data Userdata.img-ramdisk ramdisk.img- Partition-size 1024

At this point the emulator has successfully run add-partition-size 1024 for =warning elimination

Direct input emulator can also be

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

[odroid-pc] ubuntu12.04 64bit Android4.0.3 source code compilation error and solution

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.