develooper Front page | perl.perl5.porters | Postings from October 2014

Re: Build failed in Jenkins: perl5 #4919

Thread Previous | Thread Next
From:
wolfsage
Date:
October 22, 2014 20:30
Subject:
Re: Build failed in Jenkins: perl5 #4919
Message ID:
CAJ0K8bjNqko5jrXTCzjRwXSD5J40Ri8tf52Jto36O+rHTmAbcg@mail.gmail.com
On Mon, Sep 29, 2014 at 2:25 PM, Karl Williamson
<public@khwilliamson.com> wrote:
> I can't figure out the problem here, and would appreciate some help.  I will
> comment out the offending line for the time being; it's just a compile-time
> check that we're not overflowing.  But these changes have been thoroughly
> smoked, and passed, and I don't understand the Jenkins error message and how
> it applies here.
>
> The error message is
> op_reg_common.h:104:30: error: missing binary operator before token
> "2147483647"
>
> The failing line is
> #   if RXf_PMf_COMPILETIME > I32_MAX

I can trigger this if I undef INT32_MAX:

  +++ b/handy.h
  @@ -222,7 +222,7 @@ typedef U64TYPE U64;
   #    define UINT64_C(c) PeRl_UINT64_C(c)
   #  endif
   #endif
  -
  +#undef INT32_MAX
   #if defined(UINT8_MAX) && defined(INT16_MAX) && defined(INT32_MAX)

And then build, which gives me a much more helpful error message:

  $ make
  echo @`sh  cflags "optimize='-O2'" perlmini.o`  -DPERL_IS_MINIPERL
-DPERL_EXTERNAL_GLOB perlmini.c
  @cc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c89 -O2 -Wall -ansi -Werror=$
  perl.h:2532:30: error: missing binary operator before token "2147483647"
   #  define PERL_INT_MAX ((int)INT_MAX)
                                ^
  handy.h:260:18: note: in expansion of macro ‘PERL_INT_MAX’
   # define I32_MAX PERL_INT_MAX
                    ^
  op_reg_common.h:104:30: note: in expansion of macro ‘I32_MAX’
   #   if RXf_PMf_COMPILETIME > I32_MAX
                                ^
  make: *** [perlmini.o] Error 1

This appears to be because I32_MAX is then defined to PERL_INT_MAX,
which uses a cast - (int) - which is compile time not preprocessor
time.

Why INT32_MAX isn't available on that system I don't know, but that
shouldn't matter.

Is there something other than I32_MAX that we can use at compile time
to check size/value here?

-- Matthew Horsfall (alh)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About