Android compilation errors and Solutions

Source: Internet
Author: User

1. Set the compilation option to make-J5 target_arch = x86 target_product = generic target_simulator = false target_build_type = release target_ OS = Linux local_prelink_module = false.

2. Set line 91 in build/CORE/envsetup. mk to x86 (this step can be omitted)

3. Modify Android. mk In the build/tools/dexpreopt directory as a Android-arm.mk and do not compile the module (this module since with emulator ).

Make: *** no rule to make target 'out/target/product/generic/obj/lib/libruntime. so ', needed by 'out/target/product/generic/obj/executables/auth-agent_intermediates/linked/auth-agent '. stop.
Cause: the libbench. So module is not compiled. The MK file in external/examples only applies to target_arch = arm.

4. Modify Android. mk, target_arch = x86 in the external/targets/templates directory to compile the module.

System/CORE/libcutils/memset32.s: receiver messages:
System/CORE/libcutils/memset32.s: 38: Error: Unknown pseudo-op: '. fnstart'
.
.
.
System/CORE/libcutils/memset32.s: 93: Error: Unknown pseudo-op: '. fnend'
Make: *** [out/target/product/generic/obj/static_libraries/libcutils_intermediates/memset32.o] Error 1
Cause: the system/CORE/libcutils module depends on ARM-related code when target_simulator = false. The dependent code is as follows:
Local_src_files: = $ (commonsources) memset32.s atomic-android-arm.S MQ. c \
Ashmem-dev.c
Local_c_includes: = $ (kernel_headers)

5. Modify 78 rows of Android. mk in the system/CORE/libcutils directory (ifneq ($ (target_simulator), true). Currently, target_simulator = true is used for compilation.

Target thumb C: libwpa_client <= external/wpa_supplicant/wpa_ctrl.c
Target thumb C: libwpa_client <= external/wpa_supplicant/OS _unix.c
C0: Error: Unrecognized command line option "-mabi = aapcs-Linux"
C0: Error: Unrecognized command line option "-mabi = aapcs-Linux"
Target thumb C: libnetutils <= system/CORE/libnetutils/dhcpclient. c
Make: *** [out/target/product/generic/obj/shared_libraries/libwpa_client_intermediates/wpa_ctrl.o] Error 1
Make: *** waiting for unfinished jobs ....
Make: *** [out/target/product/generic/obj/shared_libraries/libwpa_client_intermediates/OS _unix.o] Error 1
Cause: Unknown command line options-mabi = aapcs-Linux

6. Modify the Android. mk 20 lines in the external/wpa_supplicant/directory and remove the-mabi = aapcs-Linux option.

External/users/connectors/dbus-sysdeps-util-unix.c: 48: 27: Error: SYS/syslimits. h: no such file or directory
Make: *** [out/target/product/generic/obj/shared_libraries/libdbus_intermediates/dbus-sysdeps-util-unix.o] Error 1
Cause: the macro have_sys_syslimits_h is defined, but the header file SYS/syslimits. h cannot be found.

7. Modify row 197 in external/users/config. H, # UNDEF have_sys_syslimits_h.

System/CORE/debugadh/crashglue. S: 5: Error: no such instruction: 'ldr r0, = 0xa5a50000'
System/CORE/debugadh/crashglue. S: 6: Error: no such instruction: 'ldr R1, = 0xa5a50001'
.
.
.
System/CORE/debugadh/crashglue. S: 28: Error: no such instruction: 'B .'
Target arm C: libc <= bionic/libc/bionic/malloc_leak.c
Make: *** [out/target/product/generic/obj/executables/crasher_intermediates/crashglue. O] Error 1
Cause: the system/CORE/debugadh module depends on arm.

8. Modify Android. mk. In the system/CORE/debugadh module to rename it as a Android-arm.mk and do not compile the module for the moment.

9. Modify gensyscils. py in the bionic/libc/tools directory to generate files related to the X86 architecture.
Modify the Android. mk file in the bionic/libc directory to x86.

Make: * ** no rules are available to create the target "Bionic/libc/arch-x86/" required by "out/target/product/generic/obj/shared_libraries/libc_intermediates/arch-x86/bionic/exidx_dynamic.o/ bionic/exidx_dynamic.c ". Stop.
Cause: There is no exidx_dynamic.c file under the bionic/libc/arch-x86/bionic directory.

10. Modify the Android. mk file in the bionic/libc/directory and remove "arch-x86/bionic/exidx_dynamic.c \".

/Usr/include/GNU/stubs-32.h: 7: 3: Error: # error applications may not define the macro _ libc
In file encoded ded from/usr/include/stdio. h: 75,
From bionic/libc/bionic/malloc_leak.c: 30:
/Usr/include/libio. h: 354: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' attribute _ den'
/Usr/include/libio. h: 355: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' attribute _ den'
/Usr/include/libio. h: 356: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before' attribute _ den'
Make: *** [out/target/product/generic/obj/shared_libraries/libc_intermediates/bionic/malloc_leak.o] Error 1
Cause: libc_common_cflags: =-d_libc = 1 is set in Bionic/libc/Android. mk, which is in conflict with/usr/include/GNU/stubs-32.h.

11. Modify bionic/libc/Android. mk and remove-d_libc = 1 from libc_common_cflags.

In file encoded ded from bionic/libc/bionic/libc_init_dynamic.c: 54:
Bionic/libc/bionic/pthread_internal.h: 45: Error: Expected specifier-qualifier-list before '_ pthread_cleanup_t'
In file encoded ded from bionic/libc/bionic/libc_init_dynamic.c: 56:
Bionic/libc/bionic/libc_init_common.h: 41: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before 'void'
Bionic/libc/bionic/libc_init_dynamic.c: 60: Error: Expected '=', ';', 'asm 'or' _ attribute _ 'before 'void'
Make: *** [out/target/product/generic/obj/shared_libraries/libc_intermediates/bionic/libc_init_dynamic.o] Error 1
Cause: No investigation is conducted.

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.