Build Android 4.0.3 full-eng on Fedora 16 x64

865 views
Skip to first unread message

Kpu Hepea

unread,
Dec 19, 2011, 2:39:05 PM12/19/11
to Android Building
Hello guys,

For all those who want to build [B]Andorid 4.0.3[/B] [I]full-eng[/I]
on [B]Fedora 16 x64[/B], at this moment (19-12-2011) here is how it's
done :

A. First, please follow the instructions fond [URL="http://
rootzwiki.com/topic/8037-compile-android-on-fedora-1516-by-
xoomdev/"]here[/URL] to setup your Fedora installation (please make
sure you downgraded [B]make[/B], as instructed there).

B. Now download the Android source code from Google, as intructed
[URL="http://source.android.com/source/downloading.html"]here[/URL]
WITH ONE EXCEPTION :
instead of : [CODE]repo init -u https://android.googlesource.com/platform/manifest
-b android-4.0.1_r1[/CODE]
use : [CODE]repo init -u https://android.googlesource.com/platform/manifest
-b master[/CODE]

If you allready download Andorid 4.0.1, but did not make any
changes, you can issue the following commands in the download folder:
[CODE]repo forall -c "git checkout master"
repo sync[/CODE]

C. After repo is done, you need to make some modifications :
1. in ./build/core/combo/HOST_linux-x86.mk
replace : HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
with : HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

2. in ./development/tools/emulator/opengl/host/renderer/Android.mk
add : LOCAL_LDLIBS += -lX11

3. in ./external/gtest/include/gtest/internal/gtest-param-util.h b/
include/gtest/internal/gtest-param-util.h
after : [CODE]#include <vector>[/CODE]
add : [CODE]#include <stddef.h>
#include <cstddef>[/CODE]

4. in ./external/gtest/src/Android.mk
replace (this is done in 2 places with the same line) :
[CODE]LOCAL_CFLAGS += -O0[/CODE]
with : [CODE]LOCAL_CFLAGS += -O0 -Wno-missing-field-initializers[/
CODE]

5. in ./external/llvm/llvm-host-build.mk
add : [CODE]LOCAL_LDLIBS := -lpthread -ldl[/CODE]

6. in ./external/mesa3d/src/glsl/linker.cpp
after : [CODE]#include <climits>[/CODE]
add : [CODE]#include <stddef.h>[/CODE]

7. in ./external/oprofile/libpp/format_output.h
replace : [CODE]mutable counts_t & counts;[/CODE]
with : [CODE]counts_t & counts;[/CODE]

8. in ./frameworks/compile/slang/slang_rs_export_foreach.cpp
replace (line 249 - be careful, there are 2 line the same, the other
one is required) : [CODE]llvm::StringRef ParamName = PVD->getName();[/
CODE]
with :[CODE] // llvm::StringRef ParamName = PVD->getName();[/CODE]

D. Now, the following commands should work without errors:
[CODE]. ./build/envsetup.sh
lunch 1
make clean
make update-api
make -j2[/CODE]

Good luck (I needed 1.5 days to make this work. Hope there are no more
problems).
I'm not that good in C so maybe my workarounds are not so great ...
but they work. If someone else knows some improvements or spots some
problems please correct me.

feng shi

unread,
Dec 21, 2011, 9:30:57 AM12/21/11
to Android Building
Good job

On 12月20日, 上午3时39分, Kpu Hepea <theraven...@gmail.com> wrote:
> Hello guys,
>
> For all those who want to build [B]Andorid 4.0.3[/B] [I]full-eng[/I]
> on [B]Fedora 16 x64[/B], at this moment (19-12-2011) here is how it's
> done :
>
> A. First, please follow the instructions fond [URL="http://
> rootzwiki.com/topic/8037-compile-android-on-fedora-1516-by-
> xoomdev/"]here[/URL] to setup your Fedora installation (please make
> sure you downgraded [B]make[/B], as instructed there).
>
> B. Now download the Android source code from Google, as intructed
> [URL="http://source.android.com/source/downloading.html"]here[/URL]
>     WITH ONE EXCEPTION :
>     instead of : [CODE]repo init -uhttps://android.googlesource.com/platform/manifest
> -b android-4.0.1_r1[/CODE]
>     use : [CODE]repo init -uhttps://android.googlesource.com/platform/manifest
Reply all
Reply to author
Forward
0 new messages