Posts Tagged ‘macports’

Faking 10.4U SDK for MacPorts

Thursday, June 12th, 2008

Since 10.5.3 a lot of software installed with macports has broken. One way to get it working again can be to reinstall with the option +universal, eg:

sudo port install erlang +universal

Unfortunately, if, like me, when you installed the Developer tools on 10.5, you unchecked the 10.4U SDK option because you didn’t think you needed it, you might see something like this:

$ sudo port install erlang +universal
Error: Error executing universal: MacOS X 10.4 universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail
Error: Unable to open port: Error evaluating variants

The good news is you don’t need to go find your disk, you don’t actually need the 10.4 SDK if you have the 10.5 one installed .. and you might not even need that. But it’s hardwired to check for it, so fake it out like this:

$ sudo touch /Developer/SDKs/MacOSX10.4u.sdk

Now it will work.

$ sudo port install erlang +universal
--->  Fetching erlang
--->  Verifying checksum(s) for erlang
--->  Extracting erlang
--->  Applying patches to erlang
--->  Configuring erlang
--->  Building erlang with target all
--->  Staging erlang into destroot
--->  Installing erlang R12B-2_1+universal
--->  Activating erlang R12B-2_1+universal
Error: Target org.macports.activate returned: Image error: Another version of this port (erlang @R12B-2_0) is already active.
Error: Status 1 encountered during processing.
$ sudo port deactivate erlang @R12B-2_0
Password:
--->  Deactivating erlang R12B-2_0
$ sudo port activate erlang @R12B-2_1+universal
--->  Activating erlang R12B-2_1+universal

God knows why it wants +universal but hey, works.

PostgreSQL macports upgrade destroyed data

Friday, March 28th, 2008

A little reminder for me today of a few things:

1. Don’t install important things like databases via convenience systems like macports
2. If you do, keep very good backups.

Luckily, although I’d neglected 1, I hew very closely to 2 so I didn’t lose anything. But I’m pretty astonished that an uninstall/reinstall of a port destroyed user data - totally unacceptable.

Be careful with what you install via port systems. For convenience, they’re wonderful. But don’t trust them with your data, and BACKUP!