[Solved]Shall I compile src even if availble onUbuntu repo ?

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
kamyar

[Solved]Shall I compile src even if availble onUbuntu repo ?

Post by kamyar »

Hi Team,

Let's imagine that you want to install an application called XYZ in version 1.2.3 build 4

Let's imagine that XYZ is available on Ubuntu repository in version 1.2.3 build 4

Let's imagine that you DO have access to the source code of XYZ in version 1.2.3 build 4

Question :
Is it better to install it from the Ubuntu repository or to compile and make it on my own PC ?

Answer suggestions :

A./ You will eventually get the very same code compiling it OR downloading it from the Ubuntu repository

B./ Your own compilation will make a better binary on your PC because perfectly adapted. If you have time, take the time to build your own binary
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18173
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Better to compile source even if availble on Ubuntu repo

Post by karlchen »

Not a support question. Not a Linux Mint topic as such. So thread moved to "Chat about Linux"
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
skywolfblue
Level 3
Level 3
Posts: 100
Joined: Sun Feb 03, 2013 6:59 am

Re: Better to compile source even if availble on Ubuntu repo

Post by skywolfblue »

I would say the Ubuntu repository.

It seems nigh everything I try to build from source code is missing this or that and the build breaks. So I hate building from source.
scryan

Re: Better to compile source even if availble on Ubuntu repo

Post by scryan »

kamyar wrote:Hi Team,

Let's imagine that you want to install an application called XYZ in version 1.2.3 build 4

Let's imagine that XYZ is available on Ubuntu repository in version 1.2.3 build 4

Let's imagine that you DO have access to the source code of XYZ in version 1.2.3 build 4

Question :
Is it better to install it from the Ubuntu repository or to compile and make it on my own PC ?

Answer suggestions :

A./ You will eventually get the very same code compiling it OR downloading it from the Ubuntu repository

B./ Your own compilation will make a better binary on your PC because perfectly adapted. If you have time, take the time to build your own binary
You don't want to build everything from source... Would update manager Even catch it? And even then, ever update you would have to run update manager, copy and list and go re-compile 40 things?

For up-to-date package management alone its not worth it, add in dependency resolution and it really doesn't look like something you want to do.

Though it would likely be technically faster. If you have a decent computer it may not even be totally noticeable, especially if you don't know all the flags to set to really optimize for you system while building.

However, if it interests you I would say look into 2 things:
-Linux from scratch. Google it, you'll find it easily. Free book that covers how to download and build your own system from scratch, compiling everything. Really for education only... You could make it work but very few use it as a real/main system for the reason I mention earlier (dependency resolution and updates.) but it will let you see how much speed you could be getting with a fully customized build. Most people say it takes a good weekend to a week or two depending on how constantly your working on it.
-Gentoo, a disro with a package manager based on source code that builds all programs on install. This one will only take a few hours to a day to setup. I do belive some of the base system installs as prebuilt binaries but everything you install you compile with their package management portage, that automates the process and handles dependencies.

Be ready for the fact that both install as only a basic command line interface, then after the initial install you download/install X, a display manager and a desktop environment (or what ever your graphic preferences are...)
shengchieh

Re: Better to compile source even if availble on Ubuntu repo

Post by shengchieh »

I think question boils down to whether you want optimization or ease of use. For optimizaion, you compile using various options to gain the best speed. Novices probably want to stick with software manager/synaptic.
In other words, the difference between Arch/Gentoo and LM/Zorin/etc.

Sheng-Chieh
Incentive I.C

Re: Better to compile source even if availble on Ubuntu repo

Post by Incentive I.C »

You can compile from the Ubuntu Repo.

sudo apt-get build-dep packagename to install dependencies and sudo apt-get --build source packagename to download source to compile from. You have to enable the source code repo first.
var
Level 3
Level 3
Posts: 113
Joined: Mon Jul 14, 2014 1:29 am

Re: Better to compile source even if availble on Ubuntu repo

Post by var »

As a former Slackware user I can tell you that you do NOT want to compile everything from source. Slackware has no real package manager and so if you wanted Skype you had to compile all of its 40+ dependencies yourself. Anything you wanted had to be compiled from source, LibreOffice, Abiword etc. I can tell you that after you do this for enough time.. it gets really old.

However for small programs I still compile from source, because apt-get does not put them in /usr/local which irritates me.. I am still used to having an Iron Grip over my OS :mrgreen:
eanfrid

Re: Better to compile source even if availble on Ubuntu repo

Post by eanfrid »

By compiling from source, either guided from Ubuntu src repos or straight from upstream, you actually become your own personal packager. So then you will have to patch, recompile, rebuild each of your own home-made install/package at least each time there is an important bug or security fix made available. This can be very strenuous, as "var" pointed it out, and an unnecessary pain. With great power comes great responsibility :)
niowluka

Re: Better to compile source even if availble on Ubuntu repo

Post by niowluka »

I think with a distro like Ubuntu / Mint, which use a lot of patched, customized packages, you may have problems compiling from source. LMDE or pure Debian should be better though.

When you compile from source you can set specific compilation flags, and you may save yourself installing dependencies you know you will never need. It may also improve performance, but not to a degree it would be worth a hassle, frankly...
kamyar

Re: Better to compile source even if availble on Ubuntu repo

Post by kamyar »

Hi Team,
Thank you for your lights.

I had totally forgotten this story of dependencies :-))
Locked

Return to “Chat about Linux”