Building ICS w/Ubuntu 11.10 (some possible fixes)

5,686 views
Skip to first unread message

fattire

unread,
Nov 16, 2011, 12:38:35 AM11/16/11
to Android Building
Not saying any of this is right, just that it finished my build.
Using the cm9 repo (ics branch), ubuntu oneiric ocelot. Take it for
what it's worth, which may be nothin'.

--fattire


ERROR: :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

FIX:

in build/core/comboHOST_linux-x86.mk :
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

-------

ERROR: external/gtest/src/../include/gtest/internal/gtest-param-
util.h:122:11: error: ‘ptrdiff_t’ does not name a type

FIX:

in external/gtest/internal/gtest-param-util.h
#include <vector>
+#include <cstddef>
#include <gtest/internal/gtest-port.h>

-------

ERROR: external/oprofile/libpp/format_output.h:94:22: error:
reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]

FIX:

in external/libpp/format_output.h b/libpp/format_output.h
- mutable counts_t & counts;
+ counts_t & counts;

-------

ERROR: frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-
variable]

FIX:

in android/ics/frameworks/compile/slang/Android.mk
-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
-Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter

-------

ERROR: Numerous pthread errors w/llvm:
Example: external/llvm/lib/Support/Threading.cpp:96: undefined
reference to `pthread_create'

FIX: This is a really dumb fix. But it got me to the end of the
build. In external/llvm...

diff --git a/lib/Support/Mutex.cpp b/lib/Support/Mutex.cpp
index b408973..3a13adf 100644
--- a/lib/Support/Mutex.cpp
+++ b/lib/Support/Mutex.cpp
@@ -13,6 +13,8 @@

#include "llvm/Config/config.h"
#include "llvm/Support/Mutex.h"
+#undef ENABLE_THREADS
+#undef HAVE_PTHREAD_H

//
===----------------------------------------------------------------------
===//
//=== WARNING: Implementation here must contain only TRULY operating
system
diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp
index a117893..68fa5e7 100644
--- a/lib/Support/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -25,6 +25,8 @@ using namespace sys;

}

+#undef HAVE_DLFCN_H
+
// Include the platform-specific parts of this class.
#ifdef LLVM_ON_UNIX
#include "Unix/Signals.inc"
diff --git a/lib/Support/Threading.cpp b/lib/Support/Threading.cpp
index 2957956..f1339a3 100644
--- a/lib/Support/Threading.cpp
+++ b/lib/Support/Threading.cpp
@@ -16,6 +16,7 @@
#include "llvm/Support/Mutex.h"
#include "llvm/Config/config.h"
#include <cassert>
+#undef LLVM_MULTITHREADED

using namespace llvm;

Conley Owens

unread,
Nov 16, 2011, 11:54:30 AM11/16/11
to android-...@googlegroups.com
Please note that most (if not all) of these issues are fixed in master.

https://groups.google.com/group/android-building/browse_thread/thread/b8ec71faf951ad27?hl=en_US

~cco3

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

cybik

unread,
Nov 16, 2011, 2:24:36 PM11/16/11
to android-...@googlegroups.com
or you could just apt-get gcc-4.4 and gcc-4.4-multilib and do

make CC=gcc-4.4 CXX=g++-4.4
Message has been deleted

Leonardo Kim

unread,
Mar 4, 2012, 1:52:32 AM3/4/12
to android-...@googlegroups.com
In 4.0.3, we need to patch platform/external/mesa3d too.

~/project/nexus/4.0.3/external/mesa3d$ git diff HEAD~
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index f8b6962..4354cbf 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -67,6 +67,7 @@
 #include <cstdio>
 #include <cstdarg>
 #include <climits>
+#include <cstddef>
 
 #include <pixelflinger2/pixelflinger2_interface.h>
 
@@ -1762,4 +1763,4 @@ done:
    }
 
    //hieralloc_free(mem_ctx);
-}
\ No newline at end of file
+}

Regards,
Leonardo YongUk Kim
Reply all
Reply to author
Forward
0 new messages