Build failure because bareword found where operator expected
mailbox synchronizer
Brought to you by:
ossi
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.
yes, it's new in perl 5.14.
you can replace the line in question with
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.
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.
added check.