Source Mage GNU/Linux

Programs Speedtouch Project Snoopy Project eciadsl Project The bread recipe Source Mage BeOS My resume My blog Notes Donation
Speedtouch Project
Snoopy Project
eciadsl Project
The bread recipe
Source Mage
My resume
My blog
en fr

Source Mage GNU/Linux

Benoît Papillault, 2004-09-16
Updated: 2005-02-06

Some explanations

Source Mage GNU/Linux is a source based GNU/Linux distribution. This means that the installation of any software inside this distribution will download sources and compile them with specific chosen optimisation. The main site of this distribution is . Many informations on the installation and use are available on the Wiki : .

Since I found this project interesting, I'm participating in it since June 2003 in order to produce installation CD-ROM. Recently, I'm trying to port Source Mage to 64 bits processor from AMD (x86_64).

ISO image creation

ISO image version 0.9.4-test2 x86, ppc and x86_64 (for testing)

Those images are available here!

ISO images version 0.9.3 x86 and ppc (stable)

ISO images version 0.9.2 ppc review

This image is available at Tests done on a ibook g4 have lead to the following results.

ISO documentation

64 bits architecture portage

64 bits architecture of AMD processors allows (under some conditions) to execute both 32 bits and 64 bits code. For this reason, we call such platform bi-arch platforms. However, even if the processor is able to simultaneously execute 32 bits process and 64 bits process, each 32 bits programs can only use 32 bits libraries and each 64 bits programs can only use 64 bits libraries. For this reason, some libraries are needed in both 32 bits version and 64 bits version. We have chosen to put 32 bits libraries under /lib32 (or /usr/lib32) and 64 bits libraries under /lib (or /usr/lib). This choice simplify porting existing applications that are used to install under /lib.
  • Definition: We call bi-arch platform a platform that is able to execute code for two different architectures simultaneously.
  • Definition: We call multi-arch kernel header Linux kernel headers that are designed to be used on several architectures simultaneously. This is a requirement to compile glibc on a bi-arch platform.
  • Definition: We call bi-arch spell a spell that should be compiled on both architectures. Example: glibc.
  • Definition: We call multilib compiler a compiler that handles (and generates) libraries for different architectures. Requirement is to have a bi-arch glibc first.
  • Definition: We call bi-arch sorcery a sorcery version that is able to compile bi-arch spells. Reminder: sorcery is the tool that will install software from sources.
In order to add all those functionnalities to Source Mage, various modifications have been done. Those modifications have been tested on a 64 bits Athlon processor. Beside all the work done, only a chroot'ed system inside a Mandrake distribution has been achieved.


sorcery is the tool for package management in SourceMage GNU/Linux.

sorcery patch for /lib/ use

sorcery is the package (or spell) management tool. Installation is done by using the usual sequence (described here in a simplified version) :
./configure --prefix=/usr
make install
Installed files are then found by using the installwatch tool. The above mentioned sequence has then an extra step:
./configure --prefix=/usr
here, all previously installed files by the spell are removed
make install

Thus in the case of the glibc spell, both files /lib/ and /lib/ are removed. The latter being a symbolic link to the former build by the ldconfig command.

The file /lib/ is however a vital file for the system. Indeed, it is the loader. Each and every dynamic executable contain a reference to this file, as show in the following command:

$ LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/]
Thus to prevent this file deletion, a special file /var/lib/sorcery/excluded contains the name of all files that will not be removed. However, the problem is that each architecture use a different name. Thus, the above command would produce the following results on ppc and x86_64 architectures respectively:
$LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/]
$LANG= readelf -l /bin/sh | grep interpreter
      [Requesting program interpreter: /lib/]
The following patch is used to remove such limitation : sorcery-ld.diff glibc-2.3.2 spell has been compiled twice to check that the patch is working correctly.

Using sorcery for cross compilation

Here is a small design document on how this could be implemented : sorcery BUILD_ROOT. You can read some official links too:

installwatch bugs


Valid XHTML 1.0! CSS Valide !
Benoît Papillault