4

I have Slackware installed on my computer, and I install a lot of software from source. Now I want to install ffmpeg from source just to recompile it with some more options. But I already have ffmpeg installed on my computer, so what's gonna happen?

Is it going to overwrite my old install or is it going to create new files, and if so how can I differentiate between the two installed versions.

Also if there is a better way to recompile a programs on Slack let me know, because i'm very interested.

daisy
  • 53,527
  • 78
  • 236
  • 383
primero
  • 590
  • 1
  • 3
  • 9

3 Answers3

1

If you download source code (i.e. not packages from your distribution) it will typically contain a configure script which allows you to specify where to install the compiled software. This normally defaults to /usr/local. You can change this by using the following option:

$ ./configure --prefix=/foo

Not all software is done this way, but it's unusual not to be. Since your distribution installs software under /usr, it means you'll have two versions on your system. If you installed ffmpeg to /opt/ffmpeg, you'd just need to add the binary directory (probably /opt/ffmpeg/bin) to your PATH.

If you're really interested in source, take a look at Linux From Scratch and Gentoo.

teppic
  • 4,535
  • 1
  • 17
  • 17
1

If you use the configure, make, make install routine to install software under any Linux distro, then the new version will usually overwrite the previous. The only caveat is that if the newer version happens to change the install location or names of certain files then you may end up with the old version or parts of the old-version remaining on your computer.

For this reason, it is not advised to install programs in this way on Slackware. The recommended practice is to create a .txz or .tgz package which can be installed with the standard Slackware package installer installpkg. This also means that you can cleanly uninstall the package with removepkg or upgrade to a new version with upgradepkg. Many scripts for compiling and creating packages, including one for ffmpeg, can be found at SlackBuilds. Running the provided script with the sources in the same directory will compile and produce a .txz.

Most Slackware users make heavy use of Slackbuilds to install non-official software.

SigueSigueBen
  • 1,290
  • 12
  • 14
  • Thank you, this is the answer i was looking for. I thought it should work that way, and probably with `ldd` and `which` i can figure out the old install files location and with that info i can edit the Makefile. I'm tend to use sources for installs because it seems to me this way I understand the system better. – primero Sep 05 '12 at 07:41
  • The good thing about Slackbuilds is that you *are* doing a source install, but instead of installing to your HD, you are effectively install to a `.tar.gz`. When you install that file, it is the same as having done `make install` except that Slackware tracks which files you've installed and knows how to uninstall or upgrade. If you are interested in getting to know the system, I strongly recommend reading a `.SlackBuild` script to see how it all works. – SigueSigueBen Sep 05 '12 at 15:45
0

You can use make (without install) to compile the sources, test them etc pp. And then you can use make install to put the fresh build files to the system in general.

wolf
  • 486
  • 2
  • 6