Skip Menu |
Report information
Id: 132700
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: doughera <doughera [at] lafayette.edu>
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: medium
Type: library
Perl Version: 5.22.0
Fixed In: (no value)



To: perlbug [...] perl.org
Subject: Time::HiRes: macOS checks for both futimes() and utimensat().
From: Andy Dougherty <doughera [...] lafayette.edu>
Date: Tue, 9 Jan 2018 12:47:57 -0500
This is a bug report for perl from doughera@lafayette.edu, generated with the help of perlbug 1.40 running under perl 5.22.0. ----------------------------------------------------------------- [Please describe your issue here] after commit c9412ef201b89b9faba1e2ee0456e39d33eb1913, compilation on my Mac OS system fails with: cc -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.13 -fno-strict-aliasing -pipe -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -Os -DVERSION=\"1.9750\" -DXS_VERSION=\"1.9750\" "-I../.." -DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCKID_T -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK_NANOSLEEP_EMULATION -DTIME_HIRES_CLOCK -DHAS_FUTIMENS -DHAS_UTIMENSAT -DTIME_HIRES_UTIME -DTIME_HIRES_STAT_ST_XTIMESPEC -DTIME_HIRES_STAT=1 -DATLEASTFIVEOHOHFIVE HiRes.c HiRes.xs:1474:16: error: unrecognized platform name macOS if (UTIMENSAT_AVAILABLE) { ^ HiRes.xs:951:51: note: expanded from macro 'UTIMENSAT_AVAILABLE' # define UTIMENSAT_AVAILABLE __builtin_available(macOS 10.13, *) ^ 1 error generated. make[1]: *** [HiRes.o] Error 1 This is fixed in the attached patch, which uses the same check for both futimens() and utimensat(). This mattered on Mac OS X High Sierra 10.13.2 with Apple LLVM version 8.1.0 (clang-802.0.38) Target: x86_64-apple-darwin17.3.0 I'd appreciate confirmation that it doesn't break for others. I don't know why the previous version passed on the original submitter's system, nor why it didn't on my system. (I haven't been able to find good documentation on the relevant functions.) (perl -V info below is irrelevant, from a different machine.) -- Andy Dougherty doughera@lafayette.edu [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=medium module=Time::HiRes --- Site configuration information for perl 5.22.0: Configured by doughera at Wed Jul 22 16:15:18 EDT 2015. Summary of my perl5 (revision 5 version 22 subversion 0) configuration: Platform: osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux uname='linux fractal 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt11-1 (2015-05-24) x86_64 gnulinux ' config_args='-Dprefix=/opt/perl -Dscriptdir=/opt/perl/bin -des' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2', optimize='-O2', cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' --- @INC for perl 5.22.0: /opt/perl/lib/site_perl/5.22.0/x86_64-linux /opt/perl/lib/site_perl/5.22.0 /opt/perl/lib/5.22.0/x86_64-linux /opt/perl/lib/5.22.0 /opt/perl/lib/site_perl/5.20.1 /opt/perl/lib/site_perl/5.20.0 /opt/perl/lib/site_perl/5.18.2 /opt/perl/lib/site_perl/5.18.1 /opt/perl/lib/site_perl/5.18.0 /opt/perl/lib/site_perl/5.16.2 /opt/perl/lib/site_perl/5.16.0 /opt/perl/lib/site_perl/5.14.2 /opt/perl/lib/site_perl/5.12.3 /opt/perl/lib/site_perl/5.10.1 /opt/perl/lib/site_perl/5.8.9 /opt/perl/lib/site_perl . --- Environment for perl 5.22.0: HOME=/home/doughera LANG (unset) LANGUAGE (unset) LC_CTYPE=en_US.UTF-8 LD_LIBRARY_PATH=/usr/local/lib LOGDIR (unset) PATH=/home/doughera/script:/home/doughera/bin:/opt/perl/script:/opt/perl/bin:/opt/dist/bin:/opt/gnuplot/bin:/opt/groff/bin:/usr/local/script:/usr/local/bin:/opt/gnu/script:/opt/gnu/bin:/opt/dist/script:/bin:/usr/bin:/usr/X11R6/bin:/usr/openwin/bin:. PERL_BADLANG (unset) SHELL=/bin/bash
Download HiRes-patch.txt
text/plain 1.2k

