Build Android 4.0 ICS under Ubuntu 11.10

Document created by AlanZhang Employee on Jan 28, 2013Last modified by Jodi Paul on Mar 12, 2013
Version 3Show Document
  • View in full screen mode

After upgrading Ubuntu 11.04 to 11.10, I encountered several building failures such as the following:

 

error:"_FORTIFY_SOURCE" redefined [-Werror]

 

To fix this building issue:

 

1. Following guides in Initializing a Build Environment | Android Open Source, to get build env ready for Ubuntu 11.10;

 

2. Edit build/core/combo/HOST_linux-x86.mk and replace:

    "HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0"

    with

    "HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"

 

Based on further Internet research, I found a Google Groups that summarizes all modifications to fix the building failure encountering in Ubuntu 11.10.

Attachments

    Outcomes