Is it possible to compile each and every package (that come up with Ubuntu Installation ISO) from scratch and come up with home-made-compiled Ubuntu variant ?

Where I can see, what config parameters/patches Ubuntu has used while creating ?

On Ubuntu's site, for any given particular release, list of all packages can be seen. But I am unable to find it's compilation options.

EDIT: Basically, I would like to understand Multilib/Multiarch functionality of Ubuntu

(If this question is unfit then do let me know, I will safely delete this question)

1 Answer 1


It’s possible; the difficulty level will depend on how strict you want to be.

Packages in Ubuntu (as in Debian and all Debian derivatives) are fully described by the files in the debian directory in the corresponding source package. To rebuild a package from source, run

sudo apt-get build-dep <package>
apt-get -b source <package>

(replacing <package> with the name of the package you want to rebuild). You’ll find the compile options in debian/rules, based on defaults provided by debhelper and dpkg-buildflags (so debian/rules might not contain much at all).

If you want to rebuild from scratch, starting with a minimal system and working your way up without every installing a binary package, things get more complex. See How to update all Debian packages from source code? for the basics (and reasons why you probably don’t want to do this).

To understand multiarch, I don’t think there’s any need to rebuild Ubuntu. Start by reading the multiarch documentation; then if you need more you can look at the patches which implement multiarch in GCC (they all have “multiarch” in their name), at the support for multiarch in debhelper, e.g. here for autoconf, and at the ld.so configuration in glibc.

  • That was very quick and prompt reply. I am having enough patience if the outcome is fruitful. Please see EDIT to the question
    – SHW
    Jul 23, 2018 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .