[HOWTO] ✏ Compiling Fairphone Open OS / Rooting

Same error happens for me on Gentoo. It also happened with the Docker image, but after a fresh sync, clean and rebuild it worked most of the time. Would be great if someone finds a solution for that.
Edit: I once thought this comes from the version >3.82 of GNU Make. But not sure about that.

I think it comes from these ugly binary blobs. libwpa.so is provided as binary with that and I guess its copied (together with export_includes) to output directory. If you do a “make clean” and not installing the binaries again, the build will fail here.
At least for me it was working after I installed binaries again. Maybe someone can check the “out” folder after a clean and installing the blobs. I’m on a fresh compilation at the moment :tired_face:

The Android guide states something about a clobber target, which seems to preserve the binaries. At least that’s how I understand it. But as I said, I don’t want to try it right now :wink:
If it works, we should use this instead of clean.

Maybe we should just add that step to the Makefile.

Compilation doesn’t work any longer here, too. However, I still had an older version of “.repo” on my root server, so I copied the 7GB to an Ubuntu-VM and it works fine again. It’s not the fault of >make-3.82. When you have the .repo, make sure to use “repo sync -l” so it doesn’t fetch the broken source as update.
If anyone is in need, here’s the 7GB-repo-tar file: http://kripton.kripserver.net/fp2/repo.tar

Since yesterday building on gentoo works for me now. There would be something totally wrong if compiling sources wouldn’t work on Gentoo :smile:
Only thing I needed to do was a

make update-api

as already stated in this thread. And of course I needed to switch back to Python 2.7. make-4.1 didn’t make a problem.

Would be easiest of course. I didn’t check if it’s possible, but I assume it’s intended to be applied in that way, because you need to agree with this license/legal agreements. This proprietary stuff is really a sad thing in the Android world :grimacing:

After a simple repo sync I was able to build from source again today.

I took courage from @Arvil’s successful build after another repo sync and started a new compilation (-j8) and got a new error message:
make: *** [out/target/product/FP2/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp] Error 127

Did they change code to amend for LED problem and got something wrong? Or has this got nothing to do with the real problem?

Edit: Same fail error for -j2 and -j1

Hi! I’d really like to compile as well. As I want to flash this to my FP2, I don’t want to use an unencrypted connection (http) to get the code, so I wanted to register a Gerrit account and use an SSH key as described in the build instructions. I thought that I could directly register for Gerrit … But from this site it seems that I need an account from one of the services mentioned there or have an own website to register at OpenID. (Btw I’m a complete newbie to Gerrit and git (as you now may have already noticed)) However, I neither have a Google, Yahoo or Launchpad account nor do I have a website on my own. Is there another possibility to get a Gerrit account? Or are there providers usable via OpenID other than Google, Yahoo and the others mentioned on the linked page? I hope somone can help me out.

This would be a nice solution as well. Do you suggest to replace “http” by “https” in the following command?

$ repo init --depth=1 \ -u http://code.fairphone.com/gerrit/fp2-dev/manifest \ -b fp2-sibon

I tried this and it gave me the following error:

fatal: unable to access 'https://code.fairphone.com/gerrit/fp2-dev/manifest/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Do I have to provide the certificate for authentication here?

Edit: See this post below for a solution.

Tested this and works for me. What OS do you have? I think, the package ca-certificates may be missing. (if you are on ubuntu or debian, try installing it with sudo apt-get install ca-certificates)

I’m running Ubuntu 14.04.3 and dpkg -l | grep ca-certificates shows this package to be already installed.

However, nice to know that it works that way for you! That gives me hope to be able to fix this. If someone has another idea, please share it. :wink: I’ll also try to do some more research on the error output and the package …

Just create an account with launchpad. That’s the Ubuntu software repository site which also includes bug tracking for ubuntu. It doesn’t hurt to have an account there. You can also use that account for other services like Stackoverflow.

I didn’t want to create a Google account (or a similar one) just for this secondary use case. But you’re right, I can get along with creating a Launchpad account - I see more possible future use cases for this (than for a Google or Yahoo account). Thanks for pointing this out!

1 Like

I also have Debian Jessie and building has failed for the third time now. (-j8, -j2, -j1)
(make failed to build some targets after 03:55:xy

(How) did you install zlib1g-dev:i386? Do i have to change a repository for the i386-version?

If anyone has a tested and working image, could they maybe upload it somewhere and post the link here?

Regards

1 Like

Hi Bergziege,
i installed the following packages (AOSP site + code.fairphone):

git-core gnupg flex bison gperf build-essential
zip curl zlib1g-dev gcc-multilib g+±multilib libc6-dev-i386
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache
libgl1-mesa-dev libxml2-utils xsltproc unzip install openjdk-7-jdk bison g+±multilib git gperf
libxml2-utils make python-networkx zlib1g-dev:i386 zip

You can install the i386 packages by:

dpkg --add-architecture i386
apt-get update

and then a normal apt-get zlib1g-dev:i386 for example…

BigCrash

For me, the compilation also failed once again yesterday with the same error as before

Concerning the sharing of tested and working images, @keesj was clear about the official answer to @Arvil’s question on licensing issues. For now, officially, we do not have the right to share builds including the blobs :frowning:

Little side note: So, even if you manage to get one by PM, stay calm about it in public :wink:

I added the architecture.

apt-get install zlib1g-dev:i386 didn’t work (missing dependencies)

I tried aptiude then, which suggested to solve those dependencies by removing gcc as a whole (and a lot of other stuff) which I did not want to do.

does the no-sharing-policy also apply to builds only from the sources on code.fairphone.com, i.e. without any changes like root etc.?

That must be what Fairphone calls “encourage the community to build alternative ROMS”

I just want to get rid of the Google Apps … (root would be nice, but isn’t vital to me)

Try installing “phablet-tools” - solved this issue for me on Ubuntu 14.04 LTS.

unfortunately that packages isn’t in Debian’s repository… and I don’t want to mess around with mixing with ubuntu…

Unfortunately yes, root is no problem - the blobs included in the images are…