You are not logged in.

#1 2010-11-26 16:28:52

tinko
Member
Registered: 2010-11-26
Posts: 1

Building ArchLinux from Source

Hello I am new to Archlinux.
I come here from a long way through Ubuntu, Debian over Gentoo and finally Linux from Scratch. However none provided me the boot times I wished, so I came to Arch. I don't know wether the question was discussed, at least I could not find it:

How can I install ArchLinux from Source? I want to benefit from "-O2 -march=native" (or -O3? What is more appropiate for Intel Atom N450, 1GB RAM?). I only find documentation for using the binaries provided.

Offline

#2 2010-11-26 16:32:08

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Building ArchLinux from Source

Do a forum search for pacbuilder, I suppose is my best advice. And, lookup ABS and makepkg on the wiki.

Offline

#3 2010-11-26 23:34:20

ferda
Member
Registered: 2010-02-05
Posts: 67

Re: Building ArchLinux from Source

Offline

#4 2010-11-27 00:54:11

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Building ArchLinux from Source

My suggestion is to only recompile those apps that will actually get a noticable performance increase from it, most do not.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-11-27 09:55:27

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: Building ArchLinux from Source

Recompiling wont improve boot time, but how to speed up arch is a recurrent topic in the forum and the wiki. Do a forum/google search for speed up/improve/boot/quickinit (beware the scripts are 18 month old and should be for inspiration/reference only)/rc.sysinit/sreadahead


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#6 2010-11-28 06:20:17

DStein
Member
From: Buffalo, NY USA
Registered: 2009-11-27
Posts: 60

Re: Building ArchLinux from Source

I've done some very limited, and admittedly very unscientific, benchmarking with compiling various things that I use.  The only things that show any improvement are things like x264 and other libraries involved with audio/video encoding.  Even then, often the gain isn't anything spectacular.

Offline

#7 2010-11-28 08:50:53

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 169

Re: Building ArchLinux from Source

Mr.Elendig wrote:

My suggestion is to only recompile those apps that will actually get a noticable performance increase from it, most do not.

Is there a list for which apps it might make sense to recompile for performance improvements? I think this would be a perfect FAQ to start.
What do you think?

Best regards
Martin

Offline

#8 2010-11-28 15:48:51

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Building ArchLinux from Source

sandstorm wrote:
Mr.Elendig wrote:

My suggestion is to only recompile those apps that will actually get a noticable performance increase from it, most do not.

Is there a list for which apps it might make sense to recompile for performance improvements? I think this would be a perfect FAQ to start.
What do you think?

Best regards
Martin

