Archive for July, 2011

OpenCV for Android: Cannot find your ndk root directory!

Attention Conversation Notice: This problem can be solved by changing the line which reads –

set(NDK_ROOT  "$ENV{HOME}/android-ndk-r4-crystax" CACHE STRING "the crystax
ndk directory")

– to whatever your actual Android NDK directory is. (In my revision of the CMakesList.txt, the above line is line 53, but that may not hold for all revisions.)

So I’m working on a project for which I want to use OpenCV for Android. But when building one of the older revisions that is CMake compatible (following tutorial here) I ran into a problem where CMake spat out the following error:

Cannot find your NDK root directory!

So I updated $NDK_ROOT in my .bashrc and resourced. Ran CMake again, ran into the same problem. I messed with the path a bit, moved my NDK to a path without spaces, messed with quotes and escape characters in .bashrc, etc.

Then I opened up the CMakeLists.txt file and found this lovely little piece of bullshit:

set(NDK_ROOT  "$ENV{HOME}/android-ndk-r4-crystax" CACHE STRING "the crystax
ndk directory")
message(FATAL_ERROR "Cannot find your ndk root directory! please download and 
unzip the android ndk from crystax to the directory specified by NDK_ROOT
You may download the crystax ndk from:" )

Yeah, CMakeLists.txt was redefining $NDK_ROOT right before checking if it pointed to a valid path. This means that if you didn’t read the mind of whoever put the CMakeLists file together and put the NDK right where they thought it should go, well then you were shit out of luck. It completely ignores the NDK_ROOT variable set at the system level, redefined it to be what the developers THOUGHT it should be, then died when that folder didn’t exist. Then in the error message, it implied to the user that their NDK_ROOT didn’t point to the right folder.

Which, in my case, it fucking well did, thank you kindly.

The script didn’t just ignore the user’s path, substituting it for a hard-coded one, it then lied to the user about what the issue was.

I hope whoever created this chunk of programmatic excreta is ashamed of themselves.

Next Up on Extropian Story Time…

…it’s Nick Bostrom with his “Fable of the Dragon Tyrant“:

“Once upon a time, the planet was tyrannized by a giant dragon. The dragon stood taller than the largest cathedral, and it was covered with thick black scales. Its red eyes glowed with hate, and from its terrible jaws flowed an incessant stream of evil-smelling yellowish-green slime. It demanded from humankind a blood-curdling tribute: to satisfy its enormous appetite, ten thousand men and women had to be delivered every evening at the onset of dark to the foot of the mountain where the dragon-tyrant lived. Sometimes the dragon would devour these unfortunate souls upon arrival; sometimes again it would lock them up in the mountain where they would wither away for months or years before eventually being consumed.”

Definitely worth the read. If you want to help defeat the Dragon-Tyrant, please consider donating to the SENS Foundation or similarly worthy organization.

Cygwin – ‘: Not a Valid Identifier

I’m doing some work with Cygwin and I stumbled into this remarkably unhelpful error while re-sourcing my .bashrc.

‘: Not a Valid Identifier

To fix, run the following in the Cygwin bash prompt:

d2u .bashrc

This should clear up the issue. It’s caused by Windows-style endlines in the .bashrc. It’s not actually a single quote that’s causing issue, but the carriage return character (\r).

Two sides of blues rocker Jeff Angel:


Things Are Better Than You Think, Part 5: DBx on the “Stagnating” Middle Class

The average American worker can buy much more with his or her wage today than they could in 1975. Don’t believe me? Is your objection that mean or median wages have been roughly flat since then?

Here’s some excellent work by the economist Donald Boudreaux (who, hereafter, will be referred to as DBx, since I have a devil of a time spelling his name, and that’s how he shortens it) on the purchasing power of wages over the years. In it, he compares the price of a wide variety of goods between 1975 and today. But, in a masterfully clear-headed stroke, he expresses these prices not in nominal dollars, or even inflation-adjusted dollars, but rather in terms of the number of hours of labor the average American wage earner would need to invest in order to purchase the product.

The results are illuminating.

DBx’s post, presentation, and linked explorations of the Sears catalog (which are all well worth your time) all point to one of the most important things that gets lost in economic debates: wages don’t really matter. (This goes doubly so for that ridiculous shibboleth of populist shit-stirrers: “income inequality”.) What really matters is not the number of bartering tokens a person trades their time for, but rather the amount of tangible goods they can turn those tokens into. In other words, what matters isn’t wages, but purchasing power. I would be thrilled if, over the next 10 years I received a 50% pay cut, but the cost of all goods dropped 90%. That would increase my purchasing power by a factor of five!

And yet every discussion of the American economy is mired down in this ridiculous fallacy of equivocation that insists that money is wealth, when really, it’s nothing but a token for deferred barter. Money is not wealth, the goods and services that it buys are wealth. Money is only potential wealth. (Potential, in this case, meant in the same sense that a skier at the top of a slope has a great deal of potential energy.)

But enough of my mutterings. Go read DBx’s work. He typically makes my point twice as well in half the number words.

And remember: Things Are Better Than You Think

I had dinner tonight with my good friend Jonathan Nicholson who reminded me that he has a new album out that I hadn’t heard yet. He’s making it available for free through a number of venues, including via SoundCloud.

Here’s me favorite track off the album so far. It’s called “Love Letter at the Bottom of the Sea”:

Love Letter At The Bottom Of The Sea by Jonathan Nicholson

RIP Amy Winehouse

As many of you have probably now heard, Amy Winehouse has joined the 27 Club.

There’s a lot of snark and self-importance being spewed about the event at the moment, which I guess is to be expected. For someone so publicly addicted to narcotics to die of a drug overdose is bound to bring out ghoulish pettiness in some people.

I strongly recommend that, instead of reading holier-than-her bullshit (which, I’m sad to say, some of my favorite writers on music and culture have decided to indulge in), you read this touching essay by Russell Brand.

And to understand why her music was worth caring about, check out this video of her performing “You Know I’m No Good” live for BBC One:

And then, for a better sense of her raw vocal talent, watch this video (embedding disabled) of an sparse, acoustic version of her performing “Valerie”.

Requiescat in pace, Ms. Winehouse. Your talent will be missed.

Mencken vs. The Philistine

He was not so much hostile to beauty as devoid of any consciousness of it; he stood as unmoved before its phenomena as a savage before a table of logarithms.

-H. L. Mencken, “Puritanism as a Literary Force”

Women and Wolves, we’ll all end up in prison

I just stumbled across this unreleased recording of Echo & the Bunnymen doing their song “My Kingdom” during their Peels Session. Apparently it was cut from the album made of the session, which is a real pity. I love this tune and I love this version way more than the one that ended up on The Cutter.

Will Sergeant’s guitar hooks fucking slay me. And layered over top of those heart-breaking bass lines? So god damn good.

And Ian McCullough’s vocals. Seriously, how can one man sound simultaneously so insane and yet so passionate and lucid? Fucking perfect. There are nights when I just want to listen to tracks like this forever.

Just EATB and the Cure until the heat death of the universe.

Keeping Dry in the Future

My friend Jonathan recently sent me a link to this article in which Bryan Caplan mentions “ideas behind their time.”

Surely this is one such idea. Living as I do in oft-rainy Seattle, I’m sore tempted to get one.

Return top

Magic Blue Smoke

House Rules:

1.) Carry out your own dead.
2.) No opium smoking in the elevators.
3.) In Competitions, during gunfire or while bombs are falling, players may take cover without penalty for ceasing play.
4.) A player whose stroke is affected by the simultaneous explosion of a bomb may play another ball from the same place.
4a.) Penalty one stroke.
5.) Pilsner should be in Roman type, and begin with a capital.
6.) Keep Calm and Kill It with Fire.
7.) Spammers will be fed to the Crabipede.