9

Hello i wanted to know how can get Ubuntu source code and compile it on my own .

Basically i wanted to give it a try so can some one help me regarding the steps to compile a full Ubuntu system .

Also would this be beneficial as compared to installing from per-compiled binary?

fossfreedom
  • 172,746
coder
  • 3,591
  • 1
    Buildroot is a possibility if you can do with a more minimal OS, see this example: https://stackoverflow.com/questions/47557262/how-to-download-the-torvalds-linux-kernel-master-recompile-it-and-boot-it-wi/49349237#49349237 that REALLY does compile everything from source. It does not have as many packages as Debian unfortunately. – Ciro Santilli OurBigBook.com Sep 28 '18 at 10:54

1 Answers1

3

There would be little benefit compiling from source. If you are dead set on this then you would probably be better switching do a Linux distribution that is aimed at this sort of user, such as Gentoo. This is designed around the user compiling from source and therefore would suit you better.

Ubuntu is simply a collection of open source tools put together in a way that makes it a good OS for people to use. It is not a single piece of software to be compiled. If you wanted to compile an Ubuntu system from source code you would have to discover all the pieces of software (Kernel, X windows, all other software on top of that) that Ubuntu uses and compile it yourself. Then add all the package management software such as apt on top as well.

Unless there is a good reason to attempt this, I wouldn't bother. As I said before, switch to Gentoo if you want to compile everything yourself, Ubuntu wouldn't be the first choice.

Kebabman
  • 1,060
  • Even the official Ubuntu doesn't do a full rebuild very often. Individual packages are rebuilt as and when they are updated. As far as I know, it's quite possible that there's a package in the latest release that is years old! – ams Nov 24 '11 at 14:01
  • @ams: I'm not so sure if what you say is true. I think the packages are rebuilt every time there's a new release. This helps since this checks if the package can be built from source (otherwise you have to file a bug tagged "FTBFS" - failed to build from source) [1] http://en.wikipedia.org/wiki/FTBFS [2] http://qa.ubuntuwire.org/ftbfs/ – Savvas Radevic Dec 25 '11 at 15:24
  • @medigeek They're built, yes, but they're not re-released, and it's not a full bootstrap rebuild, as far as I know. That is to say, the new builds are discarded as soon as it been shown that they can be rebuilt. – ams Dec 29 '11 at 19:29
  • @ams: Do you have a reference for this? Compilers/optimizers are improved quite often (especially for performance). Recompiling allows all executables binaries to benefit from the improvements. – Nicolas Raoul Aug 22 '12 at 08:45
  • Here's an example package: https://launchpad.net/ubuntu/+source/xdot . The exact same package build, albeit copied, is used in Natty and Oneiric, and then it gets an upgrade, but again Precise and Quantal share the same package name, and if it has the same name it's the same package, or else apt-get upgrade wouldn't work. – ams Aug 23 '12 at 12:55