[R-SIG-Mac] Xcode 9

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Wed Sep 27 20:01:57 CEST 2017


Thanks. Nice to know it got fixed despite the somewhat pessimistic original
post.

Best,
Kasper

On Wed, Sep 27, 2017 at 4:32 AM, peter dalgaard <pdalgd at gmail.com> wrote:

>
> > On 27 Sep 2017, at 08:43 , Prof Brian Ripley <ripley at stats.ox.ac.uk>
> wrote:
> >
> > On 27/09/2017 03:28, Kasper Daniel Hansen wrote:
> >> I don't see this with
> >>   Xcode 9
> >>   OS X Sierra (10.12.6)
> >> and either
> >> R Under development (unstable) (2017-09-26 r73351) -- "Unsuffered
> >> Consequences"
> >> Copyright (C) 2017 The R Foundation for Statistical Computing
> >> Platform: x86_64-apple-darwin16.7.0 (64-bit)
> >> or
> >> R version 3.4.2 RC (2017-09-26 r73351) -- "Short Summer"
> >> Copyright (C) 2017 The R Foundation for Statistical Computing
> >> Platform: x86_64-apple-darwin16.7.0 (64-bit)
> >> Specifically I can compile R and it passes make check.  Perhaps it got
> >> fixed since the post.
> >
> > It did (look at the logs for r73347 and r73351), but also we have
> discovered that not all upgrades to Xcode 9 had the problem.
> >
>
> Yes. My home desktop machine updated command line tools only and didn't
> see the problem. The laptop wants to upgrade the full Xcode (no idea how
> that came to be...) but claims to need another 1.66GB of disk to upgrade,
> so it is probably not in the cards to check a build there just now. The
> work machine had the problem until I downgraded to Xcode 8.3.3, but as this
> is the machine building the actual release, I'm not touching it until some
> weeks after the 3.4.2 release.
>
> Right now, we just override the configure detected utimensat() declaration
> on all Macs, which should be harmless (also on High Sierra, although we
> wouldn't claim to support an OS which was unreleased at the code freeze).
> We'll think of a better fix --- it looks like the Curl developers have
> fixed a similar issue, so we can copy their approach.
>
> > While we are at it, there is a problem with finding the default time
> zone on High Sierra.  This is worked around already in R-devel and will be
> in 3.4.2 patched: until then setting TZ is a good workaround (and that is
> in the R-admin manual for 3.4.2 RC).
> >
> >> On Fri, Sep 22, 2017 at 4:47 AM, peter dalgaard <pdalgd at gmail.com>
> wrote:
> >>> Just a quick note: Xcode 9 will not presently create a working R on
> Sierra
> >>> or earlier.
> >
> > (I don't believe Xcode 9 is available for 'earlier'.)
>
> You're probably right. I wasn't sure when I wrote that (& also not sure
> whether one could cross-compile.)
>
> -pd
>
> >
> >>>
> >>> This is because it ships with an SDK for 10.13 (unreleased) and
> defines an
> >>> entry for utimensat(), which is not actually in the system library for
> >>> earlier versions.
> >>>
> >>> There is no way we can fix this reliably for the upcoming 3.4.2
> release,
> >>> so if you intend to build R from sources, either
> >>>
> >>> - just do not upgrade, stay on Xcode 8.3.3
> >>>
> >>> or
> >>>
> >>> - manually remove the line from config.h saying
> >>>
> >>> #define HAVE_UTIMENSAT 1
> >>>
> >>>
> >>> ----
> >>>
> >>> The slightly longer story is that Apple decided to have their include
> >>> files generate a _warning_ that utimensat() is only available in 10.13,
> >>> like this:
> >>>
> >>> gcc -I../../../R/src/extra  -I. -I../../src/include
> >>> -I../../../R/src/include  -I/usr/local/include -I../../../R/src/nmath
> >>> -DHAVE_CONFIG_H     -g -O2  -c ../../../R/src/main/platform.c -o
> platform.o
> >>> ../../../R/src/main/platform.c:2474:5: warning: 'utimensat' is only
> >>> available on
> >>>       macOS 10.13 or newer [-Wunguarded-availability-new]
> >>>     utimensat(AT_FDCWD, to, times, 0);
> >>>     ^~~~~~~~~
> >>> /Applications/Xcode.app/Contents/Developer/Platforms/
> >>> MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/
> include/sys/stat.h:374:5:
> >>> note:
> >>>       'utimensat' has been explicitly marked partial here
> >>> int     utimensat(int __fd, const char *__path, const struct timespec
> __...
> >>>         ^
> >>> ../../../R/src/main/platform.c:2474:5: note: enclose 'utimensat' in a
> >>>       __builtin_available check to silence this warning
> >>>     utimensat(AT_FDCWD, to, times, 0);
> >>>     ^~~~~~~~~
> >>> ../../../R/src/main/platform.c:2890:11: warning: 'utimensat' is only
> >>> available
> >>>       on macOS 10.13 or newer [-Wunguarded-availability-new]
> >>>     res = utimensat(AT_FDCWD, fn, times, 0) == 0;
> >>>           ^~~~~~~~~
> >>> /Applications/Xcode.app/Contents/Developer/Platforms/
> >>> MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/
> include/sys/stat.h:374:5:
> >>> note:
> >>>       'utimensat' has been explicitly marked partial here
> >>> int     utimensat(int __fd, const char *__path, const struct timespec
> __...
> >>>         ^
> >>> ../../../R/src/main/platform.c:2890:11: note: enclose 'utimensat' in a
> >>>       __builtin_available check to silence this warning
> >>>     res = utimensat(AT_FDCWD, fn, times, 0) == 0;
> >>>           ^~~~~~~~~
> >>> 2 warnings generated.
> >>>
> >>> Because of dynamic linking, we do not see the effect of this until we
> >>> actually try running the binary:
> >>>
> >>> begin installing recommended package MASS
> >>> dyld: lazy symbol binding failed: Symbol not found: _utimensat
> >>>   Referenced from: /Users/pd/r-release-branch/
> BUILD-dist/bin/exec/x86_64/R
> >>>   Expected in: /usr/lib/libSystem.B.dylib
> >>>
> >>> dyld: Symbol not found: _utimensat
> >>>   Referenced from: /Users/pd/r-release-branch/
> BUILD-dist/bin/exec/x86_64/R
> >>>   Expected in: /usr/lib/libSystem.B.dylib
> >>>
> >>> /Users/pd/r-release-branch/BUILD-dist/bin/INSTALL: line 34: 59149 Done
> >>>                 echo 'tools:::.install_packages()'
> >>>      59150 Abort trap: 6           | R_DEFAULT_PACKAGES= LC_COLLATE=C
> >>> "${R_HOME}/bin/R" $myArgs --slave --args ${args}
> >>>
> >>>
> >>> Same warning also happens during the configure checks, but as it is
> not an
> >>> error the test program compiles and links OK (but is never run), and
> we get
> >>>
> >>> checking whether utimensat exists and is declared... yes
> >>>
> >>> Ugh!...
> >>>
> >>>
> >>> - Peter D.
> >>>
> >>>
> >>> --
> >>> Peter Dalgaard, Professor,
> >>> Center for Statistics, Copenhagen Business School
> >>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> >>> Phone: (+45)38153501
> >>> Office: A 4.23
> >>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
> >>>
> >>> _______________________________________________
> >>> R-SIG-Mac mailing list
> >>> R-SIG-Mac at r-project.org
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>>
> >>      [[alternative HTML version deleted]]
> >> _______________________________________________
> >> R-SIG-Mac mailing list
> >> R-SIG-Mac at r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
> >
> > --
> > Brian D. Ripley,                  ripley at stats.ox.ac.uk
> > Emeritus Professor of Applied Statistics, University of Oxford
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
>
>
>
>
>
>
>
>
>
>

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list