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

(M Ducorps) #61

Could you move the exports and echo to the .userconfig and give it a try on my side it work with this:




export B2G_ANDROID_NDK_PATH=/home/vagrant/android-ndk-r11b
export B2G_DIR=${B2G_DIR:-$(cd $(dirname $0); pwd)}
echo "B2G_DIR = ${B2G_DIR}"
export GECKO_PATH=${B2G_DIR}/pine

PS: i’m building for emulator-kk

(M Ducorps) #62

ok will have a look and keep you in touch.




as you can see it first loads the B2G_DIR then the GECKO_PATH and then even the .userconfig.
So i don’t see the need to put the export setings to the .userconfig

it still fails.

what i don’t have as you is this part:
But i think thats only related to the device config…

Are these manifest paths and variables correctly configured?

(Lissyx) #64

gaia project with mozillaorg remote, means outdated gaia. Please use gaia branch kanikani from github.


ah. there we finaly find the failure… thank you.
im trying to find out how to change to git but im unshure how it has to look. here:
its described but seams to be as i have it configured…
can you provide me your file to compaire?
or maybe matth can?
Regards, novski

(Lissyx) #66

cd gaia && git fetch b2g && git checkout b2g/kanikani && cd …


~/B2G/gaia$ git fetch b2g
fatal: ‘b2g’ does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

same with sudo…

(Lissyx) #68

change mozillaorg to b2g in the remote section, then ./repo sync gaia


i did that like this:

and then i did
$ cd gaia
$ git reset --hard b2g/kanikani
$ cd …

and then i built:

but it failed at this point:

In file included from …/…/…/…/pine/dom/camera/GonkCameraControl.h:32:0,
from …/…/…/…/pine/dom/camera/GonkCameraHwMgr.h:20,
from …/…/…/…/pine/dom/camera/GonkCameraSource.h:28,
from …/…/…/…/pine/dom/media/webrtc/MediaEngineGonkVideoSource.h:19,
from …/…/…/…/pine/dom/media/webrtc/MediaEngineWebRTC.cpp:37:
…/…/…/…/pine/dom/camera/GonkRecorder.h:38:19: warning: type attributes ignored after type is already defined [-Wattributes]
struct MOZ_EXPORT MediaSource;
In file included from …/…/…/…/pine/dom/media/webrtc/MediaEngineWebRTC.cpp:37:0:
…/…/…/…/pine/dom/media/webrtc/MediaEngineGonkVideoSource.h:22:18: warning: type attributes ignored after type is already defined [-Wattributes]
class MOZ_EXPORT MediaBuffer;

In the directory /home/novski/B2G/objdir-gecko/dom/media/webrtc
The following command failed to execute properly:
/usr/bin/ccache /home/novski/android-ndk-r11b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -std=gnu++11 -o MediaEngineWebRTC.o -c -I/home/novski/B2G/objdir-gecko/dist/stl_wrappers -I/home/novski/B2G/objdir-gecko/dist/system_wrappers -include /home/novski/B2G/pine/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DWEBRTC_POSIX -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/home/novski/B2G/pine/dom/media/webrtc -I/home/novski/B2G/objdir-gecko/dom/media/webrtc -I/home/novski/B2G/pine/dom/base -I/home/novski/B2G/pine/dom/camera -I/home/novski/B2G/pine/media/libyuv/include -I/home/novski/B2G/pine/media/webrtc/signaling/src/common -I/home/novski/B2G/pine/media/webrtc/signaling/src/common/browser_logging -I/home/novski/B2G/pine/media/webrtc/trunk -I/home/novski/B2G/objdir-gecko/ipc/ipdl/_ipdlheaders -I/home/novski/B2G/pine/ipc/chromium/src -I/home/novski/B2G/pine/ipc/glue -I/home/novski/B2G/objdir-gecko/dist/include -I/home/novski/B2G/objdir-gecko/dist/include/nspr -I/home/novski/B2G/objdir-gecko/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /home/novski/B2G/objdir-gecko/mozilla-config.h -MD -MP -MF .deps/MediaEngineWebRTC.o.pp -I/home/novski/B2G/system -I/home/novski/B2G/system/core/include -I/home/novski/B2G/hardware/libhardware/include -I/home/novski/B2G/external/valgrind/fxos-include -I/home/novski/B2G/frameworks/native/include -I/home/novski/B2G/frameworks/av/include -I/home/novski/B2G/frameworks/av/include/media -I/home/novski/B2G/frameworks/av/include/camera -I/home/novski/B2G/frameworks/native/include/media/openmax -I/home/novski/B2G/frameworks/av/media/libstagefright/include -I/home/novski/B2G/external/mdnsresponder/mDNSShared -idirafter /home/novski/android-ndk-r11b//platforms/android-21/arch-arm/usr/include -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wthread-safety -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-short-enums -fno-exceptions -DMOZ_ENABLE_JS_DUMP -include /home/novski/B2G/gonk-misc/Unicode.h -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=softfp -mno-unaligned-access -I/home/novski/android-ndk-r11b//sources/android/support/include -I/home/novski/android-ndk-r11b//sources/cxx-stl/llvm-libc++/libcxx/include -I/home/novski/android-ndk-r11b//sources/cxx-stl/llvm-libc++abi/libcxxabi/include -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -g -freorder-blocks -fno-reorder-functions -Os -funwind-tables -Werror -Wno-error=attributes -Wno-error=shadow /home/novski/B2G/pine/dom/media/webrtc/MediaEngineWebRTC.cpp
make[6]: *** [MediaEngineWebRTC.o] Fehler 1
make[5]: *** [dom/media/webrtc/target] Fehler 2
make[4]: *** [compile] Fehler 2
make[3]: *** [default] Fehler 2
make[2]: *** [realbuild] Fehler 2
make[1]: *** [build] Fehler 2
make: *** [out/target/product/FP2/obj/DATA/gecko_intermediates/gecko] Fehler 2

