GIMP, porting, and XSane


I completed the port of the graphics Muse Tools to gimp 2.2.3 and gtk+ 2.6. The former required only a few minor changes to the use of layer and image menus (primarily) while the latter was more involved. Fortunately, most of this involved changing things like gtk_signal_connect to g_signal_connect. And most of that was done in one big swoop using cscope. There was a fair amount of work converting from CList's to Model/View's, especially in the GFXMerge plugin. I was caught off guard on that one. All the other ports were pretty quick. But GFXMerge used lots of CList's. There was more work on that one than probably any of the others, though most of the others are technically more complex internally.

The porting did expose a few existing bugs and introduced a few new ones. These are all documented in the bug database and I'll address them later – probably when someone complains about them. In the mean time I have to get back to working on my book.

One small chapter of my book will include a discussion on scanning issues. I found that in order to discuss that topic properly I needed to get XSane working with GIMP 2.2.3 (the version I'm currently using on the book). Porting that was very straight forward except for one minor detail. The link stage failed because of the settings for the SANE_LDFLAGS configuration. By default xsane sets them like so:

SANE_LDFLAGS='-L/usr/lib -Wl,-rpath,/usr/lib'

but that caused unresolved symbols from GTK+. The solution appears to be to change this to

SANE_LDFLAGS='-Wl,--export--dynamic'

At least this worked for me. The way I got around the problem (since I don't know exactly how to use autoconf configuration stuff yet) was to just write a little shell script that includes the link line from the build that failed and edit these LDFLAG settings accordingly. Then I just ran the script to do the link phase. That, at least, gets the thing compiled. But it doesn't run yet. The complaint is

[xsane] ERROR: eula text not found. Looks like xsane is not installed correct.

XSane has a EULA? And if it can't be found it doesn't work? Weird. Why not just encode it into the application then?

Oh – didn't I tell you? The book is a tutorial collection for using GIMP 2.2. Sven Nuemann and David Neary, a couple of heavy weights in the GIMP project, will be helping me review it. I'm looking forward to their input.