Given some applications that can be installed natively as well as through MacPorts (such as MacVim, iTerm2, Gimp, etc.), what are pros and cons for choosing one installation method over the other?

  • Rather than opening this up so widely, would you care to hone in on a problem you are facing. If you had a concrete example, it might be easier to answer and also get better support from the community. – bmike Nov 1 '12 at 15:53
  • 1
    What if you rephrase the question as "Why would a user of software (particularly Applications for Mac OS X) build from source, rather than downloading a pre-compiled binary or disk image (.dmg)?" I still don't know if AskDifferent is the place to ask that question, but I have a hunch that the altered phrasing would be better received. – Josh Tilles Nov 1 '12 at 17:31
  • What site would you suggest I ask questions about MacPorts on? – Ryan Jarvis Nov 1 '12 at 22:50
  • This is the best place - just that softer questions that in essence ask "let's talk about X" and "what are the best" where anyone's answer can be equally valid tend to need a really great answer to save them lest everyone with an opinion tries to answer it. I didn't close it since the community could like it - help keep it on track and objective - just wanted to help guide it to a good spot. @drfrogsplat has stepped up and really delivered a good piece that hopefully was along the lines of what you were seeking. – bmike Nov 2 '12 at 3:30
  • Thanks. I had hoped this would be an acceptable phrasing since I saw other questions that began with "What are pros/cons..." that were accepted. And my intention is to look for tangible facts rather than abstract opinions. – Ryan Jarvis Nov 2 '12 at 23:19

Installing Natively

If the developer releases pre-built binaries for your OS, then this will likely be the quickest, easiest and most up-to-date (in terms of the application itself) method of getting an application. This relies on the developer (or some trusted third party) to be keeping the builds up to date with changes in both the application and in Mac OS X (e.g. rebuilding against the latest Mac OS X SDKs as they are released).

One downside is you are trusting whoever built it not to have maliciously modified the source before doing so, and/or whoever is hosting/mirroring the download not to have done the same. Generally a non-issue, but that's why there are often MD5 checksums for downloads.

A possible downside is that you don't have control over which version of any dependencies the developer builds against (e.g. for things like Python, or the C++ STL, or OpenSSL). For example, if they build against native Mac OS X SDKs, these are generally a little behind the current versions of most libraries. They do get updates, but not necessarily very quickly (except in some critical security situations), as Apple need to do their own QA/testing before they can include updates to libraries they bundle with the system.

Some developers may include the latest libraries in their application bundle, especially if they rely on new features of said library which haven't yet made it into the base Mac OS X set. Basically, you can't control this, so it may/may not be a downside.

Building from Source Manually

This might come under 'installing natively', since its not macports as such, but basically means getting the latest source, and building it yourself against 'native' Mac OS X SDKs and/or your choice of versions of dependencies.

Advantages are that you're going to be building on your system, for your system, so all dependencies match your runtime environment and are the version of your choosing (e.g. recently updated to latest source to include bug fixes and security patches). Of course the obvious downside is you need to make sure you have all those dependencies (YMMV depending on the project).

You're also not needing to trust someone else's binary build (though you still want to make sure you've got the 'official' source code, without any chances of malicious modifications!).

Compared to installing from binaries:

  • Pro: You get more control of dependencies, you can choose to use the Mac OS X bundled libraries or your own builds of them (e.g. for things like Python, OpenSSL, libstdc, etc) ...
  • Con: ... but you have to manage the dependencies (obtain/configure/build/install), especially if there's no in-built version at all.
  • Pro: Runtime dependencies are definitely compatible, because you built against them...
  • Con: ... unless you change them later for another project!
  • Pro: You aren't blindly trusting someone else's binary build...
  • Con: ... but it may take much longer to build from source than simply downloading binaries

Installing from MacPorts

This is typically much like building from source, but much of it is scripted and tested by thousands of others, so you tend to have fewer issues getting projects to build. Further, MacPorts keeps track of all the projects you build, and their versions, and makes it really easy to check what's out of date, upgrade to new versions, switch between versions, etc.

Of course you're relying on the application/dependencies to be in MacPorts, which requires someone (possibly even you!!), to have made a MacPorts project for it. Also you're relying on the MacPorts project to be kept up-to-date with the original application, and likewise for the dependencies. If the MacPorts scripts aren't updated when new versions of the source are released, you won't get access to them.

Compared to Installing Natively from Binaries

  • Pro: You're possibly not relying on someone else's binary build (or if you are, it's at least checksum tested) ...
  • Con: ... but you may have to wait while MacPorts builds your project.
  • Pro: You will often have more current versions of dependencies than are shipped with Mac OS X ...
  • Con: ... but MacPorts will need to update/build them as you go, which can take a while.
  • Pro: MacPorts will often have newer versions of system libraries than Mac OS X...
  • Con: ... but this means it must build & install a second version of many base libraries, whether they're strictly needed or not.

Compared to building from source yourself

  • Pro: It's often much easier, just typing a single command, than obtaining/configuring/building/installing various dependencies ...
  • Pro: And MacPorts keeps track of all your versions, so its easier to make sure all your applications that rely on some common dependency are updated when you update it ...
  • Con: ... But in all cases, you're at the mercy of the port maintainers to keep ports updated, so it might be a little (or a lot!) behind some official releases of applications/libraries.
  • Con: ... And you can't choose between the Mac OS X bundled system libraries vs MacPorts re-building those libraries; it always builds its own if they're open source.
  • Jeez. Talk about making wine from lemons. Most people make lemonade, but this is a great write up. Wow. – bmike Nov 2 '12 at 3:27

Installing natively is often easier, but sometimes you have to wait a bit longer to get the latest version.

Not the answer you're looking for? Browse other questions tagged .