real 56m37.630s
user 48m27.500s
sys 4m51.496s

Build failed! <

to me it seams like the same failure… what you guys think?
Thanks, Novski

(Lissyx) #70

Are you sure your pine tree is good? I cannot helo more.

(M Ducorps) #71

Hi @Novski,

Could you give me the results of git status from B2G folder and Gaia folder please.

On my side as soon as I’m home I’ll send you the details with what I managed to make it build.



Thank you!

(M Ducorps) #73

Could you give me also the git status of Gaia folder please.

I’ll compare it with mine.



(M Ducorps) #74


This the way it works for me, the idea is to troubleshoot your issue in an iterative manner.

1- Could you set you base.xml like mine here (copy and paste should be good)
2- in the B2G folder set your .config like this one (copy and paste should be good)
3- In the B2G folder see your .userconfig like this one (copy and paste should be good)
4- in your B2G/Gaia folder run this command :

git reset --hard mozillaorg/kanikani

5- go back in you B2G folder and run

./ flame-kk

6- When configure is done run


let me know the result.

PS: a good and easy way to send logs output and or config files is to use from the command line for exemple:

cat .userconfig | nc 9999

it will return you a link to put in your post

and for the output if you want to send all the output to a log file you can do

./ &>> ~/build.log

(with this you won’t see anything on the screen you can have a look at “tee” if you like out of this current topic) then

cat ~/build.log | nc 9999



losgelöst means detached.
so translated: HEAD detached on d1e0f3f
nothing to commit, workingpath not changed.

(M Ducorps) #76

Not sure what does it mean but mine si like this :

HEAD detached at 05a734f
nothing to commit, working directory clean


Thanks Matth. verry kind that you made that detailed description.
Im now pulling up a new VM and will follow it.
If i once go for a flame build will i be able to change to fairphone afterwards?

(M Ducorps) #78

sorry though you where building for flame go ahead an change flame-kk by your device ID i guess it’s fairphone2.

let me know how it goes.


(M Ducorps) #79


I rerun the emulator with log cat and here are the logs, don’t really understand which error i should be concern about:

Which is clear is that i have a log of error like this:

E/GeckoConsole( 64): [JavaScript Error: “NS_ERROR_UNKNOWN_PROTOCOL: Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIIOService2.newChannelFromURIWithLoadInfo]” {file: “jar:file:///system/b2g/omni.ja!/components/B2GAboutRedirector.js” line: 63}]

does it ring a bell to you ?

Thanks for the help !

PS: waited roughly 5mins but no interface shows up…


(Lissyx) #80

I/Gecko ( 64): !!! NO root directory with apps found

Gaia is not installed in /system/b2g/apps/, that explains the black screen.