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

sorry about beginner questions, but I don’t understand :

  • what is the problem with respect to the legality?
  • how to make a blobfree build ?

I will take a look at b2g installer. I did not know this application.

i reverted from r12 to NDK r11b but get this:

checking for android platform directory... configure: error: not found. Please check your NDK. With the current configuration, it should be in /platforms/android-9/arch-arm
DEBUG: This file contains any messages produced by compilers while
DEBUG: running configure, to aid debugging if configure makes a mistake.
DEBUG: configure:1057: checking host system type
DEBUG: configure:1078: checking target system type
DEBUG: configure:1096: checking build system type
DEBUG: configure:1374: checking for android platform directory
DEBUG: configure: error: not found. Please check your NDK. With the current configuration, it should be in /platforms/android-9/arch-arm
ERROR: old-configure failed
*** Fix above errors and then restart with\
               "make -f build"
make[3]: *** [configure] Fehler 1
make[2]: *** [/home/novski/B2G/objdir-gecko/Makefile] Fehler 2
make[1]: *** [build] Fehler 2
make: *** [out/target/product/FP2/obj/DATA/gecko_intermediates/gecko] Fehler 2

real    43m51.965s
user    36m41.820s
sys    4m13.712s

> Build failed! <

I droped this line to the end of my user .bashrc:
export android_ndk=$android_ndk/home/username/android-ndk-r11b

learned here:

did i miss any configuration?

The error indicates that the NDK path isn’t known or incorrect. Did you set the shell variable B2G_ANDROID_NDK_PATH to the NDK’s directory? Something like this:

export B2G_ANDROID_NDK_PATH="/path/to/android-ndk-11b"

you might be right i yust descovered that my path (pasted above) is faulty…

it should be:
export android_ndk=$android_ndk/home/novski/android-ndk-r11b

Im building again. hope it works this time…
Regards, Novski

didn’t work. i read here that the SDK is needed as well. I have only installed the NDK.
@erable did you install the SDK as well for your successfull build?

And, how can i check if the path settings of NDK are set right?

That page is misleading. Just follow the description in this thread. You don’t have to set ‘android_ndk’, you have to set ‘B2G_ANDROID_NDK_PATH’. And you don’t need the SDK. The SDK is for Java and we don’t use Java on b2g.

ok. what i don’t understand is where to set ‘B2G_ANDROID_NDK_PATH’.

|export B2G_ANDROID_NDK_PATH="…"| in your .userconfig

1 Like

Personally i have put this line in my /etc/environment
So i have i for all users

Then session logoff and log back on

to verify you path is correct run:

edit: trying to make it more clear

is there a way i could verify that ?

PS:VirtualBox:~$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

Check the requirements for AOSP Kitkat ?

Ok it seems i have to go to Ubuntu 14.04 (trusty) will setup a VM and giveit a try keep you in touch.


Does this mean we now don’t have to set kanikani in “.repo/manifests/base.xml” anymore?

No, it means that you can safely use |./repo sync| to update all repos (gonk-misc included), and then still change the branch for gaia to kanikani and use pine tree directly since it includes the changes for building with ndk scripts from fennec.

1 Like

i get “error: .repo/manifests/: contains uncommitted changes” after ./repo sync
but i don’t remember to have made changes in files…

Just above you say you changed the branch for gaia to kanikani, this is probably the reason ?

oh. right. now i see i missinterpreted your post. thaught it should work with “kanikaini”.

Just to know. Does that also mean that for every update (./repo sync) i have to revert to “master” in .repo/manifests/base.xml?

I alltrough still have problems with integrating the B2G_ANDROID_NDK_PATH.
If i write it to B2G/.userconfig i never get the path set properly. [quote=“m.ducorps, post:29, topic:9343”]
to verify you path is correct:then echo $B2G_ANDROID_NDK_PATH
The Echo command is always empty. So i tryied two set it in two files, once the .bashrc as sugested in a tutorial i posted above and the one setting from m.ducorps in /etc/environment.
both failed in build. this is the last build failure with set in /etc/environment.

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 4m37.677s
user 3m34.172s
sys 0m33.168s

Build failed! <

Build with |./ -j1| for better messages
If all else fails, use |rm -rf objdir-gecko| to clobber gecko and |rm -rf out| to clobber everything else.
novski@novski-U140464deskVM:~/B2G$ echo $B2G_ANDROID_NDK_PATH

what confuses me is that seting it in the /home/novski/B2G/.userconfig doesn’t work as lissxy sugested.
is somebody able to reproduce that?
Regards, Novski

Have you logged of from your desktop session and log back in before doing the echo ?
It’s the only way i know to have this variable properly loaded by your shell.

Let me know.


hi matth
thanks for your reply.
Yes to all three tests, i have loged out and back in again.
are you able to delete your path setting in etc/environement and paste it to B2G/.userconfig, log out and in again and echo your path setings as you described it to me before with echo $B2G_ANDROID_NDK_PATH?
in my case this always shows a empy line, also if i build and echo $B2G_ANDROID_NDK_PATH again after…
it would be interesting if thats the same on your side…
regards, novski

I confirm i have the error

mozbuild.configure.options.InvalidOptionError: Unknown option: --with-android-ndk

Here below the details of distrib version, make, path and build output…
Target is “emulator-kk”

on my side after a reboot the “B2G_ANDROID_NDK_PATH” is properly set (/etc/environment) see in the log provided…

PS: @Novski it seems the path is properly set also on your side looking at the output of your echo