how I can build mozilla projects - linux

I found https://github.com/mozilla/gecko-dev/tree/master/b2g Mozilla repositories where have the moz.build file, can anybody help, how I can build this plugin. What are tools I need use for build project with use moz.build ?
thank you

If you are trying to build B2G (Firefox OS), then you should follow the procedure documented here. But I have to advise you that you're using the wrong repository if that's your objective, since the correct one for B2G should be this.
In any case, you would need to install the build prerequisites for Linux, as described here, by using the following command:
wget -O bootstrap.py https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
Now, if you really wanted to just build the b2g folder in the repository you linked, once you've downloaded and installed the prerequisites, simply issue the following command from the root of gecko-dev:
./mach build b2g
This will invoke mach, the build system Mozilla uses, to build the code in the b2g directory.

Related

Rustup: how to add/build components for custom toolchain

I need to build a repo using a custom toolchain. However, that repo requires
rust-src rustc-dev llvm-tools-preview
However, it seems rustup can't install components for custom toolchains(correct me if I'm wrong).
Do you know how can I install them or build them by myself?
Thanks
The correct workflow is:
build & install your custom toolchain to a folder.
run ./x.py dist, then you can get many compressed components in the build/dist folder.
select the component you want and decompress it, there is an install.sh script, you can use that script to install the component to your custom toolchain. One example of mine is ./install.sh --prefix=~/rust_custom --components=rustc-dev, suppose I installed my toolchain in ~/rust_custom folder.
P.S.
It seems x.py doesn't have an install command for the llvm-tools, so at least this component needs to be installed manually for a custom toolchain.

Integrating custom Linux test project package with Alpine

I have downloaded the Linux Test Project repository and compiled it. I now want to integrate it with the Alpine's binary image while compiling. A unix shell script that has Alpine specific commands will kick-in during compile time which adds these packages to the Alpine's binary. All the standard packages (like Python, Nginx and memcached) are getting integrated successfully by this script except LTP. The command used here is apk add <package name>. The same command doesn't work with the custom LTP's binary.
I tried n number of things like upgrading the apk package, supplying the entire LTP repository using --repository option, trying to manually generate an APKBUILD.tar.gz. Nothing works. Any help would be deeply appreciated.
Thanks in advance !

How do I build vala from scratch

When I try to build vala (https://github.com/gnome/vala), I get an error from autogen that vala must already be installed in order to build vala. So how can I build it on a system that doesn't have it already? I get that it is self hosting, but there has to be some way to boot strap it.
My os is Android-x86 6.x
You can download a source tarball from download.gnome.org and build from there. The tarballs contain generated C code to build the compiler without a Vala compiler installed.
The procedure would be something like:
curl --location https://download.gnome.org/sources/vala/0.38/vala-0.38.4.tar.xz \
--output vala-0.38.4.tar.xz
tar --extract --file vala-0.38.4.tar.xz
cd vala-0.38.4/
./configure
make
The configure script should detect there is no valac installed and select the bootstrap option. You could also try make bootstrap if you run in to problems.
You can then run the test suite and install to the usual Unix file locations with:
make check
make install
Although the install part may not be relevant to Android.

Install lldb only in llvm

I'm starting to work with llvm infrastructure, and i'm interested in the use of the debugger tool lldb instead of default gdb. I followed the tutorial of installation of clang (Linux System, through svn options) and now wanted to know if is possible to install lldb only, instead of rebuild the whole structure of llvm. I don't found a especific documentation for that and i don't know any especific forum for llvm, so if anyone know some forum of llvm,
Sorry about my english, i'm a brazilian developer.
I actually found the solution yesterday, but was not sure how the policies to answer your own questions work here, but according to this it's allright. :)
In fact, it is quite simple.
First, you must identify the directory 'src-root' of the installation of the tools llvm/clang using the command 'llvm-config':
llvm-config --src-root
Once you find the directory, you must navigate to the path $src-root/tools and checkout the lldb:
svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
The next step is go to the build directory, if the steps of the tutorial has been followed, is just necessary to clean the build directory:
rm -rf *
Now, is the step of building the lldb, I personally have used the autoconf options (classical configure make && make install), but cmake can be used as well. When the configure script runs, the binaries of llvm and clang already installed will be detected, avoiding rebuild the whole structure of llvm/clang.
The parameters of the configure script can be changed, I use as follow because I intend to use the llvm libraries:
../llvm/configure --enable-optimized --enable-assertions --enable-shared --enable-targets=host
Then:
make -j4
sudo make install
where -j4 option is the number of threads (jobs) to be created.
Reference: http://www.felixmorgner.ch/en/blog/building-clang-lldb-and-libc-on-ubuntu/

Haxelib Dependency to a git library

I would like to know if that's possible to declare a dependency to a library via GIT. My usecase is simple, I have some tools, that I would like to share between my projects, but I don't want to add them to haxelib (because this tools are not really interesting for someone else). Otherwise, I would like that people who will install my lib, get my tools too (without the need to use manually haxelib git ....).
Is it possible ? (I didn't read anything about that in documentation)
This is currently not supported in Haxelib, though it would be great to see, and not too hard to implement. If you're interested in working on Haxelib, it's not too hard, open an Issue on the Haxelib Github project and perhaps we can help you figure out how to contribute.
One alternative if you need a workaround is to create a "run" script, so you can do:
# Run the project's run.n file
haxelib run mylib
# Your "run.n" file could have a "setup" command that runs
# the "haxelib git" commands for the user
haxelib run mylib setup
It's a bit of a hack, but it could work in the interim. See http://haxe.org/doc/haxelib/using_haxelib#runnable-project for more info on how to have a run script for your haxelib.
As of 2016, this is now natively supported by Haxelib. You can see the PR here.
As mentioned in the PR, you can use the one of these two:
haxelib git:<url> (similar to cloning the git repository).
haxelib git:<url>#commit-ish (clones to a specific commit, specify the hash.
Shameless plug, BUT you can checkout my http://lib.haxe.org/p/hxmlinstall/
1. Add -lib hxmlinstall to your hxml.
2. Annotate your tools like so
#git https://github.com/you/tools commithash
-lib forkedlib:git
On build you will be warned if your lib repository is not on specified %commithash%
Run haxelib run hxmlinstall to install / pull / update all dependencies

Resources