On Fri, 2007-06-08 at 14:53 +0100, John Hearns wrote: > Rob Henderson wrote: > > I have installed acroread 7 using either with the rpm package or with the > > tar file. Both times the acroread program gives the error > > > > expr: syntax error > > > > repeatedly > > Try: > > sh -x /usr/local/Adobe/Acrobat7.0/bin/acroread <filename>.pdf > > > There are 12 occurences of 'expr' in my copy of acroread, > (Fedora Core 6 on my laptop, but I don't think that has any consequence). > sh -x should tell you which line has the problem. > Report this back to the list and we can try to figure it out.
The problem is that when acroread parses the Gtk version number it assumes that the minor version has just 3 digits. Now Gtk version 2.10.8 has arrived, the library version is libgtk-x11-2.0.so.0.1000.8 which breaks the parser. I used the attached patch, which should work with any known version of Gtk (up to x.99.99?) since it pads the version numbers to fixed length... Peter
--- acroread.BAK 2006-05-23 02:33:35.000000000 +0100
+++ acroread 2007-05-16 14:07:47.000000000 +0100
@@ -409,13 +409,23 @@
fi
mfile=`basename $ifile`
+ echo "mfile=$mfile" >&2
echo $mfile | grep -q "libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)" 2>/dev/null
if [ $? -ne 0 ]; then
return 1
fi
-
- echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
+ v1=`echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1/g'`
+ v2=`echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\2/g'`
+ pad=`expr length $v2`
+ pad=`expr 2 - $pad`
+ v2=`expr substr 0000000 1 $pad`$v2
+ v3=`echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\3/g'`
+ pad=`expr length $v3`
+ pad=`expr 2 - $pad`
+ v3=`expr substr 0000000 1 $pad`$v3
+ echo "v1=\"$v1\" v2=\"$v2\" v3=\"$v3\"" >&2
+ echo $v1$v2$v3
return 0
fi
@@ -455,6 +465,8 @@
continue
fi
+ echo "version=\"$version\"" >&2
+ echo "base_version=\"$base_version\"" >&2
len_version=`expr length $version`
base_version=`expr substr "${base_version}0000000000" 1 $len_version`
len_base_version=`expr length $base_version`
@@ -640,7 +652,7 @@
# Check the version of gtk and update the LD_LIBRARY_PATH if required.
if [ "`uname -s`" = "Linux" ]; then
- MIN_GTK_VERSION="240"
+ MIN_GTK_VERSION="20400"
check_gtk_ver_and_set_lib_path "$MIN_GTK_VERSION" ### returns 0 if found gtk >= 2.4
fi
signature.asc
Description: This is a digitally signed message part
