Re: teTeX-flex problems
Olaf Weber <[email protected]> Tue, 23 May 2006 21:12:03 +0200
| Newsgroups | gmane.comp.tex.tetex.general |
|---|---|
| Message-ID | <[email protected]> |
Mohammed Shahid writes:
> Hi,
> Though not a problem with teTex proper, this issue affects its
> installation and is related to problem 2 in
> '- using an unpatched version of flex-2.5.31 fails with..'
> Despite applying the patch (to flex-2.5.31) for teTex-3.0, flex
> poses problems during make as follows:
> make all-recursive
> make[1]: Entering directory `/export/home/shalabh/INSTALL/flex-2.5.31'
> Making all in .
> make[2]: Entering directory `/export/home/shalabh/INSTALL/flex-2.5.31'
> if gcc -DHAVE_CONFIG_H -I. -I. -I.
> -DLOCALEDIR=3D\"/usr/local/share/locale\" -I/usr/local/include -I./intl
> -I/opt/gnome/include -I/usr/openwin/share/include/X11/extensions
> -I/usr/openwin/include -I/usr/local/include -g -O2 -MT filter.o -MD -M=
P
> -MF ".deps/filter.Tpo" \
> -c -o filter.o `test -f 'filter.c' || echo './'`filter.c; \
> then mv ".deps/filter.Tpo" ".deps/filter.Po"; \
> else rm -f ".deps/filter.Tpo"; exit 1; \
> fi
> filter.c: In function `filter_apply_chain':
> filter.c:161: error: invalid lvalue in assignment
> filter.c:163: error: invalid lvalue in assignment
> filter.c:184: error: invalid lvalue in assignment
> make[2]: *** [filter.o] Error 1
> make[2]: Leaving directory `/export/home/shalabh/INSTALL/flex-2.5.31'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/export/home/shalabh/INSTALL/flex-2.5.31'
> make: *** [all] Error 2
> No workarounds to be found on the Web, either. Was wondering if
> something can be said about the problem.
This is what the code looks like after being patched (including new
line numbers). Instead of a gccism=B8 this time code is guilty of a
GNUlibcism: 'stdout' and 'stdin' are not lvalues on most systems.
160 /* setup streams again -- Removed. POSIX=
states that children inherit
161 open streams in the parent. Also, ANSI=
C99 states that the stdin
162 and stdout macors need not be mo=
dified lvalues; so this code is
163 broken in the first place.
164 if ((stdin =3D fdopen (0, "r")) =3D=3D NU=
LL)
165 flexfatal (_("fdopen(0) failed"))=
;
166 if ((stdout =3D fdopen (1, "w")) =3D=3D N=
ULL)
167 flexfatal (_("fdopen(1) failed"))=
;
168 */
188 /* This is not legal; stfout does not need to be a modifi=
able
189 lvalue
190 if ((stdout =3D fdopen (1, "w")) =3D=3D NULL)
191 flexfatal (_("fdopen(1) failed"));
192 */
> regards,
> shahid.
> ------------
> ------------
> ------------
--=20
Olaf Weber
(This space left blank for technical reasons.)