On Tue Oct 04 10:51:25 2016, deepak.gulati@booking.com wrote:
Show quoted text> Yup, I already used a slightly different version of your suggestion to
> get it to build.
>
> } elsif ($os_version =~ /System Version:(?: macOS) (?:Server
> )?(?:(10)\.(\d+)(?:\.(\d+))?)/) {
> return ($1, $2, $3 || 0);
> }
>
> Regarding the seriousness of test warnings - not sure. I’ve been
> running a script that uses Mac::FsEvents to observe a folder for changes
> and copy the changed files to several boxes. It seems to be working as
> expected for the past few minutes.
>
> Thank you for looking into it.
>
> On 4 Oct 2016, at 16:44, Andy Grundman via RT wrote:
>
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=118258 >
> >
> > Hmm, you can fix the version parser with this change to MacVersion.pm:
> >
> > - if($os_version =~ /System Version:(?: Mac)? OS X (?:Server
> > )?(?:(10)\.(\d+)(?:\.(\d+))?)/) {
> > + if($os_version =~ /System Version:.+(?:(10)\.(\d+)(?:\.(\d+))?)/)
> > {
> >
> > The string is now "macOS" instead of "Mac OS X". Thanks Apple! I
> > tested this with: macOS 10.12 (16A320).
> >
> > $ gcc -v
> > Configured with: --prefix=/Library/Developer/CommandLineTools/usr
> > --with-gxx-include-dir=/usr/include/c++/4.2.1
> > Apple LLVM version 8.0.0 (clang-800.0.38)
> > Target: x86_64-apple-darwin16.0.0
> > Thread model: posix
> > InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> >
> > I also had to remove the hints/darwin.pl file, or it would complain
> > about a missing SDK. The original point of the hints file was to build
> > fat binaries that supported both 32 & 64-bit. This is ancient history
> > these days and everything is 64-bit, and just using the compiler flags
> > from Perl should be fine. In other words, just remove the file.
> >
> > With the above patch and removing the hints file, I can compile and
> > run the tests. Here's the test output. I'm not sure if the warnings
> > are serious or not.
> >
> > t/01use.t .................. ok
> > t/02pod.t .................. skipped: Test::Pod 1.14 required
> > t/03podcoverage.t .......... skipped: Test::Pod::Coverage 1.04
> > required
> > t/04critic.t ............... skipped: Critic test only for developers.
> > t/05event.t ................ 1/7 Warning: unable to close filehandle
> > properly: Bad file descriptor during global destruction.
> > Warning: unable to close filehandle properly: Bad file descriptor
> > during global destruction.
> > Warning: unable to close filehandle properly: Bad file descriptor
> > during global destruction.
> > t/05event.t ................ ok
> > t/06flags.t ................ 5/5 Warning: unable to close filehandle
> > properly: Bad file descriptor during global destruction.
> > Warning: unable to close filehandle properly: Bad file descriptor
> > during global destruction.
> > Warning: unable to close filehandle properly: Bad file descriptor
> > during global destruction.
> > Warning: unable to close filehandle properly: Bad file descriptor
> > during global destruction.
> > t/06flags.t ................ ok
> > t/07noflags.t .............. ok
> > t/08leftover-events.t ...... skipped: This is a problem with FSEvents
> > itself, it seems
> > t/09subprocess-events.t .... 1/2 Warning: unable to close filehandle
> > properly: Bad file descriptor during global destruction.
> > t/09subprocess-events.t .... ok
> > t/10receive-all-changes.t .. 1/1 Warning: unable to close filehandle
> > properly: Bad file descriptor during global destruction.
> > t/10receive-all-changes.t .. ok
> > All tests successful.
> > Files=10, Tests=20, 25 wallclock secs ( 0.04 usr 0.03 sys + 0.68
> > cusr 1.27 csys = 2.02 CPU)
> > Result: PASS
> >
So I figured out what's happening with that test warning. Short version is that it's harmless - it's some data that we're leaking in watch() that Perl is trying to clean up at interpreter shutdown, but can't.
Long version:
Nearly five years ago, I made a change to fix a bug with double DESTROY. It involves the glob value returned by watch(). The unfortunate thing is that I screwed up and incremented the reference count of glob too many times, so that the glob returned by watch() is leaked and isn't cleaned up until interpreter shutdown. However, we probably can't fix this simply by lowering the reference count, since I think that would invalidate the file descriptor used for communication. I'll think of a fix and put out a release tonight.