Re: A strange compiling issue [SOLVED]

2008-09-24 Thread Unga
--- On Wed, 9/24/08, Mel [EMAIL PROTECTED] wrote:

 From: Mel [EMAIL PROTECTED]
 Subject: Re: A strange compiling issue
 To: freebsd-questions@freebsd.org, [EMAIL PROTECTED]
 Date: Wednesday, September 24, 2008, 1:57 AM
 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.
 
  cc -c -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 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.


Mel, thanks for the help. Inspection of toke.out finally lead to the point. The 
GNU grep was missing in my test system :)

The Perl Configure shouldn't have proceeded without grep.

Best Regards
Unga



  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


A strange compiling issue

2008-09-23 Thread Unga
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.

cc -c -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 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
toke.c: In function 'S_pending_ident':
toke.c:6923: error: lvalue required as unary '' operand
toke.c:6923: error: lvalue required as unary '' operand
toke.c: In function 'S_scan_heredoc':
toke.c:11182: error: invalid operands to binary + (have 'char *' and 'char *')
toke.c:11182: error: lvalue required as unary '' operand
toke.c:11182: error: lvalue required as unary '' operand
toke.c: In function 'S_scan_formline':
toke.c:12321: error: invalid operands to binary + (have 'char *' and 'char *')
toke.c:12321: error: lvalue required as unary '' operand
toke.c:12321: 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);
}

Line 6923:
const char *const has_colon = (const char*) memchr (PL_tokenbuf, ':', 
tokenbuf_len);

Please note, on test programs memchr works correctly.

Appreciate your reply.

Kind regards
Unga



  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: A strange compiling issue

2008-09-23 Thread v
hi

you may install perl from ports?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: A strange compiling issue

2008-09-23 Thread Unga
--- On Tue, 9/23/08, v [EMAIL PROTECTED] wrote:

 From: v [EMAIL PROTECTED]
 Subject: Re: A strange compiling issue
 To: [EMAIL PROTECTED]
 Cc: freebsd-questions@freebsd.org
 Date: Tuesday, September 23, 2008, 8:38 PM
 hi
 
 you may install perl from ports?

Hi, thanks for the reply.

What if I'm a port developer? :) 

Inability to compile shows an error somewhere else. It looks like a wrong 
header files symptom. I'm waiting for FreeBSD pros opinion on this to narrow 
down the problem and fix the real issue. I'm sure there is nothing wrong with 
the Perl itself.

Regards
Unga


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: A strange compiling issue

2008-09-23 Thread Mel
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.

 cc -c -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 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.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]