Click to See Complete Forum and Search --> : xFree86 undeclared variable


DemosthenesB
08-10-2003, 04:04 AM
I just finished installing LFS 4.1, and am trying to install xfree86. I got all the files from the xfree website and then go to build it with:WORLDOPTS="" make World 2>&1 | tee xfree-compile.log &&
make install &&
make install.man &&
ln -sf /usr/X11R6/bin /usr/bin/X11 &&
ln -sf /usr/X11R6/lib/X11 /usr/lib/X11 &&
ln -sf /usr/X11R6/include/X11 /usr/include/X11
which is what the BeyondLFS instructed me to do. However, after a while I get an error message that reads:<stdout>: In function `yylex':
<stdout>:1199: `yy_prev_more_offset' undeclared (first use in this function)
<stdout>:1199: (Each undeclared identifier is reported only once
<stdout>:1199: for each function it appears in.)
lexer.l:349: warning: long unsigned int format, long int arg (arg 3)
lexer.l:358: warning: long unsigned int format, long int arg (arg 3)
/usr/include/ctype.h: At top level:
<stdout>:2988: warning: `yy_flex_strlen' defined but not used
make[4]: *** [lexer.o] Error 1
make[4]: Leaving directory `/root/xfree/xc/config/pswrap'
make[3]: *** [../../config/pswrap/pswrap] Error 2
make[3]: Leaving directory `/root/xfree/xc/lib/dps'
make[2]: *** [includes] Error 2
make[2]: Leaving directory `/root/xfree/xc/lib'
make[1]: *** [includes] Error 2
make[1]: Leaving directory `/root/xfree/xc'
make: *** [World] Error 2

I have already tried many times to edit the file(cx/config/pswrap/lexer.c) but line 1199 has NOTHING in it, just a newline, and there is no mention of `yy_prev_more_offset' until around 1220. I can't even find where the function `yylex' starts, so I put a 'static int yy_prev_more_offset' at the rightmost "{" at the top of the file and then do a make Everything
but I've got nothing so far...

Does anyone know how to fix this, or maybe have a working lexer.c file lying around? I've also tried other mirrors(but the packages don't come with that file, it is configured by itself) and the "fixes" and patches from the site.

Any information would help, its so tragic how such a big program could succumb to such a small error, but I guess thats the way with all programs. Thank in advance.

hard candy
08-10-2003, 06:15 AM
i was looking around for you and found this patch, apparently the warning is due to a compiler error, part of "bison"? yylex (http://bobo.link.cs.cmu.edu/link/ftp-site/link-grammar/system-3.0/parse/src/pp_lexer.c)
I Googled for "xfree and yylex". Good luck.

DemosthenesB
08-10-2003, 11:19 AM
Thank you so much hard candy, I had searched for "lexer.c error" but there were no relevant results. Were exactly should I put this patch, I'm used to the '.patch' patches. Should I just put it in place of lexer.c and do a 'make Everything' or try the 'make World'?
Thanks again.

mdwatts
08-10-2003, 03:05 PM
Originally posted by DemosthenesB
Were exactly should I put this patch, I'm used to the '.patch' patches. Should I just put it in place of lexer.c and do a 'make Everything' or try the 'make World'?
Thanks again.

I would say save the pp_lexer.c in the link provided above to your HD, compare that and your current lexer.c and if they both look relatively the same except for a few changes the author commented on, rename lexer.c to lexer.c.bkup, pp_lexer.c to lexer.c and then try compiling again.

hard candy
08-10-2003, 03:08 PM
I really don't know.:confused: :mad: :o

DemosthenesB
08-10-2003, 05:18 PM
I tried comparing them and they were not much alike but I tried it anyways and I got a slew of different errors. Not much of a patch but thanks anyways hard candy. And thanks for the suggestion mdwatts.

Has anybody here compiled xfree86 4.3 by themselves? Did you have to change any of the default config options? And if you have recently built xfree and have the lexer.c file in the source tree then feel free to post it, or send it or something, its located in cx/config/pswrap/... I'm kinda getting tired of lynx.
<edit>
By the way, how do you use those '.diff' files from the "fixes" apges on the xfree website? And do you think that could be the solution?

mdwatts
08-10-2003, 06:00 PM
Originally posted by DemosthenesB

Has anybody here compiled xfree86 4.3 by themselves?

By the way, how do you use those '.diff' files from the "fixes" apges on the xfree website? And do you think that could be the solution?

I compile X as outlined in this thread (http://justlinux.com/forum/showthread.php?s=&threadid=106856&highlight=make+world).

Do you have all the required packages installed that is necessary to compile X?

The docs on the X site should explain what to do with the .diff's.

DemosthenesB
08-11-2003, 01:03 AM
I finally got it to work, turns out I had an obsolete version of "Flex." I had originally looked for the newest version but the link I had was dead, and it turns out that the gnu fpt has moved their "non-gnu" section from /non-gnu/ to /gnu/non-gnu.
Thank you guys for helping me out.