Discussion:
[tex-k] Failure to compile TeX; ! Incomplete \if; all text was ignored after line ...
Jay F Shachter
2011-09-04 20:54:51 UTC
Permalink
Gentlemen,

I am failing to compile TeX from source. The source is
not corrupt, and was successfully compiled several years
ago, on a different platform. The error message is:


make SHELL='/bin/sh' CC='gcc' CFLAGS='-O2 ' CCLD='gcc' LDFLAGS='-O2 -s' LIBS='../lib/lib.a ../../kpathsea/kpathsea.a ' LN='ln -s' initex
make[2]: Entering directory `/opt/TeX/web2c-6.1/web2c/tex'
gcc -DTeX -I./../lib -I../.. -DINITEX -DINI -O2 -c iextra.c
iextra.c: In function 'main':
iextra.c:73: error: 'TEXformatdefault' undeclared (first use in this function)
iextra.c:73: error: (Each undeclared identifier is reported only once
iextra.c:73: error: for each function it appears in.)
iextra.c:74: error: 'formatdefaultlength' undeclared (first use in this function)
iextra.c:74: warning: incompatible implicit declaration of built-in function 'strlen'
iextra.c:69: warning: return type of 'main' is not 'int'
iextra.c: In function 'topenin':
iextra.c:132: error: 'buffer' undeclared (first use in this function)
iextra.c:132: error: 'first' undeclared (first use in this function)

[other error messages follow, omitted for brevity ]


tex/iextra.c (like mf/iextra.c and mf/vextra.c) is a
symbolic link to lib/texmf.c and that file #defines the
symbolic constant dump_default_var to be either
TEXformatdefault or MFbasedefault depending on whether or
not the symbolic constant TeX is #defined. Also, in the
former case texd.h is #included prior to the #definitions
whereas in the latter case mfd.h is #included. Judging
from their modification times, both files are created
during the build process (mf was successfully built
yesterday evening). However, mf/mfd.h contains the line

EXTERN ccharpointer MFbasedefault ;

whereas tex/texd.h contains no similar line for
TEXformatdefault.

Further inquiry reveals that tex/texd.h is supposed to
be created during the running of the tex/convert script.
This script consists of the following lines:


cat ../lib/common.defines ../lib/texmf.defines tex.p |
../web2c/web2c -t -htexmf.h |
../web2c/fixwrites -t |
../web2c/regfix |
../web2c/splitup

cat coerce.h coerce.add > xcoerce.h
mv xcoerce.h coerce.h


The 5-component pipeline shown above is failing at the
2nd component. Thus, if one runs:


cat ../lib/common.defines ../lib/texmf.defines tex.p |
2>&1 ../web2c/web2c -t -htexmf.h


from the tex directory, one sees the following output on
the screen:


#include "texmf.h"
/* 1 9998 9999 */
#define memmax 30000
#define memmin 0
#define bufsize 500
#define errorline 72
#define halferrorline 42
#define maxprintline 79
#define stacksize 200
#define maxinopen 6
#define fontmax 75
#define fontmemsize 20000
#define paramsize 60
#define nestsize 40
#define maxstrings 3000
#define stringvacancies 8000
#define poolsize 32000
#define savesize 600
#define triesize 8000
#define trieopsize 500
#define dvibufsize 800
#define filenamesize 40
#define poolname "TeXformats:TEX.POOL "
typedef unsigned char ASCIIcode ;
typedef unsigned char eightbits ;

#include "coerce.h"
syntax error
Last token = 297, error buffer = `alphafile',
last id = `alphafile' (type).



Note the syntax error, which presumably indicates an
error that interrupted the generation of output.
Presumably, had this error not occurred, the output
would have eventually included a declaration of
TEXformatdefault, and other variables, similar to the
declaration of MFbasedefault, and other variables, that
appears in mf/mfd.h but I do not know enough about web2c
to determine the cause of the failure and to repair it.
I note that

@define type alphafile;

is the first "@define type" line in lib/common.defines,
but I am reluctant to ascribe significance to this,
since there is a convert script in the mf directory
that also passes lib/common.defines as input to web2c
(web2c -htexmf.h -m rather than web2c -t -htexmf.h, and
no, there is no significance to altering the order of
the options, I checked that already) and which does not
choke. In the mf directory the convert script inserts
a sed script prior to web2c, but that also seems not to
be significant. The significant difference seems to be
only that the convert script in the mf directory has
web2c read mf/mf.p as its last input, whereas the
convert script in the tex directory has web2c read
tex/tex.p as its last input -- even though,
paradoxically, the error message appears to be coming
from lib/common.defines, long before tex.p is read.

Search engine inquiries on this web2c error messages are
fruitless. Your expert advice at this point is greatly
desired.

You may also be able to help me with another problem,
the solution of which would render it unnecessary for me
to compile TeX from source (although, on general
principles, I still wish to be able to do so). I have
not built TeX from source since moving from Solaris 7 to
SuSe Linux 10, since the latter comes with TeX
pre-packaged. After "upgrading" (I place the word in
quotation marks, for reasons that will soon be clear) to
a newer version of TeX, I have lost all of my Hebrew
vowel macros. This is because the vowel macros employ
conditional expansions which used to work perfectly, and
which now yield a mysterious error message (that is why I
have fallen back to my copy of the source, and attempted
to rebuild a version of TeX that accepted my vowel
macros):


Nu? etex testfile
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./testfile (/var/lib/texmf/macros/mac.tex
(/var/lib/texmf/macros/ShalomOldStyle10_macros.tex
(/var/lib/texmf/macros/hletter1.tex)))
! Incomplete \if; all text was ignored after line 7.
<inserted text>
\fi
<to be read again>
\hadjust
\hiriq ...w {A}\if \l \alef \outer \gdef \hadjust
{-0.076}\fi \if \l \vet \o...
l.7 \xiriq{\qof}

?


Here is the \xiriq macro:

\def\xiriq#1{\def\l{#1}%
\outer\gdef\hadjust{0}\def\vadjust{0}%
\def\vow{A}%
\if\l\alef\outer\gdef\hadjust{-0.076}\fi%%
\if\l\vet\outer\gdef\hadjust{-0.12}\fi%
\if\l\heh\outer\gdef\hadjust{-0.108}\fi%
\if\l\vav\outer\gdef\hadjust{0.05}\fi%
\if\l\het\outer\gdef\hadjust{-0.1}\fi%
\def\x{\Kaf}\ifx\l\x \outer\gdef\hadjust{-0.079}\fi%
\if\l\lamed \outer\gdef\hadjust{-0.135}\fi%
\def\x{\Lamed}\ifx\l\x \outer\gdef\hadjust{-0.135}\fi%
\if\l\mem \outer\gdef\hadjust{-0.126}\fi%
\def\x{\Mem}\ifx\l\x \outer\gdef\hadjust{-0.126}\fi%
\if\l\samekh\outer\gdef\hadjust{-0.117}\fi%%
\if\l\ayin \outer\gdef\hadjust{-0.11}\fi%
\if\l\peh \outer\gdef\hadjust{-0.1}\fi%
\if\l\qof \outer\gdef\hadjust{-0.12}\fi%there should also be a redefinition of vadjust
\if\l\resh\outer\gdef\hadjust{0.06}\fi%
\if\l\sinwithdot \def\vow{K}\outer\gdef\hadjust{0}\fi%
\if\l\shinwithdot \def\vow{K}\outer\gdef\hadjust{0}\fi%
\def\x{\Sinwithdot}\ifx\l\x \def\vow{K}\outer\gdef\hadjust{0}\fi%
\def\x{\Shinwithdot}\ifx\l\x \def\vow{K}\outer\gdef\hadjust{0}\fi%
\if\l\shin \def\vow{K}\outer\gdef\hadjust{0}\fi%
\def\x{\Tav}\ifx\l\x \outer\gdef\hadjust{-0.1}\fi%
\beginL\l\kern\hadjust em\vow\kern-\hadjust em{}\endL}


As you can see, there is no incomplete \if. And yet the
new TeX -- but not the old TeX, which I cannot retrieve
-- has the delusion that the first (and presumably,
every subsequent) \if is incomplete. The same is true,
of course, of all of my vowel macros, not just the xiriq
macro, they are all written similarly.

A Google search has produced no useful information.
Someone reported a similar problem and said that he
solved it with a \protect. I do not know what \protect
is; I see no \protect in the index of the TeXbook; and I
have no notion of what needs to be \protected, since I
am doing nothing complex, I am simply defining \hadjust
conditional on what letter is being vocalized, it is
both logically and programmatically very simple.

Thank you in advance for your replies to both of these
questions. If you believe that your answers would not
be of general interest, you can contact me privately at
jay at m5 dot chicago dot il dot us.


Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us

"Quidquid latine dictum sit, altum videtur"
Norbert Preining
2011-09-05 23:05:20 UTC
Permalink
Post by Jay F Shachter
I am failing to compile TeX from source. The source is
From *which* sources?
The original sources are in web format, and it doesn't seem you are using
them.

If you are using the TeX Live sources, then please use the Build
script, or read what is in there and try to compile it in that way.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
HOFF (vb.)
To deny indignantly something which is palpably true.
--- Douglas Adams, The Meaning of Liff
Jay F Shachter
2011-09-06 06:10:40 UTC
Permalink
Post by Jay F Shachter
Post by Jay F Shachter
I am failing to compile TeX from source. The source is
From *which* sources?
The original sources are in web format, and it doesn't seem you are using
them.
Well, yes, I am, actually. But I am not compiling directly from them.
I am using the web2c system to generate C from the Pascal sources; I
thought that was how everyone did it, but apparently there is a
reimplementation of TeX that does not depend on Knuth's sources.


Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us

"Quidquid latine dictum sit, altum videtur"
Norbert Preining
2011-09-06 06:15:48 UTC
Permalink
Post by Jay F Shachter
Well, yes, I am, actually. But I am not compiling directly from them.
I am using the web2c system to generate C from the Pascal sources; I
That is what is happening in TeX Live, too. Of course.
Post by Jay F Shachter
thought that was how everyone did it, but apparently there is a
reimplementation of TeX that does not depend on Knuth's sources.
Never said that one ...

So as long as you do not provide better explanation what you did
with details I guess nobody will be able to help you.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
POGES (pl.n.)
The lumps of dry powder that remain after cooking a packet soup.
--- Douglas Adams, The Meaning of Liff
Tom Rokicki
2011-09-06 06:22:18 UTC
Permalink
I think this is all reasonably resolved.

Jay's TeX sources appear to be (somehow) a combination from
different releases, so the web2c defines files are not consistent
with the change files he is using. But . . .

The real problem was the macros he was using were
peppered with unnecessary "\outer"s. Apparently an earlier
version of TeX he was using had disabled the error message
that "\outers" generate, so the "\outers" were not causing
problems, but the newer TeX he is using properly errors out
on those "\outers" and hence really the source of all the
difficulty.

I have recommended he stick with a fully stock TeXLive if
he wants to build from scratch, and I believe with the
removal of the unnecessary "\outers" from his macros,
things are now properly working for him.

Jay, if I've misrepresented anything, please correct me.
Otherwise, I believe this issue has reached a satisfactory
conclusion.

-tom
Martin Schröder
2011-09-06 07:14:04 UTC
Permalink
peppered with unnecessary "\outer"s. ?Apparently an earlier
version of TeX he was using had disabled the error message
that "\outers" generate, so the "\outers" were not causing
TeX from the last century? Or TeX 2.x?

Best
Martin
Tom Rokicki
2011-09-06 14:46:18 UTC
Permalink
No, I suspect one of the extended TeX's disabled this
error message.
Post by Martin Schröder
peppered with unnecessary "\outer"s. ?Apparently an earlier
version of TeX he was using had disabled the error message
that "\outers" generate, so the "\outers" were not causing
TeX from the last century? Or TeX 2.x?
Best
? Martin
--
Check out Golly at http://golly.sf.net/
Jay F Shachter
2011-09-06 14:51:15 UTC
Permalink
Post by Tom Rokicki
I think this is all reasonably resolved.
.
.
.
Jay, if I've misrepresented anything, please correct me.
Otherwise, I believe this issue has reached a satisfactory
conclusion.
The above is correct. An upgrade to a newer version of TeX had
exposed errors in my macros that the earlier version of TeX had
ignored. Not knowing that my macros were at fault, I attempted to
rebuild the older TeX from source (so as to have a version of TeX that
accepted my macros, which I had been using for years without any
problems), and discovered to my surprise that I could not. Tom showed
me how to fix my macros so that they would be acceptable to the newer
version of TeX, and that is what I have done. Everything is now
working. However, it still troubles me somewhat, on general
principles, that I do not have source from which I can build TeX, just
in case I should ever need to do so. But the acquisition of such
source is a low priority, and, for the moment, I can live without it.


Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us

"Quidquid latine dictum sit, altum videtur"
Jay F Shachter
2011-09-06 14:56:06 UTC
Permalink
Post by Martin Schröder
TeX from the last century? Or TeX 2.x?
Best
Martin
It was version 3.14159. Knuth was offering $327.68 to the first
person who discovered a bug. The web source (tex.web.3.14159) was
processed (first by tangle and then by) web2c 6.1.


Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us

"Quidquid latine dictum sit, altum videtur"
ulrik.vieth
2011-09-06 15:16:36 UTC
Permalink
web2c-6.1 dates back to around 1994-95. That's from the last century, indeed.

For furthere reference, see ftp://ftp.tug.org/historic/systems/web2c/

The last version of web2c distributed individually was web2c-7.5.4 from 2005.
After that, there were no more *.tar.gz sources bundles, only svn checkouts
from the tex-live repository.

In any case, it is not a good practice to start from arbitray C sources
you found somewhere. These are intermediate files generated from
the original WEB sources after applying a change file (and obviously
someone hacked somehting, which behaves different from normal.)

Regards, Ulrik
(keeper of the historic archive)


----- Original Nachricht ----
Von: Jay F Shachter <jay at m5.chicago.il.us>
An: martin at oneiros.de (Martin Schr?der)
Datum: 06.09.2011 16:56
Betreff: [tex-k] TeK Sources: Versions
Centuries ago, Nostradamus predicted that Martin_Schr?der would write on Tue
Post by Martin Schröder
TeX from the last century? Or TeX 2.x?
Best
Martin
It was version 3.14159. Knuth was offering $327.68 to the first
person who discovered a bug. The web source (tex.web.3.14159) was
processed (first by tangle and then by) web2c 6.1.
Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us
"Quidquid latine dictum sit, altum videtur"
Jay F Shachter
2011-09-06 16:08:38 UTC
Permalink
Post by ulrik.vieth
The last version of web2c distributed individually was web2c-7.5.4
from 2005. After that, there were no more *.tar.gz sources bundles,
only svn checkouts from the tex-live repository.
Where is the tex-live repository, and how do you obtain TeX sources
from it?

Does the current tex-live distribution support bidirectionality? Or
does one have to patch it to obtain that functionality? My
understanding is that Knuth never supported bidirectionality, even
though he agreed that it was a good thing.


Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay at m5.chicago.il.us
http://m5.chicago.il.us

"Quidquid latine dictum sit, altum videtur"
Martin Schröder
2011-09-06 16:33:24 UTC
Permalink
Post by Jay F Shachter
Where is the tex-live repository, and how do you obtain TeX sources
from it?
http://www.tug.org/texlive/
http://www.tug.org/texlive/svn/

The sources are on the DVDs, btw.
Post by Jay F Shachter
Does the current tex-live distribution support bidirectionality? ?Or
does one have to patch it to obtain that functionality? ?My
understanding is that Knuth never supported bidirectionality, even
though he agreed that it was a good thing.
Yes. Welcome to 2011: We have XeTeX and LuaTeX. And eTeX. :-)
http://www.oneiros.de/tex/papers/presentation-ms-froscon2011-tex2011-en.pdf

Best
Martin
Reinhard Kotucha
2011-09-06 21:18:25 UTC
Permalink
Post by Jay F Shachter
Where is the tex-live repository, and how do you obtain TeX sources
from it?
Install subversion. And then run:

svn checkout svn://tug.org/texlive/trunk some_dir

Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
Loading...