LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Pros/Cons Installing from Source vs packages (http://www.linuxquestions.org/questions/slackware-14/pros-cons-installing-from-source-vs-packages-868656/)

telemeister 03-15-2011 03:17 AM

Pros/Cons Installing from Source vs packages
 
I think a fairly basic query that I don't fully get.

At work / home / laptops I have about 5 slackware machines. I have always tended to install new packages on each machine from source, generally using slackbuilds when available.

I thought I would try 'libreoffice' and reading alien-bobs blog I deduced that a full from source install might be pretty difficult, so I followed his advice and just took the package (.txz file) and used installpkg. To my slight surprise this installed and ran perfectly.

Now I'm wondering if someone would clarify under what circumstances you can just take the slackware package from one machine to another and install.

More generally I guess what are the main advantages of building from source. Is it mainly about availability of all the required dependencies?

Thanks for any clarification.

Daedra 03-15-2011 03:34 AM

Installing precompiled binaries is generally perfectly safe if they come from a reliable source. Anything from Alien Bob or Robby Workman is perfectly safe (there core team members after all). www.slacky.eu is also very reliable. As far as building a package from source and then installing it on other machines you should also be fine as long as the archs are the same. Most slackbuilds use c/c++ flags that are designed for compatibility and not aggressive optimizations. This makes the resulting package more compatible across a wider range of systems. There should be no problem when building a package from source and then installing the resulting package on your other machines, as long as the CPU architecture is the same and you've met all the required dependencies of the package.

Smokey_justme 03-15-2011 03:52 AM

This seems like an interesting subject...

Basically, from my point of view and experience installing from source usually has more dependencies than binaries so that's not the advantage. Furthermore, you actually install Slackware from binaries packages (already compiled packages). Actually installing directly binary packages is on many occasions a very good thing...


Now.. Pros on installing from source (by compiling on your own machine):

1. And this is really important... When you install a binary package your system might (and usually has) different versions of libraries from that of the compiler (and here I mean the person that compiled and created the package). Of course, this isn't such a big deal when taking packages from Alien Bob or any other guy that compile in a stable release and documents all other dependencies...

2. This is also important... When installing from source you know what YOU are compiling and installing. There's no patch that breaks more things than it repairs...

3. Options... A lot of the bigger programs/utilities have different functionalities that may be enabled or disabled at compile time.

And cons:

1. It takes time... But that's why packages exist... There is no sense in repeating the build unless you really need to change things or put it on a really different system.

2. Some programs have exhausting compile dependencies ... It's easy to screw things up when compiling such programs.

3. Well... it takes time... :))

Again.. this is just a list based on my point of view and experience. Also, when running into trouble, I've found it more easy to discover the problem when building from source.

tdos20 03-15-2011 06:51 AM

I've occasionally had to recompile packages to link them with new libraries - for example running JACK which is no longer included in slackware I had to recompile xine-lib to enable the JACK output - this wouldn't have worked using the package but did work using the slackbuild and sources.

tronayne 03-15-2011 08:49 AM

Over many -- actually too many -- years of building software from scratch I've had the idea that compiling on the hardware it's going to run on is beneficial. Well, maybe it is in some little tiny way (like you might go a microsecond faster or some such nonsense) but the concept has proven itself to be more trouble that it's worth (almost always). I've become convinced (by not having one lick of problems) that Slackware binary packages from reliable sources (as mentioned by others above) are perfectly fine. Installing from a SlackBuild, perfectly fine. Installing using Src2Pkg (oh, so much easier than configure-make-make install!), perfectly fine. I've got multiple servers, doing it once and installing a package on every box, well, beats the heck out of fiddling for, sometime, hours (the only downside is that there are two 64-bit boxes and three 32-bit, but that's progress, eh?).

With the combination of tools we have available I vote for pre-built, SlackBuild and Src2Pkg and get on with life.

Hope this helps some.

dive 03-15-2011 09:15 AM

Quote:

Originally Posted by tronayne (Post 4291475)
Installing using Src2Pkg (oh, so much easier than configure-make-make install!), perfectly fine.

Do you know sbopkg? www.sbopkg.org

tronayne 03-15-2011 11:12 AM

Quote:

Originally Posted by dive (Post 4291501)
Do you know sbopkg? www.sbopkg.org

Yeah; however, I do stuff that isn't of enough general interest for SlackBuilds.org or Slacky.eu so I need to build my own every so often (mostly having to do with maps and GIS -- not too many folks care about that kind of thing). I always look first and if what I need is there, hey, all done. Otherwise it's build it myself.

ottavio 03-16-2011 04:49 AM

If you like to install packages from source, why don't you install netbsd's pkgsrc:

http://kuparinen.org/martti/comp/sla...slackware.html

For an overview of pkgsrc: The NetBSD Packages Collection:
http://www.netbsd.org/docs/software/packages.html

Richard Cranium 03-16-2011 05:57 AM

Quote:

Originally Posted by ottavio (Post 4292353)
If you like to install packages from source, why don't you install netbsd's pkgsrc:

http://kuparinen.org/martti/comp/sla...slackware.html

For an overview of pkgsrc: The NetBSD Packages Collection:
http://www.netbsd.org/docs/software/packages.html

Or I could just run Gentoo. :rolleyes:

w1k0 03-16-2011 06:20 AM

Let me to describe my method of maintaining Slackware...

When the new version of Slackware arises I download it as well as all new versions of SlackBuilds.org packages I use.

After installing Slackware on my primary machine I run a bunch of my own scripts. These scripts prepare accounts for my users, configure the system, the network, and X Window as well as improve the security of the system. Next I install the additional programs I got from SlackBuilds.org.

In result I have fully installed and customized system. I backup it using tar and gz and restore on the secondary and tertiary machines I own. To run the system on these machines is usually enough to reload LILO because all my machines use the same structure of the partition table. As the final touch I run on these two machines the script changing machines names and local IP addresses.

So I don’t have to manually customize the system and I don’t have to compile and install the same programs on different machines. It saves a lot of time.

First remark: when I change some setting in my system I don’t modify the configuration files manually. Instead of that I add the appropriate procedure to the one of my scripts and then I run it. In result the complete set of my scripts reflect the configuration of my system. So when I run these scripts on the newly installed system I get the fully customized system.

Second remark: when I need to install in my system the program unavailable in SlackBuilds.org I write my own SlackBuild script and I use it to install that program. As for more important programs I submit my SlackBuild scripts to SlackBuilds.org in order to share it with the Slackware community.

Third remark: to install Slackware and SlackBuilds.org updates I use slackpkg and sbopkg.


All times are GMT -5. The time now is 04:34 AM.