How to solve the Mac OS/X “stub file and library file out of sync” problem

UPDATE: Multiple people have reported in the comments that the recent update to MacOS 10.13.6 has produced the same issue for them, and that the procedure below has not addressed it this time. However, this OS update didn’t leave my system with any ill effects. If you’ve experienced this and have found a solution, would you be willing to leave a comment at the bottom summarizing the solution? Thanks.

I ran across this annoying little problem while compiling Go code on my Mac. I just spent the last hour or so scouring Google results trying to find the answer, and eventually pieced together a solution. (I’ve been spending a lot of my time recently studying GoLang, which will undoubtedly make additional future appearances on this blog.)

The issue is lines of the form “warning: text-based stub file TBD-file-path and library file library-file-path are out of sync. Falling back to library file for linking.” Sometimes a lot of such lines.

While these messages are warnings and can safely be ignored, they’re awful annoying. And they clutter up the build output, possibly obscuring useful warnings that we really need to pay attention to.

Unfortunately, figuring out why the files were out of sync and how to re-sync them was not a trivial task. (It should have been. Apple? Are you listening?) This seems to be the result of a bug in Apple’s developer-tools installation. I spent the last hour piecing together a simple-but-nonobvious solution, and am recording it here for posterity (and in case anyone else would like to try it out). Continue reading

Posted in Uncategorized | Tagged , | 43 Comments

My Recent Posts at The Perl Shop Blog

I also blog over at The Perl Shop Blog. Most of what I write about Perl anymore is over there.

My recent pieces include: Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Subclassing vs Embedding in GoLang

This is a topic that I’ve seen pop up in discussions and articles about Go. The Go programming language does not support inheritance, but instead it supports composition via “embedding.”

It can be a little hard to grasp the difference. This is especially so if you’ve worked in a language like C++, which implements inheritance by (literally) embedding the superclass object within the subclass object.

However, the semantics of Go’s embedding fail to support inheritance in important ways, and there are other Go features and idioms that we use to implement inheritance semantics (or something like them). Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Finishing Off that Bug in djangocms-picture (part trois)

In the prior episode of this story, I had written a test to detect the bug I want to fix. The djangocms-picture plugin includes errant whitespace inside of HTML anchor tags, which renders as annoying blue underlines next to the images.

I had also discovered why my test didn’t fail as it should have, because Django’s assertHTMLEqual() doesn’t detect all semantically significant whitespace differences. I’m sure it seemed a good idea at the time. But sorry, that’s not working for me.

Fortunately, it’s not that difficult to redesign assertHTMLEqual(). Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Still Fixing that Bug in djangocms-picture (part deux)

Last time, I began fixing a fairly simply space-within-anchor-tags bug in djangocms-picture.

I’m using this exercise as an opportunity to (a) try out a disciplined development process in the context of a Django application and (b) dig into the Django and Django CMS APIs.

This involves writing a failing test against the existing plugin rendering code, seeing it fail, fixing the bug, and then seeing the test pass.

My experience so far with this framework has not been as stellar as I had originally thought it would be. Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Fix that Bug in djangocms-picture

I mentioned a couple fundamental issues off the bat with my website revamp using Django CMS.

I’m in the process of revamping my hub site, I had created a barebones site: only a single page of content, two columns (using djangocms-column), and a row of social-media icons (using djangocms-picture). I only made minimal changes to get it “good enough for now.”

There were still a couple unresolved issues, even before any serious theming, one of which was that the social-media icons are rendering with small, blue underlines in between. Before theming the site, I’d like to deal with this irksome quirk.

But oh! I thought, This also presents a perfect opportunity to apply my standard dev process to a Django project! Let’s go! Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Website Revamp to Django CMS

It was long past time to redo my hub site, It had been running Drupal for far too long. I won’t tell you what version. Suffice it to say that the version had been unsupported for quite some time before I finally decommissioned it.

Rather than upgrade to a new version of Drupal, I chose to revamp the site and move to Django CMS. Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

How to Cheep in Many Programming Languages (not a tutorial, but a spiritual journey)

I have a small problem.

The first part of the problem is that I’ve been a Perl developer for the past decade—

That came out wrong. Let me start again.

I have a small problem.

The first part of the problem is that I’ve been enjoying Modern Perl for the past decade while not learning any other programming languages. Don’t get me wrong: I love Perl, and I love programming, and I love learning new things. But since 2006, I’ve mostly been focusing on personal growth. Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

The Most Powerful Programming Paradigm in the World?

Cornell Facebook Camp Hackathon
Photo by Benjamin Golub

I’m not a hackathon kinda guy. I don’t get off on solving hard or novel problems. I don’t believe in contests. I’m not particularly energized by the idea that a whole bunch of us are trying to solve the same problem at once— I do believe in community, and I appreciate being able to interact with other developers, but on a different level than just getting into the same (virtual or physical) room together, eyes to the computer screen.

So why then did I participate in the Dallas/Fort Worth Perl Mongers
Winter 2013 Hackathon? Continue reading

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Mopping up with Perl

30 Ways to Shock Yourself #2,
photo by Bre Pettis,
from the book Elektroschutz in 132 Bildern

I ported my Hackathon entry to the latest Perl dev release (5.19.9), the one with built-in sub signatures.

I had originally designed it using the latest p5-mop and Алексей Капранов’s (Alexei Kapranov’s) signatures package. (I thought this was more in the spirit of mop than Sub::Signatures.) And that worked fairly well, with only a few glitches, and only a few complaints. But since sub signatures are now available (Yay!) in core (No hiding how I feel about that, eh?), it seemed a good time to bring the experiment fully into the present.

And here are some discoveries from my experiences with Perl mop+signatures. Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment