Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed apt-build on Ubuntu, it is a program that compiles and installs programs. It compiles optimally for the user processor and this makes programs run quickly.

But I thought what if I change my processor in the future, programs compiled for the old processor will present problems? If yes, then I have to compile again?

Please someone who use apt-build help me.

share|improve this question
up vote 3 down vote accepted

On installing apt-build, you set the parameters for optimization. You can check what this are currently by running:

cat /etc/apt/apt-build.conf

Which in my case gives:

build-dir = /var/cache/apt-build/build
repository-dir = /var/cache/apt-build/repository
Olevel = -O2
mtune = -mtune=i586
options = " "
make_options = " -j4"

So you can see mine is optimized of i586 architecture, as this computer has a Intel i5 processor (I think i586 is right for this type - seems to work).

It also depends on what you set here: <code>apt-build</code> setup

So if your apt-build settings are set to Strong, they are less likely to work.

If you want to change the settings you set, you can do that simply by running:

sudo dpkg-reconfigure apt-build

So as long as your processor is better than the old one, it might be fine...

share|improve this answer
Thanks for the tips. – Patterson Feb 25 '14 at 16:05

When you choose the architecture, it means the compilation will generate code for some processor family, and you'll have trouble if you change to a different one. If you change to a compatible processor, it should work fine.

If, for example, you compile for an Intel Core i3, switching to an Intel Core i5 will work fine, but might not if you switch to an AMD A10, depending on what you targeted.

There are different levels of generality. If you compile for older architectures, it's more likely to get a binary that can run on different processors, at the expense of losing some optimizations.

Wilf is compiling to i586, which is a Pentium 32 instruction set. Any modern processor will run that, but it won't make many optimizations. i586 code will run both on an Intel Core i5 and on an AMD A10, and also on a Celeron, on a Pentium III and on many others (32 and 64 bits). If you have a 64 bit processor, compile to a 64 bit family, or you won't be really optimizing much.

If you're changing your processor only, not the whole motherboard, to a newer one, you should be fairly safe, as most differences should be between processors using different sockets, AND you're likely changing to a newer version of roughly the same technology.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.