[HOWTO] ✏ Compiling Fairphone Open OS / Rooting

I cannot see any segfaults or errors in there after taking a quick glimpse (only that the make somehow fails). Are you sure you logged everything? I would try using another gcc version.

[quote=“fp1_wo_sw_updates, post:378, topic:11600”]
I cannot see any segfaults or errors in there after taking a quick glimpse (only that the make somehow fails). Are you sure you logged everything?[/quote]
I probably didn’t log stderr, but only stdout. :-/ I’ll give it another try.

I used the default gcc of Ubuntu 14.04. So I believe other have successfully compiled using exactly that version, thus I was doubting that the gcc version is the fault. I can nevertheless try to downgrade the version, I would like to avoid compiling gcc myself…

1 Like

Somehow I messed up output/error redirect and the log file is empty :frowning: But here the segfault copied from the bash output (I tried make -j1):

target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/css/parser/MediaQueryTokenizer.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp
target thumb C++: third_party_WebKit_Source_core_webcore_remaining_gyp <= external/chromium_org/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
In file included from external/chromium_org/third_party/WebKit/Source/core/rendering/style/StyleInheritedData.h:29:0,
                 from external/chromium_org/third_party/WebKit/Source/core/rendering/style/RenderStyle.h:50,
                 from external/chromium_org/third_party/WebKit/Source/core/rendering/style/CachedUAStyle.h:25,
                 from external/chromium_org/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h:35,
                 from external/chromium_org/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp:58:
external/chromium_org/third_party/WebKit/Source/platform/fonts/Font.h:163:103: internal compiler error: Segmentation fault
     FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const;
                                                                                                       ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [out/target/product/FP2/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_remaining_gyp_intermediates/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.o] Fehler 1

#### make failed to build some targets (03:39:23 (hh:mm:ss)) ####

I still used gcc 4.8.4, but can try with another version next weekend.

The last lines of dmesg within the vm don’t show anything interesting as far as I can tell:

[    3.255941] init: failsafe main process (578) killed by TERM signal
[    3.305337] sound hdaudioC0D0: autoconfig: line_outs=1 (0x3/0x0/0x0/0x0/0x0) type:line
[    3.305340] sound hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    3.305342] sound hdaudioC0D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    3.305343] sound hdaudioC0D0:    mono: mono_out=0x0
[    3.305344] sound hdaudioC0D0:    inputs:
[    3.305346] sound hdaudioC0D0:      Line=0x5
[    4.288898] init: plymouth-upstart-bridge main process ended, respawning
[    4.300936] init: plymouth-upstart-bridge main process ended, respawning
[   11.406803] input: spice vdagent tablet as /devices/virtual/input/input4
[  367.851814] systemd-hostnamed[2100]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!

And on the host something is jamming dmesg, I only see plenty of following lines:

[15687.562449] ACPI: \_SB_.PCI0.LPCB.EC0_.ECRD: 1 arguments were passed to a non-method ACPI object (RegionField) (20150619/nsarguments-230)
[15687.562468] ACPI: \_SB_.PCI0.LPCB.EC0_.ECRD: 1 arguments were passed to a non-method ACPI object (RegionField) (20150619/nsarguments-230)
[15689.567889] ACPI: \_SB_.PCI0.LPCB.EC0_.ECRD: 1 arguments were passed to a non-method ACPI object (RegionField) (20150619/nsarguments-230)
[15689.567912] ACPI: \_SB_.PCI0.LPCB.EC0_.ECRD: 1 arguments were passed to a non-method ACPI object (RegionField) (20150619/nsarguments-230)

As far as I followed sensors the temperature has always not been higher than 88°C, with 105°C being the limit for high and critical.

Your compiler is dying while trying to compile webkit I think, not sure if due to memory or code, but I would recommend trying gcc 4.8.5. A bit never … but not too new :wink:

vm: 6GB of mem, 8GB swap
host: 8GB mem, 8.5GB swap
(I hope that is enough)

