Required packages for Fedora

2,709 views
Skip to first unread message

Nate Jozwiak

unread,
Jul 11, 2011, 1:32:03 PM7/11/11
to Android Building
Hi all,

I was wondering if anyone had a list of the required packages to build
Android in a Fedora environment. The website http://source.android.com/source/initializing.html
lists the packages required to build from an Ubuntu 10.04 or later,
but a lot of these packages are unavailable in Fedora. Are there
equivalent packages to install?

Packages unavailable in Fedora:
- build-essential
- zlib1g-dev
- libc6-dev
- lib32ncurses5-dev
- ia32-libs
- x11proto-core-dev
- libx11-dev
- lib32readline5-dev
- lib32z-dev
- libgl1-mesa-dev
- g++-multilib
- mingw32
- tofrodos

Thanks,
Nate

Jean-Baptiste Queru

unread,
Jul 11, 2011, 2:09:46 PM7/11/11
to android-...@googlegroups.com
You can skip mingw32 and tofrodos if you're not trying to build the Windows SDK.

I think that pretty much everything else is mandatory.

JBQ

> --
> 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
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Stephen Smalley

unread,
Jul 11, 2011, 3:17:47 PM7/11/11
to android-...@googlegroups.com

After installing the usual development tools/libraries, I install the
following to build Android on Fedora 14 x86_64.
java-1.6.0-openjdk
java-1.6.0-openjdk-devel
glibc.i686
glibc-devel.i686
libstdc++.i686
zlib-devel.i686
ncurses-devel.i686
libX11-devel.i686
libXrender.i686
libXrandr.i686
gperf
readline-devel.i386
mesa-libGL-devel.i686
readline-devel.i686

Mostly differences in package naming. The .i686 suffix is to install
the 32-bit compatibility libraries; as far as I know, Fedora doesn't
have a single equivalent for ia32-libs in Debian/Ubuntu.

R V

unread,
Jul 11, 2011, 4:56:15 PM7/11/11
to android-...@googlegroups.com
My method is to start compiling. At some point the compilation will complain of some library of tool. Use yum to find which package provides that library or tool. For example, to look for libstd-c++.so,

yum provides */libstd-c++.so

Then just install the package that comes in the reply.

For many cases, you might already have the 64-bit versions installed but may need 32 bit versions.

Jean-Baptiste Queru

unread,
Jul 11, 2011, 5:42:41 PM7/11/11
to android-...@googlegroups.com
BTW, if someone wants to build a full list and confirm that it works
on a clean install of fedora, I'll happily include it in
source.android.com

JBQ

--

Doug Schaefer

unread,
Jul 11, 2011, 9:36:17 PM7/11/11
to android-...@googlegroups.com
That's the thing, we've all done it by trial and error. Hopefully one
of us will write down what we installed :).

Nate Jozwiak

unread,
Jul 11, 2011, 9:46:34 PM7/11/11
to android-...@googlegroups.com
I've been keeping track of everything that I've done so far. When I have it up and working I will load a fresh machine with F15 and verify it. 

Mali Laurent

unread,
Jul 12, 2011, 3:04:54 PM7/12/11
to android-...@googlegroups.com

Got it working perfectly on openSuSE 11.4 . I just did not write the full list down. Next time I will put it on a note and do a push to you or gerrit.

Sergey Nilga

unread,
Jul 18, 2011, 6:38:47 AM7/18/11
to android-...@googlegroups.com
Hi All,

Hopefully I wrote down all the steps installing Android build environment on my desktop running on Fedora 14. Here are my notes:

1. Install Linux Fedora 14 x86_64
2. Install all available updates (System->Administration->Software update, issue few times until there will be no more updates available)

3.Install Sun JDK:
 3.1 Follow the instruction  http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-6-on-fedora-centos-red-hat-rhel/
 3.2 IMPORTANT!!!: Also add javadoc and javah through  #alternative --install  command using javac at the link above as example

4. Install required tools:
    # yum install git valgrind gcc* flex bison gperf glibc-devel ncurses-devel.i686 xorg-x11-proto-devel libX11-devel.i686 \
        readline-devel.i386 zlib-devel.i686 mesa-libGL-devel.i686 glibc-devel.i686 python-markdown

5. Downgrade make-3.82 to make-3.81 (Fedora 14 uses make-3.82 which is too restrictive) :
    5.1 First you need to download the correct key (https://fedoraproject.org/static/E8E40FDE.txt) and import this by :
        # rpm --import E8E40FDE.txt

    5.2 Now you can downgrade make:
        # yum downgrade make --releasever=13

    5.3 And to avoid future upgrade, you need to add

        exclude=make*

        in /etc/yum.conf

6. Create bin folder in USER's home directory:
    $ mkdir ~/bin

7. Download the Repo script and ensure it is executable:
    $ curl http://android.git.kernel.org/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

8. Create an empty directory to hold your working files (for example Android):
    $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY

9.Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.

    $ repo init -u git://android.git.kernel.org/platform/manifest.git

10. To pull down files to your working directory from the repositories as specified in the default manifest, run

    $ repo sync

11. Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.

    $ source build/envsetup.sh

12. Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g.

    $ lunch full-eng

The example above refers to a complete build for the emulator, with all debugging enabled. If run with no arguments lunch will prompt you to choose a target from the menu.

13. Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.

    $ make -j8




Best regards,
Sergey.  
------------------------------------------
Reply all
Reply to author
Forward
0 new messages