Android OS Forum banner
1 - 20 of 78 Posts

·
Premium Member
Joined
·
1,900 Posts
Originally written by user MikereDD, had to pull this from the old site.

Writing this to help anyone on Arch Linux setup their box to start building/compiling with Android.

First off a big thanks to xoomdev of T3hH4xx0r Team and all the dev's from t3hH4xx0r Team working on OMGB/OMFGB.

Why am I writing this
?
I have been enjoying the OMFGB rom so much and wanted to start compiling it from source but ran into trouble and all read-me's I found were based off setting up for other distro's.

What is Arch Linux?
Arch Linux a lightweight and flexible Linux� distribution that tries to Keep It Simple, that only provides the core tools needed to get a user started.
It aims at helping the user to learn as much as possible.

Why not just use Ubuntu/Kubuntu?
1. Linux is all preference, I prefer Arch Linux over all distro's second choice is Slackware
2. Never was a fan of Gnome/KDE, I prefer Tiling Window managers like WMii
3. I like the do it yourself take on linux and core distro's.

I will be using the Arch Linux package manager Pacman and the Pacman wrapper for the Arch User Repo called Yaourt
First we need to install the ABS - Arch Build System


Use pacman to install these packages like this:
As root or as sudo

Code:
 $ pacman -Sy abs base-devel
Now let's use pacman to install all the app's it can at this point.

Code:
$ pacman -S openjdk6 perl git gnupg flex bison gperf zip unzip sdl wxgtk squashfs-tools ncurses libpng zlib libusb libusb-compat readline
Now we need to downgrade make and perl and re-install git dropping the dependency for perl 5.14 and just dep. for perl.
I've already picked thru Arch Linux repo reading the commits until I found the needed files.

Make 3.8.1 - http://dl.dropbox.co.../make-3.8.1.tar
Perl 5.10.1 - http://dl.dropbox.co...perl-5.10.1.tar
Git 1.7.6 - http://dl.dropbox.co...d/git-1.7.6.tar

We will now download, untar, build and install each of the three apps here.
Create a directory to work in.

Code:
mkdir -p ~/archbuilds
We'll do Make first.

Code:
$ wget [URL]http://dl.dropbox.com/u/11676310/pkgbuild/make-3.8.1.tar[/URL] ; tar xvf [URL]http://dl.dropbox.com/u/11676310/pkgbuild/make-3.8.1.tar[/URL] ; cd<br />
<br />
[URL="http://dl.dropbox.com/u/11676310/pkgbuild/make-3.8.1.tar"]make-3.8.1/[/URL]
Build make

Code:
$ makepkg -cfs PKGBUILD
Install Make as root or sudo

Code:
# pacman -U make-3.81-5-x86_64.pkg.tar.xz
Check to see if make 3.81 is installed

Code:
$ make -v
Should return - GNU Make 3.81
cd out of Make dir

Now grab git
Code:
$ wget [URL]http://dl.dropbox.com/u/11676310/pkgbuild/git-1.7.6.tar[/URL] ; tar xvf [URL]http://dl.dropbox.com/u/11676310/pkgbuild/git-1.7.6.tar[/URL] ; cd git-1.7.6
Build Git
Code:
$ makepkg -cfs PKGBUILD
Install Git as root or sudo
Code:
# pacman -U git-1.7.6-1-x86_64.pkg.tar.xz
Code:
cd ..
Now grab Perl


Code:
$ wget [URL]http://dl.dropbox.com/u/11676310/pkgbuild/perl-5.10.1.tar[/URL] ; tar xvf [URL]http://dl.dropbox.com/u/11676310/pkgbuild/perl-5.10.1.tar[/URL] ; cd perl-5.10.1
Build Perl


Code:
$ makepkg -cfs PKGBUILD
Install Perl as root or sudo


Code:
# pacman -U perl-5.10.1-5-x86_64.pkg.tar.xz
Check to see if perl 5.10.1 installed