I’ll try updating my gcc next weekend.

When I try to sync the repo, it only fetches 3 or 4 of the 515 projects… happens both on ssh and html connection.
Does anyone have any idea why that would be?

Nevermind, now it seems like it is downloading properly. I only had to wait much longer than I expected…


make completed successfully (03:14:09 (hh:mm:ss))

Hurray! For those of you who have problems, here is what I did:

  1. Took an old harddrive, wiped it and installed Ubuntu 14.04 LTS.
  2. Accepted automated updates that Ubuntu wanted to do
  3. Followed the official guide step by step.

Here is the output of gcc --version, in case it helps anyone:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4


I will not try flashing my phone until there is a way to install openGAPPS. I’m afraid I just cannot live without the Play Store. If anyone can help, please check out this thread:

As @teh_flame just wrote that he successfully compiled using gcc 4.8.4 I gave it another try. Unfortunately it failed again (building chromium it seems), see build log (only 1.4MB of text compared to 2.3MB of log last try).

After a hint in the IRC channel that memory might be a problem I first of all increased swap of the vm (now: 6.5GB memory + 12GB swap) and tried again. Unfortunately still failing (build log).

You can install openGAPPS, just try it :slightly_smiling:

Hi @sjjh,

that’s weird. I’m compiling with Ubuntu 14.04 Server (default gcc) in a KVM-VM which works perfectly, altough I dedicated 10GB of RAM to the VM.

Have you tried starting over? Installing a new VM with Ubuntu 14.04 Server, updating the machine, installing the packages, redownload (or copy) the repository. If that doesn’t help, maybe reduce the number of parallel tasks (make -j2 instead of make -j8).

Thanks @jnsp!

My physical machine only has 8GB of RAM, thus I’ll need to compensate with swap (I hope that doesn’t make any difference – except for speed)

I always tried with j-1 only anyway.

I can set-up another vm to try on a different system. But to be honest I would prefer to understand what went wrong and fix it, if I knew how to debug. :slight_smile: Nevertheless I’ll start over with a new vm to see how it goes.

Before switching to docker I used a VM with 4G ram and 4G swap, which seems to be the minimum
Now I’m using a docker container on my host with 8G ram

Over here it fails with 6.5GB ram and 12GB swap. So there must be a different reason…

Only things that still come to my mind: Broken memory or … wrong gcc/software setup. I know other people build with it with your version here, but I’m just trying to explain the error message I saw that you posted here. But as far as I know, you never tried another gcc :wink: Or tried to reinstall the old one.

Regarding “different reason” I was referring to the amount of memory/swap available. :slight_smile:

But I’m currently setting up a new vm (ubuntu server 14.04 lts), so let’s see if it works there finally. :slight_smile:

Okay, that would also be a new software setup. If all fails, try running memcheck on the system. ;(

The lastest pull (“sync”) from today still builds here, I have only seen a few old January changes from an external party that seems to fix FP issues upstream (Thunder Software Technology Co., Ltd). No problems. Not sure if there is an other -dev tree hidden somewhere. I use what is described in the HOWTO above.

Yeah, thought it couldn’t hurt to start from scratch… Hope the physical memory is okay – the machine is not too old. :-/[quote=“fp1_wo_sw_updates, post:393, topic:11600”]
The lastest pull (“sync”) from today still builds here,
[/quote]
Good to know. :slight_smile: Currently fetching it. I’ll see how it goes…

And it failed again (at building chromium), see buildlog. :frowning: Repeating specs: vm, ubuntu 14.04 lts server, gcc 4.8.4, 6GB memory, 6GB swap.
@fp1_wo_sw_updates, I’ll run memcheck but as I never had any freezes or the like yet I believe that it’s not a hardware problem with memory on the host.

I couldn’t find it, as the thread is quite long already, what kind of virtualization do you use?

I might never have named it… :-/ I’m using kvm (via virt-manager/libvirt).