Transfig.3.2.4 compile errors

Declan Moriarty junk_mail at iol.ie
Thu Aug 25 09:50:03 PDT 2005


I am in trouble with transfig.3.2.4 building in LFS-5.0, which has
gcc-3.3.1 and the older gcc-2.95.3 in /opt. I am following the hint,
which farts with the Makefiles to put transfig and xfig in /usr/share,
and not in /usr/X11R6, like so

mv Imakefile{,.orig}
echo BINDIR=/usr/bin > Imakefile
echo MANDIR=/usr/share/man/man1 >> Imakefile
cat Imakefile.orig >> Imakefile
mv fig2dev/Imakefile{,.orig}
echo BINDIR=/usr/bin > fig2dev/Imakefile
echo MANDIR=/usr/share/man/man1 >> fig2dev/Imakefile
cat fig2dev/Imakefile.orig | \
    sed "s:/usr/local/lib/X11/xfig:$XFIGLIBDIR:g" \
    | sed "s:XCOMM #define USEXPM:#define USEXPM:g" \
    | sed "s:XCOMM DDA4 = -DA4:DDA4 = -DA4:g" \
    | sed "s:XCOMM DDEPSFIG = -DEPSFIG:DDEPSFIG = -DEPSFIG:g" \
    | sed "s:FIG2DEV_LIBDIR =
/usr/local/lib/fig2dev:FIG2DEV_LIBDIR=/usr/share/transfig:g" \
    >> fig2dev/Imakefile
mv transfig/Imakefile{,.orig}
echo BINDIR=/usr/bin > transfig/Imakefile
echo MANDIR=/usr/share/man/man1 >> transfig/Imakefile
cat transfig/Imakefile.orig | \
    sed "s:XCOMM USELATEX2E = -DLATEX2E:USELATEX2E = -DLATEX2E:g" \
    >> transfig/Imakefile
xmkmf
make Makefiles
make


Here are the errors:

Selecting gcc-2.95.3 (by putting /opt/gcc-2.95.3/bin first in the $PATH)

[root at genius /usr/src/transfig.3.2.4]# make
making all in ./fig2dev...
make[1]: Entering directory `/usr/src/transfig.3.2.4/fig2dev'
rm -f fig2dev.o
gcc -m32 -c -O2 -fno-strength-reduce -fno-strict-aliasing    -I..
-I/usr/X11R6/include    -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE    -D_BSD_SOURCE -D_SVID_SOURCE
-DFUNCPROTO=15 -DNARROWPROTO   -DNEED_STRERROR   -DNFSS   -DI18N
-DUSE_PNG -DUSE_XPM -I/usr/include/X11 -I/usr/include/X11    fig2dev.c
cc1: Invalid option `32'
make[1]: *** [fig2dev.o] Error 1
make[1]: Leaving directory `/usr/src/transfig.3.2.4/fig2dev'
make: *** [all] Error 2

Using gcc-3.3.1:

This barfs because it no "longer uses varargs.h" These steps

mv fig2dev/fig2dev.h  fig2dev/fig2dev.h.orig
sed 's/varargs.h/stdarg.h/' fig2dev/fig2dev.h.orig > fig2dev/fig2dev.h 

(A brave attempt for a guy like me) gets me to here

gcc -m32 -c -O2 -fno-strength-reduce -fno-strict-aliasing    -I..
-I../..  -I/usr/X11R6/include    -Dlinux -D__i386__
-D_POSIX_C_SOURCE=199309L                             -D_POSIX_SOURCE
-D_XOPEN_SOURCE                             -D_BSD_SOURCE -D_SVID_SOURCE
 -DFUNCPROTO=15 -DNARROWPROTO   -DUSE_PNG -DUSE_XPM -I/usr/include/X11
-DNFSS -DA4              -DLATEX2E_GRAPHICS -DEPSFIG  -DDVIPS -DI18N
-DFIG2DEV_LIBDIR=\"/usr/share/transfig\" -DBITMAPDIR=\"/bitmaps\"
genemf.c
gcc -m32 -O2 -fno-strength-reduce -fno-strict-aliasing    -I.. -I../..
-I/usr/X11R6/include    -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE
-D_BSD_SOURCE -D_SVID_SOURCE
 -DFUNCPROTO=15 -DNARROWPROTO   -DUSE_PNG -DUSE_XPM -I/usr/include/X11
-DNFSS -DA4              -DLATEX2E_GRAPHICS -DEPSFIG  -DDVIPS -DI18N
-DFIG2DEV_LIBDIR=\"/usr/share/transfig\" -DBITMAPDIR=\"/bitmaps\"    -c
-o gensvg.o gensvg.c
gensvg.c:695:23: missing terminating " character
gensvg.c: In function `gensvg_text':
gensvg.c:696: error: parse error before "font"
gensvg.c:696: error: stray '\' in program
gensvg.c:703:23: missing terminating " character
gensvg.c:704: error: parse error before "font"
gensvg.c:704: error: `font' undeclared (first use in this function)
gensvg.c:704: error: (Each undeclared identifier is reported only once
gensvg.c:704: error: for each function it appears in.)
gensvg.c:704: error: `style' undeclared (first use in this function)
gensvg.c:704: error: stray '\' in program
gensvg.c:709: error: parse error before ')' token
make[2]: *** [gensvg.o] Error 1
make[2]: Leaving directory `/usr/src/transfig.3.2.4/fig2dev/dev'
make[1]: *** [dev/libtransfig.a] Error 2
make[1]: Leaving directory `/usr/src/transfig.3.2.4/fig2dev'
make: *** [all] Error 2


Uli suggested a gentoo patch on this file, which 'patch -nNp1 -i'
dismissed as "Only Garbage", and after trying to apply it manually, I
can only agree


Trying it with these options
patch -Np1 -i ../transfig-3.2.4-gcc-3.3.patch

Tells me it's already applied.

Any ideas?
/flounders out of his depth.
-- 

	With best Regards,


	Declan Moriarty.



More information about the blfs-support mailing list