[GRASS5] r.binfer compile problem
Michel Wurtz - ENGEES/CEREG
mw at engees.u-strasbg.fr
Tue Apr 18 04:02:42 EDT 2000
Markus Neteler wrote:
>
> Dear developers,
>
> another own compile problem I have with
> r.binfer/Linux.
>
> I have two different platforms running Linux.
>
> A definition in:
> src/raster/r.binfer/binfer.l
> is causing problems.
>
> [row 39]
>
> #ifndef sparc
> #ifndef linux
> int yylineno = 1;
> #endif
> #endif
>
> On machine one above compiles, on machine two I get
> binfer.l: In function 'yylex':
> binfer.l:114: 'yylineno' undeclared (first use in this function)
> binfer.l:114: (Each undeclared identifier is reported only once
> binfer.l:114: for each function it appears in.)
> make: *** [OBJ.i586-linux-elf/lex.o] Error 1
>
> It is quite strange. Any ideas?
Are you using flex ? (the lex program from GNU/FSF)
I had the same message. Look at the command being run
If it is flex instead of lex, you have to add the -l option.
"flex -l" knows about yylineno, but not flex. The man page said:
flex's -l option turns on maximum compatibility with the original
AT&T lex implementation, at the cost of a major loss in the gen-
erated scanner's performance. We note below which incompatibili-
ties can be overcome using the -l option.
flex is fully compatible with lex with the following exceptions:
- The undocumented lex scanner internal variable yylineno is
not supported unless -l or %option yylineno is used.
etc.
Doing this solved the problem when compiling grass4.3 with a
Slakware 7.0 Linux distribution, and installing flex and not lex.
The normal way is to have a shell script /usr/bin/lex which looks
#!/bin/sh
flex -l $*
but this file wasn't created on my home machine (altough it was
on my work machine : wrong answer while installing Linux ?)
--
Michel Wurtz ENGEES - CEREG
1, quai Koch - BP 1039, F-67070 STRASBOURG cedex
Tel: +33 03.88.24.82.45 Fax: +33 03.88.37.04.97
More information about the grass-user
mailing list