magicpoint 1.11b / mgp2ps SEGV on Debian woody PPC
新出@奈良女子大学です。
magicpointの1.11bを、PPC上のDebian woody (2.4.18-powerpc) 上で、gcc
version 2.95.4 20011002 (Debian prerelease) (Debianパッケージで提供され
ているもの)でmakeすると、mgp2psがSegmantation faultします。
下記の修正で直ります。print.cのprint_eps()内のxposという変数は、下記の
パッチの部分で(修正前は)値を代入されていますが、使われていません。そこで
gcc -O2がこの部分を最適化で削ろうとするのですが、その最適化にバグがある
ようです。下記の部分は、使われないxposに値を代入しているだけですから、全
体を#if 0でばっさり切っても大丈夫ですし、これによってgccの最適化のバグを
回避してDebian PPCでも動くようになります。
-------cut here--------------------------------------------------
diff -ru magicpoint-1.11b.orig/print.c magicpoint-1.11b/print.c
--- magicpoint-1.11b.orig/print.c Wed Jul 28 22:36:28 2004
+++ magicpoint-1.11b/print.c Fri Jan 28 23:13:20 2005
@@ -2078,6 +2078,7 @@
swidth = (int)(xscale * width);
sheight = (int)(yscale * height);
+#if 0
switch (align) {
case AL_LEFT:
case AL_LEFTFILL0:
@@ -2091,6 +2092,7 @@
xpos = window_width - swidth;
break;
}
+#endif
fprintf(fp, "BeginEPSF\n");
/*
-------cut here--------------------------------------------------
上記の問題とは別ですが、configureにも下記の修正をしないと
testコマンドがsyntax errorで通らないことがあります。
-------cut here--------------------------------------------------
diff -ru magicpoint-1.11b.orig/configure magicpoint-1.11b/configure
--- magicpoint-1.11b.orig/configure Thu Aug 5 01:23:35 2004
+++ magicpoint-1.11b/configure Fri Jan 28 23:11:26 2005
@@ -5170,20 +5170,20 @@
ac_cv_ft2_hdrdir="$dir"
fi
done
- if test -z $ac_cv_xft2_hdrdir -o -z $ac_cv_fc_hdrdir; then
+ if test -z "$ac_cv_xft2_hdrdir" -o -z "$ac_cv_fc_hdrdir"; then
echo "$as_me:$LINENO: result: no - not using xft2" >&5
echo "${ECHO_T}no - not using xft2" >&6
mgp_use_xft2=no
else
echo "$as_me:$LINENO: result: $ac_cv_xft2_hdrdir and $ac_cv_ft2_hdrdir and $ac_cv_fc_hdrdir" >&5
echo "${ECHO_T}$ac_cv_xft2_hdrdir and $ac_cv_ft2_hdrdir and $ac_cv_fc_hdrdir" >&6
- if test $ac_cv_xft2_hdrdir != "/usr/include" ; then
+ if test "$ac_cv_xft2_hdrdir" != "/usr/include" ; then
OPTFLAGS="-I$ac_cv_xft2_hdrdir $OPTFLAGS"
fi
- if test $ac_cv_ft2_hdrdir != "/usr/include" ; then
+ if test "$ac_cv_ft2_hdrdir" != "/usr/include" ; then
OPTFLAGS="-I$ac_cv_ft2_hdrdir $OPTFLAGS"
fi
- if test $ac_cv_fc_hdrdir != "/usr/include" ; then
+ if test "$ac_cv_fc_hdrdir" != "/usr/include" ; then
OPTFLAGS="-I$ac_cv_fc_hdrdir $OPTFLAGS"
fi
fi
-------cut here--------------------------------------------------
nide@ics.nara-wu.ac.jp
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735