Rogerio Nunes

Building Android in Ubuntu 11.10 64bit

Discussion created by Rogerio Nunes Employee on Mar 29, 2012
Latest reply on Mar 30, 2012 by Rogerio Nunes

Hi,

 

For those trying to build Android in a version of Ubuntu later than 10.04 LTS, I successfully built Android BSP R10.3.2 for iMX53smd board in Ubuntu 11.10 64bit after applying the following two additional patches:


<aosp>/frameworks/base:

diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 0bd1af4..d28b751 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -480,7 +480,7 @@ void RefBase::weakref_type::printRefs() const
 
 void RefBase::weakref_type::trackMe(bool enable, bool retain)
 {
-    static_cast<const weakref_impl*>(this)->trackMe(enable, retain);
+    static_cast<weakref_impl*>(this)->trackMe(enable, retain);
 }


<aosp>/build:

diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index c871613..1a5e17f 100644
--- a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -58,6 +58,6 @@ HOST_GLOBAL_CFLAGS += \
        -include $(call select-android-config-h,linux-x86)
 
 # Disable new longjmp in glibc 2.11 and later. See bug 2967937.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0


I built userdebug image.

 

Regards.

Outcomes