How to build pine and m-c (Please read)

Hello there!

We are currently in a transition from pre-C++11 to C++11. [1] This is required to keep b2g building in the long term. Unfortunately it brings some inconvenience until the fallout has been dealt with. Here’s how you build now and in the future.

Building pine until the next merge of m-c:

  1. Revert gonk-misc to git rev 6d240f935df2d84e38c8e7fa4aeac6b0c383b30f
  2. Revert frameworks/native to git rev 521c01a6d3883da50b091ee0906ead3324a3dfbb
  3. Build as usual

Building m-c and/or pine after the next merge of m-c:

  1. Don’t revert anything in gonk or frameworks/native
  2. Get the Android NDK 11b from [2], unpack, and set B2G_ANDROID_NDK_PATH to the unpacked path in the Unix shell
  3. Build as usual

Using the Android NDK for building Gecko is now (and in the future) required by the configure and build scripts. This way, we can build upon Fennec’s configure scripts and reduce our maintenance workload.

Sorry again for the inconvenience. Hopefully this is all cleaned up soon.

Best regards
Thomas

edit: Meanwhile, the merger from m-c into pine has happened. Please go with the second solution.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1276927
[2] https://developer.android.com/ndk/downloads/index.html

5 Likes

Hello,

So i give it a try (both solution even if i 'm not sure the 2nd one is doable yet)

Revert gonk-misc to git rev 6d240f935df2d84e38c8e7fa4aeac6b0c383b30f

And i got the following error, looked at the -m option be i’m a bit afraid to play with it :grin:

/B2G/gonk-misc$ git revert 6d240f935df2d84e38c8e7fa4aeac6b0c383b30f
error: Commit 6d240f935df2d84e38c8e7fa4aeac6b0c383b30f is a merge but no -m option was given.
fatal: revert failed

Revert frameworks/native to git rev 521c01a6d3883da50b091ee0906ead3324a3dfbb

here i got this error :

/B2G/frameworks/native$ git revert 521c01a6d3883da50b091ee0906ead3324a3dfbb
error: could not revert 521c01a… Initialize local variables to avoid data leak
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ’ or 'git rm '
hint: and commit the result with 'git commit’
Recorded preimage for ‘libs/gui/IGraphicBufferProducer.cpp’

Trying the second solution still getting a build failed:

here below details of the logs and B2G_ANDROID_NDK_PATH

http://termbin.com/q0v7

PS: tried the 2nd method before the 1st one as i feel it less disruptive.

Thanks for any input !

Matth

Oh, I guess i was sloppy with the description. With ‘revert’ I mean:

git checkout 6d240f935df2d84e38c8e7fa4aeac6b0c383b30f

and

git checkout 521c01a6d3883da50b091ee0906ead3324a3dfbb

That should ‘revert’ the code to this revision.

2 Likes

The second solution won’t work until m-c has been merged. No surprise you saw an error.

edit: Fixed typo.

I used the first solution and it works. I made ROM and run it on my Nexus 5.

1 Like

Just wondering, does the advice to revert frameworks/native to 521c01a6d3883da50b091ee0906ead3324a3dfbb only apply to devices running lollipop kernels by any chance? For example, I’m using nexus-4-kk, and I don’t see this commit anywhere in my frameworks/native git log (I can git show it, and it seems to be in a separate branch). So, for me switching to this commit would not really be a “revert”

Is it working fine ? That is a great news ! :slight_smile:

Yes, if you don’t have a Lollipop device (or maybe even a Sony device),
you might not need to reset frameworks/native. The L branch carries a
fix for including the correct C++11 headers. I don’t have a definite
list of devices though.

Some people reported problems with NDK release 12. Better use 11b instead.

Hi,

First, sorry for my poor English.

Currently, the interface is very lightweight and still missing a lot of functionality to make it suitable for everyday wear. For example, I haven’t received SMS (send by me from another phone).

Works :

  • Call
  • Receive a call
  • browse the web
  • Wireless
  • Data (tested 4G)
  • screenshots

Don’t works (or impossible to test it) :

  • bluetooth (discoverable but failed to pairing ?!)
  • camera (no app)

If you want to test it for nexus 5 (provided “as is” without warranty) : http://b2gos.resydev.fr/b2gos-master-2016-06-21-hammerhead-recovery~dr.zip
(If you want to use this ROM, it’s essential to wipe data !!!)

home page :

call

Receive a call

Browser :

Bookmark :

5 Likes

That’s just great !! :slight_smile:
Can you just open a topic an repost this, so the other people can find it easily, react, …
Thanks :wink:

Hopefully this is not needed anymore, I pushed a merge of current m-c on top of pine. You might need to apply https://bugzilla.mozilla.org/show_bug.cgi?id=1281499 though.

NDK is needed. As much as I can tell, r12 does not work but r11b works well.

As lapineige said, this is quite expected. B2GOS is in its early infancy, so there’s a lot to do. To distribute more safely legal-wise and more easily for people, you should do a blobfree build and then make it available in the B2G Installer :slight_smile:

1 Like

Live long and prosper!

2 Likes

These screen shots look fantastic. :smiley:

1 Like

Those of you, who do building or device maintenance, might want to subscribe to bug 1280600. [1] It’s a further cleanup of the configure and build scripts.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1280600

1 Like

Hi All,

Much probably getting the newbie issues… but build still failing see below don’t really understand the issue here.

http://termbin.com/z24h

EDIT: build.log is my log files i’m using to grab the error during the building.

Thanks for the help

From this log, I’d say you have to fix frameworks/native. Alex merged (already?) m-c into pine. If you have this merge, you maybe need to get the update to frameworks/native. What’s your target device?

Is it possible there is incompatiblities with the default ubuntu xenial compiler and kitkat? Because this is “host C++” that fails …

I’m building for “emulator-kk”