Sign in to follow this  
Followers 0
stansmith

Compilation

11 posts in this topic

I like the idea of Gentoo, an OS completely compiled for your machine. Its like buying a tee-shirt from Wal-Mart (current OS) and then taking it to the tailor (Gentoo). However, I have botched up a Gentoo install or two (I find X11 so tricky). I get discouraged until I come back a few months later. Some people say Gentoo fails because it takes such a long time to compile everything. I have all recent hardware, so this was never really a problem (though KDE did take some time).

I like (K)ubuntu and Debian, for their package management system, and overall "it just works" (plus they have real helpful communities). I am in the process of setting up a Debian box in a Gentoo-like manner:

- customized kernel

- recompile of GCC

- compile apps from source

- use the apt-get solely for library dependencies

I thought it would be cool to use something like checkinstall so I could still remove programs that I compiled from source. I would use Debian because you can use their netinstall to get a very minimal OS to start with.

Advantages:

Some packages are not maintained well

Complete control over what is on my system

Disadvantages:

Someone told me that compiling software shows no increase in performance (is this true?)

Possible waste of time?

What is your opinion/take on this?

0

Share this post


Link to post
Share on other sites

At the risk of starting a distro war...

It sounds like you are trying to turn a Debian box into a Gentoo box. If you want gentoo, just install gentoo :)

Gentoo offers you emerge and unmerge which would be the package manager and "uninstaller" that you were looking for. Also if you start with a stage 1 gentoo install you can get all that low level compilation of everything that you yearn for.

As for compilation showing increases in performance, I don't really have a good answer for you on that. Sure tons of people have done tests and bench marks and whatever but I've never personally run any of those experiments. I will say though, that in order to derive benefits you must be very particular in your compilations, i.e. you have to use a series of flags and switches that are tailored to your processor. Nevertheless, if you have recent hardware performance really shouldn't be much of an issue.

My personal opinion? Try them both, heck why not also try BSD, Slackware, Suse, OS2 Warp (Does that even exist anymore?), <insert name of distro anyone likes here>, and Solaris. At best you'll fall in love with something you didn't even know existed, at worst you'll gain some valuable experience tinkering with so many OS's. You could even leave them all on there and just have multiple partitions!

-Dr^ZigMan

0

Share this post


Link to post
Share on other sites

Yes, and No.

Debian is a binary distribution and it isn't going to give you much of a performance increase in recompiling any of the applications or system utilities that are available for the distro. Nearly all the applications have source code available in the standard repositories... just add the src prefix to your mirror, ie:

deb http://ftp.us.debian.org/debian/ stable main

deb-src http://ftp.us.debian.org/debian/ stable main

You can use apt to specify the package and have apt grab the sources to recompile whatever you wish. The kernel recompile is easiest with the 'kernel-package' package and grabbing the vanilla source from kernel.org.

Just be careful not to mention this thread to any Debian elitist types.. you will find yourself getting flamed quite hard. :D

0

Share this post


Link to post
Share on other sites

If you're going to build debian packages from source code, make sure you don't skip building an actual debian package. Download the source code with apt-get source packagename then its build deps with apt-get build-dep packagename. At this point, you could unpack the source code, and configure/make/make install as you would installing from source manually. This breaks any package that depends on that package and could possibly cause nasty dpkg conflicts. Instead, you can use dpkg-buildpackage or the wrapper script debuild to do it for you. They'll produce a deb file you can install with dpkg and keep the dpkg database happy.

Compiling from source has minimal advantages though. In some cases, it's a configuration issue. These configuration issues are almost always handled by the distro, but there may be times when you want to configure with an extra feature or remove a broken feature. As for performance, the gains will be really minimal. It can save a little time in the loading and linking phase but as for the runtime performance, most things won't benefit. Some software like video encoders can really benefit from using SSE3 or whatever CPU-specific extensions you have, but most software just won't. If you have cycles to spare then you won't notice the few hundred cycles firefox just saved rendering a page or the hundredth of a second your email client takes displaying your mail.

0

Share this post


Link to post
Share on other sites

have fun dealing with dependency hell and a broken system. When you start mixing packages and source on a packaged based system, especially large amounts, you are going to break things.

0

Share this post


Link to post
Share on other sites
have fun dealing with dependency hell and a broken system. When you start mixing packages and source on a packaged based system, especially large amounts, you are going to break things.

True - however, using checkinstall creates a package from the compiled source, which gets managed by the package management software.

One of the advantages of apt-get is its handling of reverse-dependencies. This has me thinking though...

Installing apt-get on Gentoo, and switching the sources.lst to Gentoo repositories - will this screw up?

0

Share this post


Link to post
Share on other sites

Apt-get on Gentoo? Don't even bother.

But you can get emerge on Debian: http://packages.debian.org/etch/apt-build ;)

To make sure you are keeping dpkg, dselect, and the dpkg cache happy, you need to follow the official documentation that all Debian package maintainers must follow before uploading packages to the repositories. If you follow this documentation you should be just fine when it comes to keeping things organized once they have been installed.

http://www.debian.org/doc/manuals/maint-guide/

More importantly: http://www.debian.org/doc/manuals/maint-gu...ch-dreq.en.html

You must create the required files so that dependencies are handled automatically. Otherwise you are just creating a debian archive that zips your compiled binaries to the default directories. (you might as well skip make install and just tar up the build directory) The control, rules, and changelog files are very important if you are going to be recompiling software with different features enabled/disabled.

What Ohm said about grabbing the sources with apt-get is just the method of grabbing the source code. ( apt-get source <package> ) But using apt-get to grab the dependencies will give you the binaries of the dependencies. If you were going to do this the Gentoo way, then this isn't what you want. At this point you might as well turn to the Debian From Scratch project.

Here is an article explaining the basics of what DFS entails, http://www.linux.com/articles/41627

This method of installing Debian is very much like the Linux From Scratch project, but it has very very minimal documentation. Here is some of the docs,

http://people.debian.org/~jgoerzen/dfs/html/dfs.html (Google should have more info, just scattered)

If you want a source distro, use a source distro. You will find a lot of difficulty trying to get a binary distro to act as a source distro.

With that being said, I am trying to be unbiased here, since I am a bit of a Debian elitist :roll: . You should probably refrain from speaking of this thread on irc.debian.org.

Edit: Spelling

Edited by Alk3
0

Share this post


Link to post
Share on other sites

Alk3 - Excellent post, that was the exact solution I was looking for. Thanks a lot

0

Share this post


Link to post
Share on other sites
Alk3 - Excellent post, that was the exact solution I was looking for. Thanks a lot

Hey! no problem! If you need any help send me a PM.

I should have posted that in my first reply, but it was 4:30 am and I was tired as $#*&. :lol:

0

Share this post


Link to post
Share on other sites

Check install does a really shitty job of building packages. It'll make packages correctly that don't need to have anything special done to them, ie. symlinks made, special permissions set, fixing permissions from the tarball, but when you want to upgrade to a newer version, add patches, or there is no DESTDIR support in the Makefile it totally breaks.

0

Share this post


Link to post
Share on other sites
Check install does a really shitty job of building packages. It'll make packages correctly that don't need to have anything special done to them, ie. symlinks made, special permissions set, fixing permissions from the tarball, but when you want to upgrade to a newer version, add patches, or there is no DESTDIR support in the Makefile it totally breaks.

checkinstall is great for making quick packages to test stuff... But the tools i prefer are dh-make and debhelper. They are a little more complicated, but they meet all the requirements to create a correctly built Debian package.

Edit: I forgot to add dpkg-dev :)

Edited by Alk3
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0