Such a list would be quite subjective. Generally speaking, look at computationaly intensive apps which already use a lot of your CPU to begin with. Some people say compiling the kernel makes a difference (actually, I think optimizations are mainly turned off anyway, they could break things or something like that). Audio-related stuff like libx264 of course. Maybe ardour. Some people suggest firefox-pgo (but compiling it takes so long I don't bother, and firefox updates quite often).

Basically, such a wiki page would never be really accurate due to the subject matter being subjective.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2010-11-28 17:15:37

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Building ArchLinux from Source

It seems to me that, since Arch makes no use of anything similar to USE flags, building the entire system from source is a pointless endeavor.  It's suitable only for those who desire ultra-fine control, and in such a case, one would need to edit hundreds of PKGBUILDs to get the desired results.  As for recompiling and entire system, it seems equally pointless to me to spend an entire day recompiling an entire system for a statistically insignificant gain on a benchmark.  As mentioned above, your best bet is to find those processes and programs most in need of a tune-up, and compile those to your desires.

If you'd like to improve your system performance quickly--only needing an open afternoon to play around--you can check out this here and that there

EDIT:  If you haven't found it yet in your research on ABS and such, check out the wiki page on the makepkg.conf file.  It contains the gcc options you'd find in Gentoo's make.conf file.  I've been playing around with both -O3 and -Os lately; I like to walk that line between adventurous and insane, myself. smile

Last edited by ANOKNUSA (2010-11-30 17:52:23)

Offline

#10 2010-11-30 12:36:51

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: Building ArchLinux from Source

recompiling x264 shouldn't improve speed that much as all CPU intensive tasks are coded in assembly.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#11 2010-12-02 21:43:40

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 169

Re: Building ArchLinux from Source

Ok. That is understandable.

Let me see what else ... what about Blender or Luxrender?

Offline

#12 2010-12-03 01:05:00

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

Re: Building ArchLinux from Source

tinko wrote:

.....Ubuntu ... Debian ... Gentoo ...  Linux from Scratch ... none provided me the boot times I wished, so I came to Arch. .....

How can I install ArchLinux from Source? I want to benefit from "-O2 -march=native" (or -O3? What is more appropiate for Intel Atom N450, 1GB RAM?).

The beautiful aspect of Arch, to me, is that you can install all of your desired apps from binaries in a very short time and later compile them (or some of them) from source code to optimize performance. I run ArchLinux on a couple of systems with Atom 230 and 330 processors (each with maxed out memory, 3.2GB).  I've noticed a nice improvement in responsiveness as I've moved step-by-step from a system composed entirely of pre-compiled binaries from the repositories to a system composed mostly of the same packages compiled locally with my own CFLAGS ("-march=atom -O2 -msse3 -mfpmath=sse").  I think that installing from source is a reasonable thing to do and is very easy with Arch:

pbget <package> && cd <package>/ && makepkg --install --noconfirm --log  [-s]

You can prepare for your daily or weekly upgrade with
pbget --abs --upgradable && pbget --aur-only --upgradable

To get a kernel compiled for the atom cpu just use pbget to get the kernel26 package (or pbget --aur-only kernel26-ck to get the ck-patched kernel), edit the PKGBUILD to enable menuconfig (I use "make gconfig"), run makepkg and enable the atom cpu option in the menus.

Arch doesn't have USE flags (and I'm glad of that) but the equivalent is to edit the PKGBUILD.  You may have to delve into the source code before changing ./configure options:  makepkg --nobuild && <check the configure options> && vim PKGBUILD && makepkg --install

In general the Arch devs have done well in choosing the right configuration. I'm happy to stick with almost all of their decisions and burn myself once in while when I try to do otherwise smile

Offline

#13 2010-12-03 03:18:30

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Building ArchLinux from Source

I want to point out that Bauerbill provides "Autobuild" and "AutoPatch" options that enable you to customize particular packages. Basically, you can edit a PKGBUILD once (to change compilation options, etc) and then have those changes applied with each subsequent upgrade automatically.

*edit*
Of course, you could use Bauerbill to build everything from source, but as already noted, that would just be a waste of energy and CPU cycles.

Last edited by Xyne (2010-12-03 03:19:32)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#14 2010-12-27 18:45:56

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 169

Re: Building ArchLinux from Source

Since I have also an Atom CPU in my netbook I did some research. I followed the instructions on this page and built a Kernel "kernel26-custom" with Atom and some other modifications.
https://wiki.archlinux.org/index.php/Kernel_Compilation
Do you think it is possible to also leave the original name "kernel26" and install the package? An advantage would be to use the existing module I have and have the modifications I made in addition.

Best regards
Martin

Offline

#15 2010-12-27 19:15:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Building ArchLinux from Source

sandstorm wrote:

Do you think it is possible to also leave the original name "kernel26" and install the package? An advantage would be to use the existing module I have and have the modifications I made in addition.

Wouldn't that install the regular kernel when you update 'pacman -Syu'? ?Remember to put kernel26 into IgnorePkg :-)

Offline

#16 2010-12-27 21:45:09

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Building ArchLinux from Source

sandstorm wrote:

Do you think it is possible to also leave the original name "kernel26" and install the package? An advantage would be to use the existing module I have and have the modifications I made in addition.

As mentioned, this would erase your custom kernel every time a new kernel update comes out, and you could just use IgnorePkg to block the update.  Of course, a more immediate side effect would be to keep kernel26 as the name, install your custom kernel in place of the original, reboot to find your modifications not to playing well, and have no back-up kernel to work with.  That's why the name change is recommended. wink

Offline

#17 2010-12-27 23:00:11

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Building ArchLinux from Source

If you did Gentoo and LFS without getting satisfactory boot times, what makes you think Arch will be better? You're probably not compiling enough things into the kernel (compiling too many things as modules), or more likely you're just adding too many things in general. IMO, that's really the only thing that would be worth compiling.

What everybody else said is pretty much what I think as well.

Offline

Board footer

Powered by FluxBB