July 18, 2012
So, if you are using MacPorts' version of Perl on Mac OS X, and you're using the new versions of XCode, you may be seeing this error when trying to build modules:
Unresolvable missing external dependency.
This package requires a C compiler.
"Bullshit" you'll say to yourself. "I've installed Xcode, that shit is SO there."
Well, yes, but that's not the problem. The problem shows itself rather quickly if you run
perl -V against the MacPorts version. You'll see this:
The problem is, with the way Apple now ships Xcode, there is no /Developer. llvm-gcc-4.2 is now in
The workaround is pretty easy, just symlink /Applications/Xcode.app/Contents/Developer to /Developer and MacPorts' Perl is now happy. What whomever the MacPorts maintainer is needs to do is build perl ala Mac OS X so that you get
cc='llvm-gcc-4.2' when you run perl -V
I did report the bug in the main MacPorts trac system. I'm not even going to try to fix the build myself, I know where my skills end. But at least if you're running into this, you have a workaround.
So as it turns out, actually seeing this problem may be somewhat hard. It looks like you may have to have done the "original" perl install with the "old" developer tools. Perl would then hardcode the path to the compiler when you did the initial build/install. Presumably, removing/reinstalling perl will fix that.
I'd still like to see Perl under macports not hardcoding paths to things at all, (if possible.) Doing such things may save time at one point, but it's pretty rare that it doesn't bite you, or someone else in the ass later on.
CommentsWarning for Notes users: The commenting system uses HTML.
I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar characters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.