Code:
$ perl -v
Should return - This is perl 5, version 10, subversion 1 (v5.10.1) built for x86_64-linux-thread-multi
We are now ready to grab Yaourt and the app it requires
package-query-git
First grab package-query-git
Code:
$ cd ~/archbuilds
Code:
$ wget [URL=https://aur.archlinux.org/packages/package-query-git/package-query-git.tar.gz]https://aur.archlinux.org/packages/package-query-git/package-query-git.tar.gz[/URL] ; tar xvf package-query-git.tar.gz ; cd package-query-git
Build package-query-git

Code:
$ makepkg -csf PKGBUILD
Install package-query-git as root or sudo

Code:
# pacman -U package-query-git-20110805-1-x86_64.pkg.tar.xz
cd back

Code:
cd ..
Grab Yaourt[/U]
Code:
$ wget [URL=https://aur.archlinux.org/packages/yaourt-git/yaourt-git.tar.gz]https://aur.archlinux.org/packages/yaourt-git/yaourt-git.tar.gz[/URL] ; tar xvf yaourt-git.tar.gz ; cd yaourt-git
Build
Yaourt

Code:
$ makepkg -cfs PKGBUILD
Install Yaourt as root or sudo

Code:
# pacman -U yaourt-git-20110805-1-any.pkg.tar.xz
Now let's use yaourt to install some apps.

Code:
$ yaourt -Sy esdl pngcrush schedtool repo
If you have yet to install Android-SDK let's install it now.

Code:
$ yaourt -Sy android-sdk android-sdk-platform-tools udev-android-rules
We are almost done now... Time to Uncomment the Multi-Lib repo and install the last few apps with Pacman
Use your favorite text editor to remove # /etc/pacman.conf on Multi-Lib
As root or sudo.
Code:
# vim /etc/pacman.conf
From:

Code:
# Multi Lib repo's x86 for x86_64<br />
#[multilib]<br />
#Include = /etc/pacman.d/mirrorlist
To:

Code:
# Multi Lib repo's x86 for x86_64<br />
[multilib]<br />
Include = /etc/pacman.d/mirrorlist
Ok you're ready to install the last few app's some multilib's
As root or sudo

Code:
# pacman -Sy gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-libusb lib32-libusb-compat lib32-readline lib32-glibc lib32-zlib
Arch has python3 in main so you will either not install it or back it up.
No if you did not install python3 you do not need to make this change.
As root or sudo

Code:
# mv /usr/bin/python /usr/bin/python.bak
Now we create a symlink to python2
As root or sudo

Code:
ln -s /usr/bin/python2 /usr/bin/python
.... All Done!

You're now ready to follow either the Compile OMFGB Yourself Wiki
Or most Cyanogenmod7 compile from source wiki on your Arch Linux 64Bit System!

Have Fun.. If you think I missed something let me know!
...
All thanks go to xoomdev, I only took his advice and then went about it using the package manger(s) for Arch.
Hopefully it helps someone.

..
 

·
Premium Member
Joined
·
49 Posts
Thank you so much for this kang. I saw it originally posted here and it magically vanished. Awesome sauce!
 

·
Developer
Joined
·
43 Posts
THanks for sharing (again)
.

I'm having an issue with esdl:

Code:
==> Validating source files with md5sums...<br />
    esdl-1.0.1.src.tar.gz ... Passed<br />
==> Extracting Sources...<br />
  -> Extracting esdl-1.0.1.src.tar.gz with bsdtar<br />
==> Starting build()...<br />
make[1]: Entering directory `/tmp/yaourt-tmp-root/aur-esdl/src/esdl-1.0.1/c_src'<br />
gcc -c -g -O2 -funroll-loops -Wall -ffast-math -fpic -fomit-frame-pointer  -DSHM   -DPTHREADS -I/usr/include/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT    -I{error_logger,{{2011,11,12},{1,29,0}},"<HiPE (v 3.8.1)> Warning: not loading native code for module ~w: it was compiled for an incompatible runtime system; please regenerate native code for this runtime system\n",[hipe_unified_loader]}  =INFO REPORT==== 12-Nov-2011::01:29:00 === <HiPE (v 3.8.1)> Warning: not loading native code for module hipe_unified_loader: it was compiled for an incompatible runtime system; please regenerate native code for this runtime system /usr/lib/erlang/usr/include esdl_wrapper.c<br />
/bin/sh: -c: line 0: syntax error near unexpected token `('<br />
/bin/sh: -c: line 0: `gcc -c -g -O2 -funroll-loops -Wall -ffast-math -fpic -fomit-frame-pointer  -DSHM   -DPTHREADS -I/usr/include/ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT    -I{error_logger,{{2011,11,12},{1,29,0}},"<HiPE (v 3.8.1)> Warning: not loading native
 

·
Registered
Joined
·
1 Posts
Hi,

thanks a lot for that guide - great work!
I'm sorry that I dig that thread out, but does anyone know where I can find these specific versions of make, perl and git mentioned above (with the PKGBUILD files required by Arch Linux). I could try writing them myself but as I installed Arch Linux (more a Debian / Ubuntu person) today for the first time I'm not sure that would be very wise.

Thanks in advance!

EDIT: so, I think I found the right versions here: http://arm.konnichi.com/core/os/x86_64/
Can't (yet) install perl, because Arch says that it requires perl >= 5.14.0
 

·
? - ???
Joined
·
1,158 Posts
Hi,

thanks a lot for that guide - great work!
I'm sorry that I dig that thread out, but does anyone know where I can find these specific versions of make, perl and git mentioned above (with the PKGBUILD files required by Arch Linux). I could try writing them myself but as I installed Arch Linux (more a Debian / Ubuntu person) today for the first time I'm not sure that would be very wise.

Thanks in advance!

EDIT: so, I think I found the right versions here: http://arm.konnichi....core/os/x86_64/
Can't (yet) install perl, because Arch says that it requires perl >= 5.14.0
I will put them back on my dropbox, I removed them not knowing this post had been saved and re-posted. Thought it had been lost after the updates to the site.

Not sure if the downgrade is necessary, I was following someones directions and used the package managers to ease the pain of compiling it myself.
Was told thats the versions needed to create a functional environment.
Links to edited pre-built pkg's & tarballs
Make-3.81: pkg http://db.tt/dxh17eVH - tarball http://db.tt/M2WcgD9w
Perl-5.10: pkg http://db.tt/i1Yp78cx - tarball http://db.tt/6qOyzm9C
At first I couldn't find git-1.7.6 it's no longer available from site, so I put together a pkgbuild for git-1.7.6.5 not tested yet.
If someone uses it let me/us know if it works.
However I picked thru my backup's on my server and found a tarball I saved with git-1.7.6.tar.bz2 & git-manpages-1.7.6.tar.bz2

Git-1.7.6: pkg http://db.tt/5yQ2dTcT - tarball http://db.tt/hU5atCUl
Git-1.7.6.5: pkg http://db.tt/ZxzN9Q6X - tarball http://db.tt/etvBA7oe
.

Keep in mind I used Virtualbox - http://virtualbox.org and not my daily workstation.
ArchLinux Wiki installing Virtualbox - https://wiki.archlin....php/VirtualBox
Went that route so I didn't have to worry about downgrades/and installing anything that would take away or tie-up my workstation.
Also so I wouldn't worry about b0rk'n anything if I needed to start over or re-install.
I've a decent cpu&ram i7 960 @ 3.2G & 12G ram, so plenty to spare for the virtualbox build environment.
-
When I have more time I'll go back thru this and make any needed changes.
If anyone has questions, needs help or can offer better methods feel free to hit me up.
You can add me on gtalk mikeredd - at - g m a i l (dot) com
Make sure to mssg me from forum as I block all incoming mssg's from users not in my buddy list.
 

·
? - ???
Joined
·
1,158 Posts
Thanks I used this as sort of a guide and it has helped a lot!
awesome, It's really a bit of an over-kill. I was aiming to make it as easy as possible for anyone not familiar with Arch.
It's based off a walk-thru for ubuntu and xoomdev's help. He went thru the pain of compiling it all w/out the package managers and told me everything he used.
I only put it all together using package management systems.
Did my best to make stupid simple
 

·
Android Beginner
Joined
·
19 Posts
awesome, It's really a bit of an over-kill. I was aiming to make it as easy as possible for anyone not familiar with Arch.
It's based off a walk-thru for ubuntu and xoomdev's help. He went thru the pain of compiling it all w/out the package managers and told me everything he used.
I only put it all together using package management systems.
Did my best to make stupid simple
It worked though =DI did have to use this Perl http://arm.konnichi.....pkg.tar.xz5.10 5.10 was too outdated. I also had to do the ubuntu 11.10 fixes for non master branch for anyone who needs to know.
 

·
? - ???
Joined
·
1,158 Posts

·
Average Android
Joined
·
108 Posts
Thanks for this guide! All the other build guides are for Ubuntu, and some of the packages you need don't line up with Arch names.

I had this lovely Java version mismatch when doing my build, so I had to scrap openjdk and get the real deal from the AUR.

Nevertheless, thanks!

I'll have to try to avoid updating those older packages, so no simple pacman -Syu, but still, this got me on my feet.

Also, git didn't want to build because some of the sources it needed were 404'd.

I manually wget'd them from http://distfiles.macports.org/git-core/ to get it to build and then install.
 

·
? - ???
Joined
·
1,158 Posts
should be able to update with -Syu now. even if it breaks make and perl you can always rebuild and install from older pkgbuilds.
all I did at the time of writing was pick thru arch's repo's commits until I found the files.
Also you can use the PKGBUILD for git-core from arch just remove the dependancy lines from git that require a newer perl
in git PKGBUILD
depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.14.0' 'openssl' 'pcre')
change to
depends=('curl' 'expat>=2.0' 'perl-error' 'perl' 'openssl' 'pcre')
save file and makepkg -cfs then install
or
mkdir -p ~/build/git/
cd ~/build/git/
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/ChangeLog?h=packages/git" -O ChangeLog
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/git" -O PKGBUILD
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/git-daemon?h=packages/git" -O git-daemon
wget "https://projects.archlinux.org/svntogit/packages.git/plain/trunk/git-daemon.conf?h=packages/git" -O git-daemon.conf

sed -i 's|perl>=5.14.0|perl|' PKGBUILD

makepkg -cfs
sudo pacman -U finished-pkg.tar.xz

then you can add git, perl and make to /etc/pacman.conf
NoUpgrade = git make perl
 

·
Registered
Joined
·
2 Posts
I have noticed that Android refuses to compile now on Arch Linux. With a fully updated Arch Linux system and the most current ICS Android tree, the build fails pretty early (at like speech recognition compiling, OpenFST and grxmlcompile to be specific, not really relevant). I tried for two days, but could not figure out how to fix it at all. I did not want to downgrade gcc-multilib from 4.7. In the end it seemed like that this was the only way to go.

I downgraded from 4.7 to 4.6.3 and everything compiled. If anyone is having similar problems with the newest gcc, android tree, etc. I have the files needed to downgrade to 4.6.3

Specifically the package files you need are:
gcc-multilib 4.6.3-1
gcc-libs-multilib 4.6.3-1
lib32-gcc-libs 4.6.3-1
libtool-multilib 2.4.2-4

If anyone would need these files, let me know. You can also find them on the internet. Some Arch package mirrors hold old version files of packages, that is how i found these.

You can than install them all with one package install, pacman -U package1 package2 etc..
It will downgrade your gcc to 4.6.3, resolving all dependencies.
 

·
Android Beginner
Joined
·
19 Posts
I have noticed that Android refuses to compile now on Arch Linux. With a fully updated Arch Linux system and the most current ICS Android tree, the build fails pretty early (at like speech recognition compiling, OpenFST and grxmlcompile to be specific, not really relevant). I tried for two days, but could not figure out how to fix it at all. I did not want to downgrade gcc-multilib from 4.7. In the end it seemed like that this was the only way to go.

I downgraded from 4.7 to 4.6.3 and everything compiled. If anyone is having similar problems with the newest gcc, android tree, etc. I have the files needed to downgrade to 4.6.3

Specifically the package files you need are:
gcc-multilib 4.6.3-1
gcc-libs-multilib 4.6.3-1
lib32-gcc-libs 4.6.3-1
libtool-multilib 2.4.2-4

If anyone would need these files, let me know. You can also find them on the internet. Some Arch package mirrors hold old version files of packages, that is how i found these.

You can than install them all with one package install, pacman -U package1 package2 etc..
It will downgrade your gcc to 4.6.3, resolving all dependencies.
Thanks I couldn't figure out that last package I needed to get it to downgrade! Helped a bunch.

For anyone else having issues. You should be able to find these packages in your cache /var/cache/pacman/pkg

Here are mine:
http://dl.dropbox.com/u/12325680/DowngradeGCC/gcc-multilib-4.6.3-1-x86_64.pkg.tar.xz
http://dl.dropbox.com/u/12325680/DowngradeGCC/gcc-libs-multilib-4.6.3-1-x86_64.pkg.tar.xz
http://dl.dropbox.com/u/12325680/DowngradeGCC/lib32-gcc-libs-4.6.3-1-x86_64.pkg.tar.xz
http://dl.dropbox.com/u/12325680/DowngradeGCC/libtool-multilib-2.4.2-4-x86_64.pkg.tar.xz
 
1 - 20 of 78 Posts
Top