Can you build ARCH from source? Let’s see!

Apart from the object to build arch minimal base without systemd and its libraries, the idea or question that came to mind was whether you can build all your packages from the Arch recipes. Since Artix now is autonomous and relies on its own software base, not Arch, the same question applies, and I suppose the same applies to Manjaro. Most of the core pkgbuilds in Artix are just copies of Arch. Systemd may not be there but many of its libraries or pieces are still there. But let’s say you just want to build Arch, authentic and 100% true arch.

The short answer is NO!
The long answer is explained here:

The minimal base/chroot of a system you must have to build Arch packages is base + base-devel – linux or boot loader.  This is a chroot that Arch describes.  Any additional dependencies are listed in the PKGBUILD as (dependencies, makedepends, checkdepends, …).  So by adding the prescribed added dependencies you must have all that you need to build the “prescribed package”, right?

And what is this so-called clean-chroot Arch devs automatically mention when users ask of building problems?  A chroot hosted by what host, and if it is a docker how come it is missing sw to run the docker.  Unlike what devs may lie about poor pacman/makepkg doesn’t lie, it lists what was installed in the builder in a file called .BUILDINFO inside the binaries archive. (use whatever sw you use to decompress a zst and open the tar of any package and you will see it in the root directory of the archive).

Specifically, how is glibc built?  And can it be built without systemd-libs?

Can it be built in this chroot WITH systemd-libs?

We found this list of pkgs installed while glibc was built that are neither in base/base-devel or mentioned in the PKGBUILD’s makedepends/checkdepends list:

dejagnu
doxygen
expect
gcc-ada
gcc-d
gcc-fortran
gcc-go
gcc-objc
inetutils
libmicrohttpd
rsync
tcl
xxhash

So, try it and let us know of your findings.  But let’s regress, if this which is so core to the core of the core of a linux distribution is so sloppy and contrary to allegations and principles the distro is based on, how far does this sloppiness and contradictions go?

To give some credit to other distributions, Void for example, has similar recipe files, like gentoo has too, and they seem pretty accurate, and their building process and logs are pretty transparent.  Just try the void base, randomly pick a pkg recipe, and use xbps-src to build.  I assume that debian is to the dot accurate as at any time any user can switch repositories to deb-src and rebuild everything they have installed and only install from source after it.

We like Arch because we may like pacman, but the deeper you dig the deeper you get disappointed.  You get puzzled sometimes how the whole thing works and doesn’t collapse, and how do they actually build the binaries they offer as built pkgs.

Some reverse engineering is necessary to uncover the mystery, and this topic is far from over.

 

NOTE:  there is a complex AUR pkg (AUR:pbget) that helps you get the arch source for each core pkg, it is a bit outdated and since some community and extra pkgs have been moved to a different naming convention it does not always work.

For most core packages I have found this little script works well enough. to get you at least the PKGBUILD file, the rest you obtain utilizing the same address but switching for post.install and patch files, or whatever is mentioned in the “source=” field of PKGBUILD:    (pbget will get the latest stable version, the following will bring you testing if it exists)

 

#!/usr/bin/bash
echo "enter the pkg name"
read pkg
mkdir $pkg
cd $pkg
wget https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/$pkg/trunk/PKGBUILD
ls -al

 

PS  Before some smart @$$ dev comes here and says that versions are important and back when the pkg was made with that specific version of all those installed in the system that build it was possible, and I will have to prove them wrong again, I will just wait for the next edition of glibc and build (or fail) with the same exact version sequence.  All versions of all Arch sw exist in the archive, it is not hard to test that “hypothesis” either.  But don’t sweat, and don’t tighten up too much.  I propose arch is renamed miracle linux, to demonstrate what a miracle it is that it is holding up so well.

 

You draw your own conclusions out of this, I will not feed them to anyone like ground baby food.

 

make[2]: *** [/src/glibc/src/glibc-build/sysd-rules:229: /src/glibc/src/glibc-build/misc/syslog.os] Error 1
make[2]: *** Waiting for unfinished jobs….
make[2]: Leaving directory ‘/src/glibc/src/glibc-2.33/misc’
make[1]: *** [Makefile:479: misc/subdir_lib] Error 2

3 thoughts on “Can you build ARCH from source? Let’s see!

  1. Ordinary user here. It seems to me Arch Linux has gained lots of fame in recent years (deservedly, for a reason) but it also deepened “bleeding edge/always updated” tendencies that were already spearheaded by Fedora.

    Like

    • Fedora is just a system for cheap lab rats. This is what IBM/RH has been using to iron out the bug spikes for Centos which is used on their commercial clients. It is like Debian Sid. If all those thousands of people weren’t using them they couldn’t brag about their “stable products”.

      If there is a commercial interests distro with Arch that would be Manjaro, selling expensive laptops with it installed.

      But the point of the article was a bit different. If something as basic and a foundation block for Arch, like glibc, is not building from source, what is this that is used as a core to building every package in Arch?

      Again I am not comparing it with other systems, this is what I am working with this is what I discover, I am not saying one system is better or worse than another, not in this context.

      Liked by 1 person

  2. I’m not a dev – just a normal guy looking for a decent os. I absolutely love your observations and explanations on your blog. Keep up the good work and thank you for shinning lights on these issues regarding the development of Linux.

    Cheers from Denmark

    Like

If your comment is considered off-topic a new topic will be created with your comment to continue a different discussion. This community is based on open and free communication, meaning we must all respect all in minimizing the exercise of freedom to disrupt such communication. Feel free to post what you think but keep in mind the subject matter discussed. It is just as easy to start a new topic as it is to dilute the content of an existing discussion.

This site uses Akismet to reduce spam. Learn how your comment data is processed.