Menu

#37 Build failure because bareword found where operator expected

1.3.0
fixed
None
1.3.1
5
2017-10-15
2017-10-04
No

Hi, I'm a developer with MacPorts. We just updated isync to 1.3.0. I noticed it does not build on OS X 10.8 or earlier. The error is:

perl ./drv_proxy_gen.pl ./driver.h ./drv_proxy.c drv_proxy.inc
Bareword found where operator expected at ./drv_proxy_gen.pl line 96, near "s,^ ,,r"
Bareword found where operator expected at ./drv_proxy_gen.pl line 143, near "s/(.*), $/, $1/r"
syntax error at ./drv_proxy_gen.pl line 96, near "s,^ ,,r "
syntax error at ./drv_proxy_gen.pl line 143, near "s/(.*), $/, $1/r"
Execution of ./drv_proxy_gen.pl aborted due to compilation errors.
make[3]: *** [drv_proxy.inc] Error 255

It builds on OS X 10.9 and later.

Maybe the constructs you're using on these lines are not compatible with old versions of perl? OS X 10.9, where it works, has perl 5.16.2, while OS X 10.8, where it fails, has perl 5.12.4.

Discussion

  • Oswald Buddenhagen

    yes, it's new in perl 5.14.
    you can replace the line in question with

        my $cmd_print_cb_args = $cmd_cb_args;
        $cmd_print_cb_args =~ s/(.*), $/, $1/;
    

    i'm not all that eager to resign from using a feature from a perl version released in may 2011. macos 10.8 reached end of life in dec 2015. it seems reasonable to me to reject this.

     
  • Ryan Carsten Schmidt

    Thanks. I'm fine with you requiring a newer version of perl. Would you consider adding a check for that to your configure script? Seeing an error from configure that "perl 5.14 or later is required" would be more pleasant than just having the build fail and leaving it up to the user to wonder why.

     
  • Oswald Buddenhagen

    • status: reported --> fixed
    • assigned_to: Oswald Buddenhagen
    • Fixed In: unknown --> 1.3.1
     
  • Oswald Buddenhagen

    added check.

     

Log in to post a comment.

MongoDB Logo MongoDB