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"
"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.