Jeff Duntemann's Contrapositive Diary Rotating Header Image

August 9th, 2010:

Insight Is Gone From Ubuntu…

…and in fact from everything else based on Debian. Not six months after I saw Assembly Language Step By Step, Third Edition hit the shelves, the Debian team decided to pull the Insight debugger package from their seminal Linux distribution, on which Ubuntu, Kubuntu, Mint, and several others are based. Come Ubuntu 10.04 Lucid Lynx at the end of this past April, and suddenly people reading my book can’t work through the examples, because the software that I used in those examples (for single-stepping and examining registers and memory) is no longer available for their version of the OS.

This isn’t new news, and I’ve been trying to figure out how to finesse the problem ever since I heard about it mid-May. I got a number of queries this past week, suggesting that I had better get on it. (This is why you haven’t seen much from me in recent days.) Assuming at first that Insight had been dropped just to keep the distro CD-size, I tried to install it under Lucid from Software Center (not found), next a deb package, and finally from source, but nothing worked quite right. As the months have passed and more and more people are installing Lucid, I’m getting more and more mail about this. It’s a serious problem: A lot of the skill of assembly programming lies in debugging at the instruction level, and much of the tutorial depends on being able to run a debugger. Insight was that debugger. It’s GUI-based, rather than purely textual, and I think it’s a great deal easier to grasp, especially for newcomers.

So why didn’t I just use gdb?

Um…I did. Or at least I thought I did. Insight is an odd case. Most people assume (as I did) that it works the same way that Nemiver, KDbg, and DDD work, as independent front ends for gdb, passing textual commands to gdb and getting textual data back for display. Not so: Insight is gdb, and therein lies (in my opinion) most of the problem. What Insight’s originators did was take the gdb source code and add a built-in GUI, using Tcl/Tk. In effect, they forked gdb and produced a new custom version that contains all of gdb (at least gdb as of 2007) plus a windowing visual wrapper.

That in itself is unorthodox but not necessarily damaging, though forking something as fundamental as gdb should not be done lightly. Still, if you do it, you have to do it well, and I’m seeing indications that Insight isn’t nearly as clean a product as it should be. The Debian team spoke tersely; see the bug report and resolution here: “RoQA; insane packaging; unmaintained; low popcon.” (Yes, I read “popcorn” at first too.) More details may be found here. (Warning! DDG: Deep Debian Geekery.)

Quick translation:

  • RoQA means “Request of Quality Assurance”; basically, Debian’s QA team decided that the package was too broken to keep in the Debian distribution and requested that it be removed.
  • Two release candidate (RC) bugs were reported by the Debian team to Insight’s maintainer, but no one there responded. This is odd, because the maintainer is none other than Red Hat.
  • An NMU is a non-maintainer upload, which is when a package is sent to the distro team by someone other than the package maintainer of record. It is often a sign that the maintainer has abandoned the package, especially if the maintainer never acknowledges the third-party fix.
  • “Low popcon” is a reference to Debian’s unique “popularity contest” system for gaging how much individual distro packages are being used. Insight got 36 votes, which, in browsing the rest of the stats, seems low but not fatally low.

The real problem is that “insane packaging” issue. Insight contains embedded copies of software that is maintained by others and would be better linked in as libraries. The embedded bits “age” with respect to the current release of the OS and its libraries, eventually getting out of sync to the point that the package will not understand the current system well enough to function correctly. Tcl and Tk are either part of or easily installable to any Linux distro there is; you do not have to cut’n’paste them into your program source. With old software copied into its sources the package may build correctly, but might not necessarily run.

That said, the right way to approach the problem may be no more complex than taking the most recent release of Insight and making a proper Debian package out of it. The version I used last year in Karmic Koala goes back to 2007, and that’s the version pulled from Debian. The July 2009 release may be better. I’ve read enough on building Debian packages to know that I’m not the guy to do it, but I hope that somebody with better Debian chops will eventually try it, so that we can tell if Insight was just wounded, or if it’s really and quite sincerely dead.

In the meantime, the best fix appears to be falling back to Ubuntu 9.10. More here as I learn it.