blob: 33ceb165b9bd55783515eef65179d2ec21a1e178 [file] [log] [blame]
Robert Ly35f2fda2013-01-29 16:27:05 -08001page.title=Known Issues
2@jd:body
3
4<!--
5 Copyright 2010 The Android Open Source Project
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18-->
19<div id="qv-wrapper">
20 <div id="qv">
21 <h2>In this document</h2>
22 <ol id="auto-toc">
23 </ol>
24 </div>
25</div>
26
27<p>Even with our best care, small problems sometimes slip in. This page keeps
28track of the known issues around using the Android source code.</p>
29<h2 id="missing-cts-native-xml-generator">Missing CTS Native XML Generator</h2>
30<p><strong>Symptom</strong>: On some builds of IceCreamSandwich and later, the following
31warning is printed early during the build:
32<code>/bin/bash: line 0: cd: cts/tools/cts-native-xml-generator/src/res: No
33such file or directory</code></p>
34<p><strong>Cause</strong>: Some makefile references that path, which doesn't exist.</p>
35<p><strong>Fix</strong>: None. This is a harmless warning.</p>
36<h2 id="black-gingerbread-emulator">Black Gingerbread Emulator</h2>
37<p><strong>Symptom</strong>: The emulator built directly from the gingerbread branch
38doesn't start and stays stuck on a black screen.</p>
39<p><strong>Cause</strong>: The gingerbread branch uses version R7 of the emulator,
40which doesn't have all the features necessary to run recent versions
41of gingerbread.</p>
42<p><strong>Fix</strong>: Use version R12 of the emulator, and a newer kernel that matches
43those tools. No need to do a clean build.</p>
44<pre><code>$ repo forall platform/external/qemu -c git checkout aosp/tools_r12
45$ make
46$ emulator -kernel prebuilt/android-arm/kernel/kernel-qemu-armv7
47</code></pre>
48<h2 id="emulator-built-on-macos-107-lion-doesnt-work">Emulator built on MacOS 10.7 Lion doesn't work.</h2>
49<p><strong>Symptom</strong>: The emulator (any version) built on MacOS 10.7 Lion
50and/or on XCode 4.x doesn't start.</p>
51<p><strong>Cause</strong>: Some change in the development environment causes
52the emulator to be compiled in a way that prevents it from working.</p>
53<p><strong>Fix</strong>: Use an emulator binary from the SDK, which is built on
54MacOS 10.6 with XCode 3 and works on MacOS 10.7.</p>
55<h2 id="difficulties-syncing-the-source-code-proxy-issues">Difficulties syncing the source code (proxy issues).</h2>
56<p><strong>Symptom</strong>: <code>repo init</code> or <code>repo sync</code> fail with http errors,
57typically 403 or 500.</p>
58<p><strong>Cause</strong>: There are quite a few possible causes, most often
59related to http proxies, which have difficulties handling the
60large amounts of data getting transfered.</p>
61<p><strong>Fix</strong>: While there's no general solution, using python 2.7
62and explicitly using <code>repo sync -j1</code> have been reported to
63improve the situation for some users.</p>
64<h2 id="difficulties-syncing-the-source-tree-virtualbox-ethernet-issues">Difficulties syncing the source tree (VirtualBox Ethernet issues).</h2>
65<p><strong>Symptom</strong>: When running <code>repo sync</code> in some VirtualBox installations,
66the process hangs or fails with a variety of possible symptoms.
67One such symptom is
68<code>DownloadError: HTTP 500 (Internal Server Error: Server got itself in trouble)</code>.</p>
69<p><strong>Cause</strong>: The default network behavior of VirtualBox is to use
70NAT (Network Addrss Translation) to connect the guest system to
71the network. The heavy network activity of repo sync triggers some
72corner cases in the NAT code.</p>
73<p><strong>Fix</strong>: Configure VirtualBox to use bridged network instead of NAT.</p>
74<h2 id="difficulties-syncing-the-source-tree-dns-issues">Difficulties syncing the source tree (DNS issues).</h2>
75<p><strong>Symptom</strong>: When running <code>repo sync</code>, the process fails with
76various errors related to not recognizing the hostname. One such
77error is <code>&lt;urlopen error [Errno -2] Name or service not known&gt;</code>.</p>
78<p><strong>Cause</strong>: Some DNS systems have a hard time coping with the
79high number of queries involved in syncing the source tree
80(there can be several hundred requests in a worst-case scenario).</p>
81<p><strong>Fix</strong>: Manually resolve the relevant hostnames, and hard-code
82those results locally.</p>
83<p>You can resolve them with the <code>nslookup</code> command, which will give
84you one numerical IP address for each of those (typically in the
85"Address" part of the output).</p>
86<pre><code>$ nslookup googlesource.com
87$ nslookup android.googlesource.com
88</code></pre>
89<p>You can then hard-code them locally by editing <code>/etc/hosts</code>, and
90adding two lines in that file, of the form:</p>
91<pre><code>aaa.bbb.ccc.ddd googlesource.com
92eee.fff.ggg.hhh android.googlesource.com
93</code></pre>
94<p>Note that this will only work as long as the servers' addresses
95don't change, and if they do and you can't connect you'll have
96to resolve those hostnames again and edit <code>etc/hosts</code> accordingly.</p>
97<h2 id="difficulties-syncing-the-source-tree-tcp-issues">Difficulties syncing the source tree (TCP issues).</h2>
98<p><strong>Symptom</strong>: <code>repo sync</code> hangs while syncing, often when it's
99completed 99% of the sync.</p>
100<p><strong>Cause</strong>: Some settings in the TCP/IP stack cause difficulties
101in some network environments, such that <code>repo sync</code> neither completes
102nor fails.</p>
103<p><strong>Fix</strong>: On linux, <code>sysctl -w net.ipv4.tcp_window_scaling=0</code>. On
104MacOS, disable the rfc1323 extension in the network settings.</p>
105<h2 id="make-snod-and-emulator-builds"><code>make snod</code> and emulator builds.</h2>
106<p><strong>Symptom</strong>: When using <code>make snod</code> (make system no dependencies)
107on emulator builds, the resulting build doesn't work.</p>
108<p><strong>Cause</strong>: All emulator builds now run Dex optimization at build
109time by default, which requires to follow all dependencies to
110re-optimize the applications each time the framework changes.</p>
111<p><strong>Fix</strong>: Locally disable Dex optimizations with
112<code>export WITH_DEXPREOPT=false</code>, delete the existing optimized
113versions with <code>make installclean</code> and run a full build to
114re-generate non-optimized versions. After that, <code>make snod</code>
115will work.</p>
116<h2 id="permission-denied-during-builds">"Permission Denied" during builds.</h2>
117<p><strong>Symptom</strong>: All builds fail with "Permission Denied", possibly
118along with anti-virus warnings.</p>
119<p><strong>Cause</strong>: Some anti-virus programs mistakenly recognize some
120source files in the Android source tree as if they contained
121viruses.</p>
122<p><strong>Fix</strong>: After verifying that there are no actual viruses
123involved, disable anti-virus on the Android tree. This has
124the added benefit of reducing build times.</p>
125<h2 id="camera-and-gps-dont-work-on-galaxy-nexus">Camera and GPS don't work on Galaxy Nexus.</h2>
126<p><strong>Symptom</strong>: Camera and GPS don't work on Galaxy Nexus.
127As an example, the Camera application crashes as soon as it's
128launched.</p>
129<p><strong>Cause</strong>: Those hardware peripherals require proprietary
130libraries that aren't available in the Android Open Source
131Project.</p>
132<p><strong>Fix</strong>: None.</p>
133<h2 id="build-errors-related-to-using-the-wrong-compiler">Build errors related to using the wrong compiler.</h2>
134<p><strong>Symptom</strong>: The build fails with various symptoms. One
135such symptom is <code>cc1: error: unrecognized command line option "-m32"</code></p>
136<p><strong>Cause</strong>: The Android build system uses the default compiler
137in the PATH, assuming it's a suitable compiler to generate
138binaries that run on the host. Other situations (e.g. using
139the Android NDK or building the kernel) cause the default
140compiler to not be a host compiler.</p>
141<p><strong>Fix</strong>: Use a "clean" shell, in which no previous
142actions could have swapped the default compiler.</p>
143<h2 id="build-errors-caused-by-non-default-tool-settings">Build errors caused by non-default tool settings.</h2>
144<p><strong>Symptom</strong>: The build fails with various symptoms, possibly
145complinaing about missing files or files that have the
146wrong format. One such symptom is <code>member [...] in archive is not an object</code>.</p>
147<p><strong>Cause</strong>: The Android build system tends to use many host tools
148and to rely on their default behaviors. Some settings change
149those tools' behaviors and make them behave in ways that
150confuse the build system. Variables known to cause such
151issues are <code>CDPATH</code> and <code>GREP_OPTIONS</code>.</p>
152<p><strong>Fix</strong>: Build Android in an environment that has as few
153customizations as possible.</p>
154<h2 id="build-error-with-40x-and-earlier-on-macos-107">Build error with 4.0.x and earlier on MacOS 10.7.</h2>
155<p><strong>Symptom</strong>: Building IceCreamSandwich 4.0.x (and older
156versions) fails on MacOS 10.7 with errors similar to this:
157<code>Undefined symbols for architecture i386: "_SDL_Init"</code></p>
158<p><strong>Cause</strong>: 4.0.x is not compatible with MacOS 10.7.</p>
159<p><strong>Fix</strong>: Either downgrade to MacOS 10.6, or use the master
160branch, which can be built on MacOS 10.7.</p>
161<pre><code>$ repo init -b master
162$ repo sync
163</code></pre>
164<h2 id="build-error-on-macos-with-xcode-43">Build error on MacOS with XCode 4.3.</h2>
165<p><strong>Symptom</strong>: All builds fail when using XCode 4.3.</p>
166<p><strong>Cause</strong>: XCode 4.3 switched the default compiler from
167gcc to llvm, and llvm rejects code that used to be
168accepted by gcc.</p>
169<p><strong>Fix</strong>: Use XCode 4.2.</p>
170<h2 id="build-error-with-40x-and-earlier-on-ubuntu-1110">Build error with 4.0.x and earlier on Ubuntu 11.10.</h2>
171<p><strong>Symptom</strong>: Building IceCreamSandwich 4.0.x (and older
172versions) on Ubuntu 11.10 and newer fails with errors similar to this:
173<code>&lt;command-line&gt;:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]</code></p>
174<p><strong>Cause</strong>: Ubuntu 11.10 uses a version of gcc where that symbol
175is defined by default, and Android also defines that symbol,
176which causes a conflict.</p>
177<p><strong>Fix</strong>: Either downgrade to Ubuntu 10.04, or use the master
178branch, which can be compiled on Ubuntu 11.10 and newer.</p>
179<pre><code>$ repo init -b master
180$ repo sync
181</code></pre>