415: Abiword fixed

Thanks for the feedback on 415. Abiword crashes when an attempt is made to print. Running abiword from a terminal shows that a symbol is missing from libgnomecups. The following reads like one of those who-done-it TV shows...

Right, well I had upgraded libgnomecups. That's the problem we run into when just some libraries are upgraded. The original Puppy 400 was compiled in T2. Since then we have been upgrading a bit at a time.

But not to worry, this is fixable. I am taking the opportunity to upgrade the 'wv' package. This provides MS Word import/export capability so is important. Puppy 412 has wv 1.2.4 and the latest is 1.2.5.

wv 1.2.5
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu

abiword 2.6.3
The other dependencies are already present, so no problem, however there is a bit of a trick required when configuring abiword. If you run the 'configure' script, the internal 'goffice' gets chosen, but that is wasteful as 41x already has goffice 0.6.3 package installed. This is what you have to do:

Edit 'configure', change "libgoffice-0.4" to "libgoffice-0.4":

GOFFICE_VERSION_REQUIRED='0.4.0'
goffice_modules="libgoffice-0.6 >= $GOFFICE_VERSION_REQUIRED"


# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-printing --enable-threads --disable-gucharmap --disable-scripting --without-ImageMagick

Configured to build on a Unix/Linux platform.
Configured with printing capabilities.
Configured with XFT support.

XML Parser: libxml2 in -L/usr/lib -lxml2 -lz -lm
zlib: zlib in -lz
PNG Library: libpng in -lpng12
popt: libpopt in -lpopt
WV Library: -lwv -lz -lpng -lm -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0
iconv: system iconv
spelling: enchant
goffice: system
gnome-vfs: no (>= 2.2.0 not fulfilled)
gnome-ui: no (>= 2.0 not fulfilled)
libabiword: no
binreloc: no


Ah, but still had the crashing bug. Ttuuxxx reported that CUPS had to be recompiled, so I will do that too:

cups 1.1.23
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-dbus --enable-openssl --disable-pam --with-logdir=/var/cups/log

...oh dear, won't compile, a missing symbol in libpng.

Yes, back when all of this was done in T2, November 2007, I patched libpng. The patched package is currently installed, it has been in 4.x all along, so I don't know what is wrong here. The patch was required because cups 1.1.23 needs a symbol (png_read_destroy) in libcups that is no longer exported. The patch fixed that. I do have that patched source, so might as well compile that:

libpng 1.2.22-patched1
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu

Yep, cups now compiles ok. Now for the moment of truth, selecting "File->Print preview..." in abiword... oh dear, still crashes:

abiword: symbol lookup error: /usr/lib/libgnomecups-1.0.so.1: undefined symbol: ippNewRequest

Okay, a quick little test. I had upgraded libgnomecups prior to releasing 415. The version in pup 412 is 0.2.2 and I had upgraded to 0.2.3. Substituting the original library file from pup 412... yes, abiword print-preview works!

So all the rigmarole above probably wasn't necessary. Yeah, but what is wrong with the libgnomecups that I compiled before? Trying again:

libgnomecups 0.2.3
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu

...nup, abiword crashes. Now trying the previous version:

libgnomecups 0.2.2
# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu

ABIWORD PRINT PREVIEW NOW WORKS!!!!

The entire problem was the move from libgnomecups 0.2.2 to 0.2.3, where a symbol disappeared that abiword needs.
Alright, I'll probably put all of the above into the next pup, 416. It might look pretty tedious what I went through, and it was, but at least I have found that both the libpng and libgnomecups needed to be fixed.


Posted on 28 Jun 2009, 23:45


Comments:

Posted on 29 Jun 2009, 14:54 by disciple
CUPS packages
If you're in the mood for changing Puppy's CUPS package, perhaps you could include a version with the patch that actually lets people cancel print jobs from the web interface :) http://www.murga-linux.com/puppy/viewtopic.php?t=38806&sid=c26ec9e9c73fc90137293d2a016e5baa


Posted on 30 Jun 2009, 19:56 by kirk
cups 1.2.23 patch
Here's the patch that fixes the cancel job problem/feature.

--- ipp.c 2003-04-17 12:47:50.000000000 -0400
+++ cupsys-1.1.23/scheduler/ipp.c 2003-04-17 12:56:11.000000000 -0400
@@ -5580,7 +5580,9 @@
ipp_attribute_t *attr; /* requesting-user-name attribute */
struct passwd *user; /* User info */
struct group *group; /* System group info */
+ location_t *loc; /* Authentication location */

+ loc = FindBest(con->uri, con->http.state);

LogMessage(L_DEBUG2, "validate_user(%p[%d], \"%s\", %p, %d)\n",
con, con->http.fd, owner, username, userlen);
@@ -5589,6 +5591,10 @@
* Validate input...
*/

+ if (loc->type == AUTH_NONE) {
+ return (1);
+ }
+
if (con == NULL || owner == NULL || username == NULL || userlen <= 0)
return (0);



Posted on 30 Jun 2009, 19:57 by kirk
cups 1.2.23 patch
And here's the cupsd.conf I used with it:

ServerName localhost

LogFilePerm 0600

# Recommended log size 1m
MaxLogSize 1m

PreserveJobHistory Off

PreserveJobFiles Off

AutoPurgeJobs Yes

DocumentRoot /usr/share/doc/cups-1.1.23

# Show general information in error_log.
# Default: 'LogLevel info'
# Change to 'LogLevel debug' for more detail
LogLevel info

Printcap /etc/printcap

User root

<Location />
# Allow shared printing and remote administration.
Order allow,deny
Allow @LOCAL
</Location>

#AuthType Digest
#Order Deny,Allow
#Allow From 127.0.0.1
#Allow From localhost

<Location /admin>
# Allow remote administration.
Order allow,deny
Allow @LOCAL
</Location>

<Location /printers>
Order Deny,Allow
Allow From 127.0.0.1
Allow From localhost
</Location>

<Location /jobs>
#
# You may wish to limit access to job operations, either with Allow
# and Deny lines, or by requiring a username and password.
#
AuthType None
AuthClass Anonymous
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From @LOCAL
</Location>

# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
BrowseAddress @LOCAL
BrowseProtocols cups
# Allow remote access
Port 631


Posted on 30 Jun 2009, 24:04 by BarryK
Thanks, cups patch
Kirk,
Thanks for that cups patch.