A strange compiling issue

Mel fbsd.questions at rachie.is-a-geek.net
Tue Sep 23 17:57:04 UTC 2008

On Tuesday 23 September 2008 11:45:40 Unga wrote:
> Hi
> I'm trying to compile Perl on FreeBSD. It get cleanly compiled on FreeBSD
> 7.0.
> But on another test system running RELENG_7 where I do weired things, it
> develops errors. There must be something wrong with my test system, I would
> like to understand what cause this error.
> -fno-strict-aliasing -pipe  -std=c89 -O -Wall -ansi   -W -Wextra
> -Wdeclaration-after-statement -Wendif-labels -Wc++-compat toke.c
> toke.c: In function 'Perl_yylex':
> toke.c:6633: error: lvalue required as unary '&' operand
> toke.c:6633: error: lvalue required as unary '&' operand

> Line 6633:
>                     if (memchr(tmpbuf, ':', len))
>                         sv_setpvn(PL_subname, tmpbuf, len);
>                     else {
>                         sv_setsv(PL_subname,PL_curstname);
>                         sv_catpvs(PL_subname,"::");
>                         sv_catpvn(PL_subname,tmpbuf,len);

These line numbers are off. There's no '&' anywhere here. Any chance this file 
wasn't passed through yacc/lex? Does an '&' show up in raw cpp output (maybe 
memchr was defined as some macro)? Try:
cpp -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe  \
	-std=c89 -O -Wall -ansi   -W -Wextra -Wdeclaration-after-statement \
	-Wendif-labels -Wc++-compat -o toke.out

Then inspect toke.out.

Problem with today's modular software: they start with the modules
    and never get to the software part.

More information about the freebsd-questions mailing list