My favorites | Sign in
Google
          
New issue | Search
for
| Advanced search | Search tips
Issue 2060: Android SDK build failures with GCC 4.4 / bash 4.0 / Fedora 11a
1 person starred this issue and may be notified of changes. Back to list
Status:  Declined
Owner:  ----
Closed:  Mar 2009
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by Max.Golovanov, Feb 21, 2009
In addition to the known problem reported against 'repo' not working with 
the new Python 2.6 (bug id# ),


I faced the following issues while building Android SDK on my Fedora 11a 
box:

(1) The script build/tools/findleaves.sh assumes that the argument #0 is 
the name of directory (.) where to start searching for makefiles from.
It works with bash 3.x while in bash 4.0 the argument #0 in construct 
${@:0:$nargs} returns the name of the script itself 
(build/tools/findleaves.sh), not the path (dot). So the index needs to be 
adjusted from ${@:0:$nargs} to ${@:1:$nargs} for this script to work 
properly with bash 4.0.


(2) GCC 4.4 appear to be more strict with respect to implicit includes. 
Some .cpp files in SDK are missing proper #include <cstdio>


(3) GCC 4.4 is more strict with respect to char * vs. const char *. Some 
type conversions cause the build to fail.


(4) The default OpenJDK coming with Fedora 11a does not compile the SDK, 
crashes on some files.
Had to install the latest Sun JDK 1.6.0 to compile the Android SDK.


Here is the patch diff that I applied to build it properly on my Fedora 
11a machine.

( Issue #1  is discussable, whether it's a bug with bash or with the 
script.. maybe it's possible to check for the bash version inside the 
script. Fixes #2-#3 should probably be commited to repository. Problem #4 
is a problem with OpenJDK, should probably open a bug against the OpenJDK 
1.6.0...)

Cheers,
Max
android_patch_f11.diff
6.3 KB Download
Comment 1 by jbq@google.com, Mar 02, 2009
Please submit patches as outlined at http://source.android.com/submit-patches - Thanks
Status: Declined
Cc: j...@google.com
Comment 2 by Max.Golovanov, Apr 09, 2009
sorry, had no time for submissions and code inspections, will keep it in my private 
changeset for now. maybe some full-timer can take a look at the delta attached. 
thanks.
Comment 3 by jbq@google.com, Sep 16, 2009
(No comment was entered for this change.)
Cc: -j...@google.com
Sign in to add a comment