Can fink and macports be friends ?
October 12, 2013 4:08 PM   Subscribe

Can the OS X package managers fink and macports be installed at the same time on the same machine ?

[Asking for a friend]

Friend has a Mac with OS 10.6.8 and with the Fink package manager currently installed.

Fink has been used to install a number of packages which the owner of the Mac wants to continue using.

Friend would like install Macports and use that as well.

Is there any reason why this should not done ? What risks are involved ?
posted by southof40 to Computers & Internet (7 answers total) 1 user marked this as a favorite
You can. I think you want to be a little careful to avoid duplicating stuff (because you'd lose track of which takes precedence in your PATH, at least if you were me, and not know which version of something you were using). There's some discussion of it here. (Some older macports vs fink discussions say they both install into /opt/local, but the last time I used fink (which wasn't that long ago), it definitely installed into /sw.)
posted by hoyland at 4:20 PM on October 12, 2013

hoyland's covered the common issues:

Your system $PATH variable should contain the correct directories, in the correct order (earlier directories take precedence over later directories).

You should be careful not to install the same package using both fink and macports. If possible, I would try to setup macports to install stuff in a completely custom directory.

You should also check out homebrew, which is what I and most of my techie friends use exclusively. It looks like it doesn't play nice with macports, though, so I would be cautious.
posted by yaymukund at 6:37 PM on October 12, 2013

You can, but you should be careful, especially if you use source builds on the fink side. I'm on the fink users list and there are regularly problems with fink pulling in something from /usr/local that it shouldn't during a build (/usr/local is a common, hardcoded include and lib path for many projects).

If you want to run both at the same time and use the fink build system you should always rename '/usr/local' to something else during the build, and then rename it back afterwards.
posted by sbutler at 12:10 AM on October 13, 2013

Might be mistaken here... looks like macports is /opt/local and Homebrew is /usr/local. So macports shouldn't cause a problem for fink in general, although I did run across python-ldap trying to pull in packages from /opt, so no guarantees.
posted by sbutler at 1:47 AM on October 13, 2013

You should also check out homebrew, which is what I and most of my techie friends use exclusively. It looks like it doesn't play nice with macports, though, so I would be cautious.

This is so. homebrew is cool but it doesn't like coexisting with macports at all.
posted by outlier at 6:29 AM on October 13, 2013

Best answer: Hi, I'm one of the project leads for Fink. There's no problem at all installing both Fink and MacPorts at the same time, I have them both installed right now. Fink will (by default) install in /sw, and MacPorts in /opt/local, though it's possible to change those. They're both pretty careful not to interfere with the other. As others have mentioned, homebrew is quite a bit less careful about this.

Most of the time, even the PATH concerns don't matter much. The only time it's important is if you want to run some program from one distribution and not the other. Eg: If the MacPorts version of qemu has a bug, and you need to make sure you only run the Fink version. In these cases, I find it helpful to make a directory in $HOME/bin, and put it at the front of your PATH. Then you could put a symlink to /sw/bin/qemu in there, to ensure it will take priority over the MacPorts version.

Oh, one more little thing that can cause trouble. Does your friend compile other Unixy software manually, outside of Fink and MacPorts? It's possible that those programs will end up dynamically linking against a combination of Fink and MacPorts libraries. Usually that works ok, sometimes it doesn't, sometimes it mysteriously breaks later on. I recommend that if you're about to do any such manual compilation, you first change your PATH in that terminal so it only references at most one of MacPorts and Fink.
posted by vasi at 8:15 PM on October 13, 2013 [3 favorites]

Response by poster: Thanks to all of you for your replies, I appreciate them and they're sufficiently reassuring that I'm going to suggest he gives it a go.
posted by southof40 at 2:25 PM on October 16, 2013

« Older Portland: Is there a bar where Detroit Tigers fans...   |   It'll be ONE sweet party! Newer »
This thread is closed to new comments.