Message body is not shown because sender requested not to inline it.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 2.8k
On Tue, 09 Jan 2018 18:56:29 GMT, doughera wrote: Show quoted text
> This is a bug report for perl from doughera@lafayette.edu, > generated with the help of perlbug 1.40 running under perl 5.22.0. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > after commit c9412ef201b89b9faba1e2ee0456e39d33eb1913, compilation on > my Mac OS system fails with: > > cc -c -fno-common -DPERL_DARWIN -mmacosx-version-min=10.13 > -fno-strict-aliasing -pipe -fstack-protector-strong > -I/opt/local/include > -DPERL_USE_SAFE_PUTENV -Wall -Werror=declaration-after-statement > -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -Os > -DVERSION=\"1.9750\" -DXS_VERSION=\"1.9750\" "-I../.." > -DTIME_HIRES_NANOSLEEP > -DTIME_HIRES_CLOCKID_T -DTIME_HIRES_CLOCK_GETTIME > -DTIME_HIRES_CLOCK_GETRES > -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK_NANOSLEEP_EMULATION > -DTIME_HIRES_CLOCK -DHAS_FUTIMENS -DHAS_UTIMENSAT -DTIME_HIRES_UTIME > -DTIME_HIRES_STAT_ST_XTIMESPEC -DTIME_HIRES_STAT=1 > -DATLEASTFIVEOHOHFIVE HiRes.c > HiRes.xs:1474:16: error: unrecognized platform name macOS > if (UTIMENSAT_AVAILABLE) { > ^ > HiRes.xs:951:51: note: expanded from macro 'UTIMENSAT_AVAILABLE' > # define UTIMENSAT_AVAILABLE __builtin_available(macOS 10.13, *) > ^ > 1 error generated. > make[1]: *** [HiRes.o] Error 1 > > This is fixed in the attached patch, which uses the same check for > both > futimens() and utimensat(). > > This mattered on Mac OS X High Sierra 10.13.2 with Apple LLVM version > 8.1.0 (clang-802.0.38) Target: x86_64-apple-darwin17.3.0 > > I'd appreciate confirmation that it doesn't break for others. > I don't know why the previous version passed on the original > submitter's system, nor why it didn't on my system. (I haven't been > able to find good documentation on the relevant functions.) > > (perl -V info below is irrelevant, from a different machine.) > > -- > Andy Dougherty doughera@lafayette.edu >
Andy, does this commit, made earlier today, resolve the problem for you? ##### commit de3293c06d610babde277963c152d0294afadc9e Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> Date: Tue Jan 9 12:41:38 2018 +0000 Update Time-HiRes to CPAN version 1.9752 [DELTA] 1.9752 [2018-01-04] - fix an error in the error message of utimensat() not available: it said futimens() not available - add --force alias for Makefile.PL --configure 1.9751 [2018-01-02] - in macOS/OSX/Darwin, use __has_builtin() check also for utimensat(), can cause errors like "HiRes.xs:1474:16: error: unrecognized platform name macOS" [rt.cpan.org #123994] (oversight from 1.9749) ..... ##### Thank you very much. -- James E Keenan (jkeenan@cpan.org)
To: James E Keenan via RT <perlbug-followup [...] perl.org>
Date: Tue, 9 Jan 2018 20:37:07 -0500
Subject: Re: [perl #132700] Time::HiRes: macOS checks for both futimes() and utimensat().
From: Andy Dougherty <doughera [...] lafayette.edu>
Download (untitled) / with headers
text/plain 997b
On Tue, Jan 09, 2018 at 11:26:29AM -0800, James E Keenan via RT wrote: Show quoted text
> On Tue, 09 Jan 2018 18:56:29 GMT, doughera wrote:
Show quoted text
> > after commit c9412ef201b89b9faba1e2ee0456e39d33eb1913, compilation on > > my Mac OS system fails with: > > > > HiRes.xs:1474:16: error: unrecognized platform name macOS > > if (UTIMENSAT_AVAILABLE) { > > ^ > > HiRes.xs:951:51: note: expanded from macro 'UTIMENSAT_AVAILABLE' > > # define UTIMENSAT_AVAILABLE __builtin_available(macOS 10.13, *) > > ^
Show quoted text
> Andy, does this commit, made earlier today, resolve the problem for you? > > ##### > commit de3293c06d610babde277963c152d0294afadc9e > Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> > Date: Tue Jan 9 12:41:38 2018 +0000 > > Update Time-HiRes to CPAN version 1.9752
Yes it does. Thanks for catching that and following up. My ticket can be closed. Thanks, -- Andy Dougherty doughera@lafayette.edu
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.1k
On Wed, 10 Jan 2018 02:29:28 GMT, doughera wrote: Show quoted text
> On Tue, Jan 09, 2018 at 11:26:29AM -0800, James E Keenan via RT wrote:
> > On Tue, 09 Jan 2018 18:56:29 GMT, doughera wrote:
>
> > > after commit c9412ef201b89b9faba1e2ee0456e39d33eb1913, compilation on > > > my Mac OS system fails with: > > > > > > HiRes.xs:1474:16: error: unrecognized platform name macOS > > > if (UTIMENSAT_AVAILABLE) { > > > ^ > > > HiRes.xs:951:51: note: expanded from macro 'UTIMENSAT_AVAILABLE' > > > # define UTIMENSAT_AVAILABLE __builtin_available(macOS 10.13, *) > > > ^
> >
> > Andy, does this commit, made earlier today, resolve the problem for you? > > > > ##### > > commit de3293c06d610babde277963c152d0294afadc9e > > Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk> > > Date: Tue Jan 9 12:41:38 2018 +0000 > > > > Update Time-HiRes to CPAN version 1.9752
> > Yes it does. Thanks for catching that and following up. > > My ticket can be closed. > > Thanks, >
Closed, as pending release, per OP request. Thank you very much. -- James E Keenan (jkeenan@cpan.org)
Download (untitled) / with headers
text/plain 317b
Thank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been resolved. Perl 5.28.0 may be downloaded via: https://metacpan.org/release/XSAWYERX/perl-5.28.0 If you find that the problem persists, feel free to reopen this ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org