From pauljohn at ku.edu Sat Aug 25 12:16:08 2012 From: pauljohn at ku.edu (Paul Johnson) Date: Sat, 25 Aug 2012 11:16:08 -0500 Subject: [Swarm-Support] Ach! Debian multilib complications for Swarm; /usr/lib/x86_64-linux-gnu and png Message-ID: <5038FA48.7010209@ku.edu> On a Debian system (mostly Wheezy), I find some trouble because of work on multilib support. I recall that this caused a lot of trouble back when I was using Fedora, and was pleasantly surprised not to bother with it when I changed to Debian. All good things must pass, apparently, as the Debian folks have now gone multi. Shared libraries are now often installed in /usr/lib/x86_64-linux-gnu and the Swarm configure script can't understand that very well. So even though Swarm seemed to build, applications that use pixmaps in PNG are broken, jobs die like so: *** event raised for error: NotImplemented *** function: -[Pixmap _loadPNG:](), file: Pixmap.m, line: 232 PNG inoput not available on this configuration*** execution terminating due to error Symbol.m:187 -[Error(c) _raiseEvent:] Aborted I checked, I can run heatbugs, but not with PIXMAPS. And that's a bummer because my favorite heatbugs is celebrity heatbugs, with little photos of game show hosts and fashion models running about on the heatmap. I fiddled quite a while trying to solve this with Swarm configure options. No dice. So I'm going into the configure script itself, which I've never altered before. Consider the zlib stanza, like so. Focus on line 11, which starts "for dir..." test -z "$zlibdir" && zlibdir=$defaultdir libname=z if test -z "$libname" ; then libname=zlib fi { $as_echo "$as_me:$LINENO: checking directory of lib${libname}" >&5 $as_echo_n "checking directory of lib${libname}... " >&6; } _libdir="$zliblibdir" if test "$zlibdir" != no ; then test -z "$_libdir" && _libdir=$zlibdir/lib for dir in $_libdir $defaultdir/lib /usr/lib64 /usr/lib32 /usr/lib /usr/local/lib; do expand_dir=`eval echo $dir` for suffix in .dylib .so .sl .dll.a .a; do if test -r $expand_dir/lib${libname}${suffix} ; then zliblibdir=$dir break else zliblibdir='' fi done test -z "$zliblibdir" || break done I believe for png, zlib, maybe others, it is necessary to insert /usr/lib/x86_64-linux-gnu in that line, like so: for dir in $_libdir $defaultdir/lib /usr/lib64 /usr/lib32 /usr/lib /usr/lib/x86_64-linux-gnu /usr/local/lib; do That seems to help. After I do that to the zlib and png stanza, then the configure script's output changes in a way that is hopeful. That configure output changes from this: checking directory of libz... no checking directory of libpng... no checking directory of libhdf5... ${prefix}/lib to checking directory of libz... /usr/lib/x86_64-linux-gnu checking directory of zlib.h... ${prefix}/include checking directory of libpng... /usr/lib/x86_64-linux-gnu checking directory of png.h... /usr/include checking directory of libhdf5... ${prefix}/lib I was hopeful, the compile does try to build for PNG, but fails with this: Pixmap.m: In function ?-[Pixmap _loadPNG:]?: Pixmap.m:87:3: warning: pointer targets in passing argument 1 of ?png_sig_cmp? differ in signedness [-Wpointer-sign] /usr/include/png.h:1002:1: note: expected ?png_const_bytep? but argument is of type ?char *? Pixmap.m:106:7: error: dereferencing pointer to incomplete type Pixmap.m:142:9: warning: pointer targets in passing argument 4 of ?png_get_PLTE? differ in signedness [-Wpointer-sign] /usr/include/png.h:2212:1: note: expected ?int *? but argument is of type ?unsigned int *? Pixmap.m:185:13: warning: type ?id ? does not conform to the ?MapIndex? protocol [enabled by default] make[6]: *** [Pixmap.lo] Error 1 I'm going to try to fix this, but if somebody else has run into it, I would really appreciate a "heads up". It this reminds me of 2002 or so, when there were a lot of fussy details about the particular version of libpng we needed to use. pj pj -- Paul E. Johnson email: pauljohn at ku.edu http://pj.freefaculty.org Assoc. Director Professor, Political Science Center for Research Methods and Data Analysis 1541 Lilac Lane, Rm 504 1425 Jayhawk Blvd. University of Kansas Watson Library, Rm. 470 Lawrence, Kansas 66045-3129 Lawrence, Kansas 66045-7555 Ph: (785) 864-3523 Ph: (785) 864-3353