Present Perfect


Picture Gallery
Present Perfect

Pay to Play

Filed under: General — Thomas @ 10:40 pm

10:40 pm

A one-acter to be performed in a square-shaped room with unopenable windows


a dashing young man with an autistic hang-up on quality in all the wrong places
an IRC bot insulting people who break the build, and praising those who fix it
Dorkus Molorkus
a big-haired hacker sitting opposite of Thorsten
an interesting little CVS module giving home to libgstreamer.so and libgstbase.so
an intern with a craving for cheese caught in the crossfire
the GNU toolchain
a collection of useful tools evolved through combinations of genetic programming and bacterial cultivation techniques
another CVS module depending on gstreamer and providing libgstaudio.so and containing a plugin called libgstximagesink.so
Hens Jamestridge
a wise hacker secreting years of experience into little pearls of information somewhere south of the equator

Curtain opens and light is cast on a dashing young man with an autistic hang-up on quality in all the wrong places.

On an eternal quest for cleanliness, Thorsten finds some code that does not correspond to his sense of aesthetics. He commits a bunch of code that changes gst_audiosrc_ to gst_audio_src_ all over the place.
Some time later, Hobbit makes an innocent change to some documentation and commits. Until suddenly …
Hedonism: Go eat some cheese instead of committing, Hobbit. You broke the build of gst-plugins-osx
Hobbit: (grunting) Merde, stupid bot. Why are you complaining to me ?
Thorsten and Dorkus exchange some unrelated pleasantries refering to their mothers. Half an hour goes by.
Hedonism: Wouldn’t you rather work on MPlayer, Hobbit ? You broke the build of gst-plugins-osx
Hobbit: (grunting) Die, hedonism. I didn’t break anything, you’re the one who’s broken.
Thorsten: (looks up and investigates actual problem). Hm, this is strange. The documentation is complaining about gst_audio_src_get_type missing. I changed that name this morning. (tries locally, things work). Hm. I’ll force another build. Hedonism, build gst-plugins-osx.
Hedonism: building gst-plugins-osx. I’ll holler when it’s finished.
Time passes. Dorkus makes another reference to Thorsten’s mom, followed by:
Dorkus: personal note – 14.43 – Thorsten seems unaffected by repeated references to his mom.
Hedonism: As a penalty for your actions, beers are on you, Thorsten. You broke the build of gst/plugins-osx.
Thorsten: (looks at build log) Hm, still complaining about the same thing. This doesn’t make any sense. libgstxvimagesink.so seems to be missing gst_audio_src_get_type, but I know it’s in libgstaudio.so because I made that change and it works fine here. I sure wish I could log into that build slave. Let’s check the other slaves. (investigates unstable slaves). Oh, this 32-CPU build slave seems to have the same problem. (logs in, runs make manually). Yep, fails. What to do now ?
GNU toolchain: (whispering)
We are a collection of useful tools evolved through combinations of genetic programming and bacterial cultivation techniques. Use us !
Thorsten: … but, (h pronounced gutturally, as if being a Barcelonan waiter) hhhhhow ?
GNU toolchain: (whispering) using ldd on libgstximagesink.so will show you what libraries the plugin is linked against.
Thorsten: (tries the command) Huh. it’s linked against an installed copy of libgstaudio.so, in the prefix. Why would this happen ?
GNU toolchain: (whispering) Order. Order.
Thorsten: What’s that ? I can’t quite make that out.
Dorkus: (running his hands through his hair, making it even bigger than usual in the process) Your mom can’t make out. HAH ! (puts up arms defiantly in the classic Vanilla Ice pose but putting up his fingers in a traditional metal gesture)
Thorsten: (ignoring Dorkus) Curse you, libtool ! You are Sithspawn.
GNU toolchain: (whispering) We are powerful. But we can only be wielded by those who are worthy.
Thorsten: I shall not be thwarted in my quest for quality. I will seek out the writings of Hens Jamestridge on the intarweb and reach enlightenment ! (starts seeking out writings)
Hens Jamestridge: (a complicated explanation best summarized in http://advogato.org/person/jamesh/diary.html?start=175)
Thorsten: (reading it over nine times in the hopes of understanding it) Hm, this looks related to my problem, but I can’t tell for sure. It seems that somehow this plugin is being linked to an installed copy of libgstaudio.so from before my Quality change. Strings on that installed copy confirms it’s still the old version. Of course, the buildslave will not – and should not – install the new version until it’s satisfied that this new version builds properly. Verily, this is a deadlock ! What to do ?
Thorsten: (goes to the toilet for a quick thinking break, taking along a magazine that just happens to have an article on the new libtool 2.0 release, proving that God doesn’t play dice. Sadly the article is short on details. Thorsten flushes and washes hands, then goes back.)
Thorsten: (reading over Hens’ article a tenth time). Hm, so the -L flags affect the library lookup path – I knew that much. Maybe that is my problem here ? (looks at build output and linker flags). Ah, yes – there’s a -L flag for the prefix right at the start of the link line. Where is that coming from ?
Hedonism: I find your lack of skill disturbing, Hobbit. You broke the build of gst-plugins-osx.
Hobbit: (grunting) #(*!&$ Get lost, stupid bot. (Hobbit kicks bot, but has no ops). Grrrr.
Thorsten: (getting ashamed of his precious bot insulting people) Verily, I shall not rest until I have figured this out. (starts diving into .la files, Makefile, and twiddling various flags, experimenting all the while. A theory forms itself. Thorsten waves at Dorkus)
Dorkus: (waving arms around wildly, in time with the music on his headphones other people can’t hear) YOUR MOM ! (removes headphones) Um, sorry, what ? Whu-whu-whu-what ? Are you speaking ?
Thorsten: (waiting for Dorkus’ attention) How good is your library-fu ?
Dorkus: (eyes like a rabbit caught in headlights) Uhm, why ?
Thorsten: Can I try out my theory on you on what’s going wrong.
Dorkus: (trying really hard to say “NO”) Uhm, sure, why not.
Thorsten: Well, it involves libtool and stuff. (Thorsten starts explaining away)
Dorkus: (eyes glazing over after the word “libtool” falls) I’m sorry – I lost you after you said libtool. (puts headphones back on, continues to shake arms around wildly)
Four hours go by, and one by one, hackers leave the room, until finally, only Hobbit and Thorsten remain. During these four hours, Thorsten’s Thunkpad starts wheezing louder and louder, like an astmathic turtle dragging itself back to sea. Thorsten ignores the dying Thunkpad.
Thorsten: (talking to himself) Ok, so I think I figured this out. We’re pulling in -L flags because of pkg-config gstreamer –libs containing them, and we’re putting those in libgstximagesink_la_LDFLAGS through GST_PLUGIN_LDFLAGS. And this happens to come before libgstximagesink_la_LIBS, so the -L appears on the final link line before our internal copy of the libgstvideo.la file that’s in _LIBS.
Thorsten: (starts editing a slew of Makefile.am and configure.ac) so if I’m correct, I should never use small-el or big-el flags in LDFLAGS, and order my LIBS contents so that from high-up to the bottom of the dependency stack, so that in-module libraries do not get switched out for old installed copies. Now, let’s see what this does on that 32-CPU machine …
Thorsten: (waits until make completes) GNU toolchain, what sayest thou ?
GNU toolchain: (whispering) ldd seems to say that libgstximagesink.so now correctly points to the uninstalled copy of libgstvideo.so
Thorsten: Hurray ! (Thorsten commits fix)
Time passes.
Hedonism: The emperor will be pleased, Thorsten. You fixed the build of gst-plugins-osx.
Thorsten: EXCELLENT !
Hobbit: (grunting)Hedonism, still waiting for those apologies.(Hobbit leaves to go home.)
Thorsten: (savouring the moment after four hours of staring at .la files, link lines, and Makefiles, shaking his hands at the sky like tiny antennas) I 0WNZ0RZ LIBTOOL ! (looks around, sees that the lights went out and nobody’s there) Hm, no one here to applaud me loudly and thus solve my fan problem. I shall have to part with this Thunkpad soon if this keeps up.
Thunkpad: Wheeze.
GNU toolchain: (whispering) So what have you learnt, young Thorsten ?
Thorsten: I’ve learnt that I should not put libraries in LDFLAGS. I’ve also learnt that I should order my _LIBS starting from the library highest up in the dependency chain. And finally, I’ve learnt that I should not just blame libtool for my incompetence like so many other hackers. Libtool is doing the right thing. Everything works fine now. Thank you, GNU toolchain !
GNU toolchain: (whispering) My precioussssssssssss.
Curtain falls.

I’m sorry, but figuring out linking problems hurts my brain. I had to retaliate and hurt yours too.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.