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.

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 <pda...@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'.)


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....@cbs.dk  Priv: pda...@gmail.com

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to