Fink

From HerzbubeWiki
Jump to navigation Jump to search

This document contains information about Fink, a project that packages software so that it can be built on Mac OS X using the "Developer Tools" (or "Xcode Tools") environment provided by Apple. Some - but not all - of the software packages are also available in pre-compiled binary form so that the end user does not have to install said Developer Tools, although these binary packages are often of older versions of the software.

Also see MacPorts for an alternative project with the same purpose of Fink. MacPorts often has newer package versions than Fink; luckily it can co-exist with Fink on the same system.


Documentation

  • FAQ (I mostly use this document when I don't remember how to install or update fink)


Installation

Fink tries to keep out of the way of Mac OS X as much as possible, so as not to disrupt the normal operation of the OS. The major point here is that Fink installs all its files in a special location on the file system, the folder

/sw

In theory it is possible to choose a different directory (e.g. /usr/local/fink), however /sw is canonical and a lot of documentation and sometimes even software rely on this location.

The easiest way to install a basic Fink environment is to download the installer disk image from http://www.finkproject.org/download/ and follow the quickstart guidelines on the same page. I personally prefer to have the following software installed on a system before I start with Fink:

  • Apple Developer Tools
  • X11. Either install the version provided by Apple, or use something newer from the XQuartz project. If you have no compelling reason to do otherwise, you should use Apple's version because it is the official thing. I usually install XQuartz because I want to run the latest version of The Gimp, which usually requires a newer version of X11 than the one provided by Apple.


Unstable distribution

To switch from stable to the unstable distribution, run

fink configure

and answer the question about turning on unstable with "yes".

If the question does not appear, manually edit /sw/etc/fink.conf so that the "Trees" line looks like something like this:

Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

After enabling the unstable tree, you must still download the package descriptions:

fink selfupdate


Fink and X11

I recently installed Fink from scratch (package manager version 0.28.6, distribution version 0.9.0/selfupdate-rsync) and the first thing I installed was the package digikam. In the process of installation, Fink said the following:

Fink X11 startup framework needs to replace following file:
/usr/X11R6/lib/X11/xinit/xinitrc
to a copy of following file:
/sw/share/xinitrc/sys-xinitrc-fink

If you customized it and don't want it to be replaced, say no here and
modify it properly. Note that you can achieve many of what you want
via some hooks in /sw/bin/xinitrc.sh. Alternatively, you can
also bypass our standard mechanism by creating following file.
/sw/etc/xinitrc-override

If you don't know what all of this is about, just say yes.
If the system-wide xinitrc alredy exists, a backup is made. Don't worry.

Do you want to continue? [Y/n] 


Troubleshooting

Buildlock problem

Quoting from the Fink project page:

The dependency engine used by fink is not perfect. Sometimes if you request a build that entails many other builds or have a single fink command build many packages at once (for example, fink update-all), it will try to build a package with the wrong dependencies installed. The crash will tell you which package fink was trying to build at that moment: try to have fink build just that package, which will usually succeed, then you can retry the original command that led to the crash. Note that for complex build requests, you may have to go through several iterations of build-a-package/retry-the-whole-set...each time you will get further through the process. Packages whose builds had succeeded before the crash will not need to be rebuilt.

For details see http://wiki.finkproject.org/index.php/Fink:buildlocks (the page that the above quote was taken from, accessed January 11 2009).


Change mirror configuration

In my experience fink mirrors are unreliable, in fact one of the major issues I have with fink is that simply downloading the required packages often does not work unsupervised. In some cases I had to manually download certain files and dump them in /sw/src.

To change the current mirror configuration, with hope for better luck, issue this command

fink configure

This reconfigures all of fink, but you can just step through the questions and accept the default answers to leave the current settings unchanged. As of fink 0.29.9, the mirror configuration is the last thing that you are offered for reconfiguration.