Building from Source Code
How do I get GAR?
Issue the following commands.
tla register-archive http://www.lnx-bbc.com/arch tla get lnx-bbc-devel@zork.net--gar/lnx-bbc--research gar
Just hit return when it asks you for a password.
- For the stable branch, issue the following instead
tla register-archive http://www.lnx-bbc.com/arch tla get lnx-bbc-devel@zork.net--gar/lnx-bbc--stable gar
When I try to build GAR, it fails on one package. How do I fix it?
Sadly, the nature of compilation is that it will behave differently on different machines. The build system we use is a lightly-loaded Debian GNU/Linux installation. Your distribution will have slightly different headers and directory layouts, which can confuse certain portions of the build (glibc is especially finnicky).
Your best bet is to file a bug against the package that failed.
How do I file a bug against a GAR package?
Simply send an e-mail to submit@bugs.lnx-bbc.com with a line that looks like this at the top:
Package: gar
Please describe the nature of your problem, and include the output of "uname -a" and the name and version of the distribution you're building on. Include at least a screenful of output, not just the Make error lines!
My build failed, and it is very frustrating. How do I get the tree that built the last actual release of LNX-BBC?
All of the 1.x versions of the BBC and LNX-BBC were built by taking binaries from a variety of sources (hand-compiled, out of Debian packages, etc) and just throwing them together.
Our build system attempts to build two ISO files per day, and puts them up at http://www.lnx-bbc.com/builds/. If you're just looking to boot our development pre-release and look around, that's the way to go.
I don't always have access to the Internet, but want to be able to build with a pre-downloaded set of tarballs. How do I get GAR to do this?
The LNX-BBC build process takes a few hundred megabytes of compressed source code. If you don't plan on having a constant network connection during the build process, you can pre-fetch source code in a couple of ways:
First, you can run "make checksum" in the top-level gar/ dir. This may, however, download a number of tarballs for packages that are not needed by the BBC but are in the GAR tree nonetheless. The solution to this is to cd into gar/meta/lnx-bbc and run "make deep-checksum", and this will download and verify only those files needed by the BBC itself.
The use of the checksum rule is not without its flaws, however. If you want these files to survive a "make clean" in any given package, then you should use "make garchive" in the top-level dir or "make deep-garchive" in gar/meta/lnx-bbc.
But I get a bunch of permission denied errors when I do a "make garchive"! I've never even heard of /var/www! What is this?
Debian solves the problem of "where do system HTML documents go?" in the FHS by putting them in /var/www. It's a controversy no matter where they go, but it's typically different on each system. The main GAR developers tend to use Debian a lot, so that's why it is the default.
If you don't want your garchive to live in /var/www/garchive, then you'll want to change GARCHIVEROOT to the directory where you want to keep your tarballs. If you have a Web server, you can point it at that dir and share your garchive as a local cache to machines on your network!
My system has way too many problems during build. Is there some sort of pre-packaged build setup I can use?
Sneakums has been kind enough to provide us with a a fairly straightforward to use chroot build environment. You may wish to give that a try.
How do I package up a piece of software for GAR?
Your questions are most likely answered in the GAR Architecture Doc, which contains a package author's guide.
When I build a BBC, I'm finding that everything, including the chroot uses 5.3 GiB of disk space. Is this typical?
Yes.
I have a Gentoo system and I'd like to have GAR look for any files it needs in the portage download directory before it tries to get them off of the Internet. Is there an easy way to do this?
Yes. In gar.conf.mk, append "file://usr/portage/distfiles/" to FILE_SITES.
![[LNX-BBC]](logo.png)