Benifits of compling a program on bsd rather than getting a exicutable
*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Well in general, the benefit of compiling versuses getting a binary (by the way, all executables are not necessarily binary data, and all binary files are not necessarily exectuable) is that it will be more customized to it's environment. There might be special compiler options used by the compiler on your machine to work better with your OS/achitecture than just accepting a generic binary that is compatible.
In practice, there's usually very little difference. I've heard that benchmarks of Gentoo (a "compiling everything from source" OS) are little different than those of Debian (install from binary packages), and in some cases even worse.
If the defaults of the package are acceptable, it's probably easier to install from package. If you want to change the defaults, then you probably need to build from source. The *BSDs (well, Free|Net|Open) all have the package/ports system where you can build software from source, using predefined rules (the ports system). You can pass arguments to make in order to make changes from the default behavior.
The other benefit to using the ports system: Dependencies. If you keep your ports up to date (quite easy with cvsup and portupgrade), you have very few issues installing from ports and you don't have to find depencies, it will download and install any dependency you have for a given app.
There is a lot more than time that is important to think about. A good, managed, and updated ports system means you compile your apps based on your system (if you set the right flags in make.conf - and compile your own kernel - which is very easy to do in FreeBSD.) and also it handles how and where your applications are installed (you can always install using your own prefix). So when you go to uninstall or update, it knows where eveything is in a ports db.
The other thing is FreeBSD also has a package system for precompiled binaries. You can install them during OS installation and update them as easily as the ports system. But imo installing from ports is one quick way of installing apps ( I never ran into anything that took very long, unless it had a lot of dependencies and it was a fresh install.).
I personally would install source over a package, doesn't take much to type: make install clean and walk away for a little bit, or surf the net.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
People keep talking about the ports system as being a FreeBSD-only thing, but OpenBSD and NetBSD have it too!
I choose to build everything from ports on my OpenBSD and FreeBSD systems. For OpenBSD I have multiple boxen, so I build the port on one box and use the binary package to install on the others (the package that was built when I ran make in the ports system).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.