# [How To] Setting up an AOSP Build Environment in Fedora 16



## HeyItsLou (Aug 4, 2011)

*﻿*
*



If you're anything like me eventually Ubuntu will piss you off and you'll be searching for another distribution which for me is Fedora. I can honestly say I usually use Ubuntu because it can be set up very quickly and easily. Most of the tutorials you'll find on building AOSP are done within the context of Ubuntu. It's my personal opinion that there's more efficient Linux distributions out there than Ubuntu. Anyway, enough of that I digress.

Fedora has a nice wiki page that will get you 90% of the way to building AOSP but is missing some key elements especially if you're running Fedora 16.

Click to expand...

**First make sure your system is completely up to date:*​

```
sudo yum update
```

*Install the required packages*:​

```
sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686
```

*And...*​

```
sudo yum install gcc gcc-c++ gperf flex bison glibc-devel.{x86_64,i686} zlib-devel.{x86_64,i686} ncurses-devel.i686 libsx-devel readline-devel.i386
```

*Here's where things get interesting the version of Perl that ships with Fedora 16 is missing a key package that will cause your build to fail to avoid that install the following:*​

```
sudo yum install perl-Switch
```

*The other snag is with "make" the version installed will be 3.82 to build AOSP we need version 3.81 so we'll need to downgrade this package to do so go to this web address: ﻿https://fedoraproject.org/static/E8E40FDE.txt In your web browser select "File - Save Page As" leave it as the default .txt file. Next we must import this we can do so by:*​
﻿

```
sudo rpm --import E8E40FDE.txt
```

*Now we need to perform the actual downgrade:*​

```
sudo ﻿yum downgrade make --releasever=13
```

*To avoid a future upgrade add the following to /etc/yum.conf*​
﻿

```
exclude=make*
```

*Next we'll need to install the java jdk version 1.6 you can download an rpm.bin installer from http://www.oracle.co...oads/index.html make sure you download the 1.6 JDK select the "linux-x64-rpm-bin" when the download is complete:*​

```
chmod +x jdk-6u30-linux-x64-rpm.bin
```

*Next we move to installation:*​

```
sudo ./jdk-6u30-linux-x64-rpm.bin
```

*Follow the prompts the installer will build and install rpm packages.*

*Your Fedora 16 build environment is now prepared. From this point forward you can follow the instructions here:*​
http://source.androi...urce/index.html​


----------



## mandaman2k (Jul 28, 2011)

Hi,

thanks for your post, it has been of great help

i followed all the steps succesfully but im getting this error,


```
<br />
repo init -u [URL=https://android.googlesource]https://android.googlesource[/URL].com/platform/manifest<br />
Traceback (most recent call last):<br />
  File "/home/mandaman2k/bin/repo", line 690, in <module><br />
	main(sys.argv[1:])<br />
  File "/home/mandaman2k/bin/repo", line 657, in main<br />
	_Init(args)<br />
  File "/home/mandaman2k/bin/repo", line 189, in _Init<br />
	_CheckGitVersion()<br />
  File "/home/mandaman2k/bin/repo", line 214, in _CheckGitVersion<br />
	proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)<br />
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__<br />
	errread, errwrite)<br />
  File "/usr/lib64/python2.7/subprocess.py", line 1228, in _execute_child<br />
	raise child_exception<br />
OSError: [Errno 2] No such file or directory<br />
```
do you know what could be?

-------------------------------------------

Found the solution, the problem was i did not have git installed.


```
<br />
sudo yum install git<br />
```


----------



## the1dynasty (Feb 28, 2012)

thanks for this... gonna look into this setup when i have more time!!


----------



## RoLa (Jun 12, 2011)

After installing a linux distro, the first thing I install is Chrome. Here is how I did it using fedora 16.

Installing Chrome on fedora 16

Create a document copy & paste this and save it in ~/Downloads

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
b0V0SqiTCkWADZyLT5wll8sWuQ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SujEGQhWq8ZRoJAT
G0KSObnmZ7FwFWu1e9XFoUCt0bSjiJWTIyaObMrWu/LvJ3e9I87HseSJStfw6fki
5og9qFEkMrIrBCp3QGuQWBq/rTdMuwNFiEkEGBECAAkFAkXwb0sCGwwACgkQoECD
D3+sWZF/WACfeNAu1/1hwZtUo1bR+MWiCjpvHtwAnA1R3IHqFLQ2X3xJ40XPuAyY
/FJG
=Quqp
-----END PGP PUBLIC KEY BLOCK-----

rename the document "linux_signing_key.pub" without quotations and
save the file.


```
$ cd ~/Downloads<br />
$ sudo rpm --import linux_signing_key.pub
```
After installing the key run the below commands to add it to the repository.

32 bit


```
$ sudo sh -c 'echo "[google]<br />
name=Google Chrome 32-bit<br />
baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386" >> /etc/yum.repos.d/google.repo'
```
64 bit


```
$ sudo sh -c 'echo "[google]<br />
name=Google Chrome 64-bit<br />
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64" >> /etc/yum.repos.d/google.repo'
```
Great! Now install the browser

Stable version


```
$ sudo yum install google-chrome-stable
```
Beta version


```
$ sudo yum install google-chrome-beta
```
Unstable version


```
$ sudo yum install google-chrome-unstable
```
This is what worked for me and I hope it worked for you. 

Source: http://www.howopenso...edora-16-15-14/


----------

