[R-SIG-Mac] 'math.h' file not found

63 views
Skip to first unread message

Roger Koenker

unread,
Dec 18, 2018, 12:31:11 PM12/18/18
to R-SIG-Mac
I have an annoying installation issue with a new mac mini: for example I see:

> In file included from /usr/local/clang6/include/c++/v1/cmath:305:
> /usr/local/clang6/include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
> #include_next <math.h>
> ^~~~~~~~
> 1 error generated.

even though:

> yzzy: ls -l /usr/local/clang6/include/c++/v1/math.h
> -rw-r--r-- 1 root wheel 48240 Mar 2 2018 /usr/local/clang6/include/c++/v1/math.h

this is with clang tools installed from Simon’s page and after trying various sorts of
voodoo from googling like

>xyzzy: xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates


R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

Any hints appreciated, and apologies if this should have been in R-devel
_______________________________________________
R-SIG-Mac mailing list
R-SI...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Balamuta, James Joseph

unread,
Dec 18, 2018, 12:41:27 PM12/18/18
to Koenker, Roger W, R-SIG-Mac
Roger,

Due to macOS Mojave shift where system headers are located, you'll need to run:

sudo installer -pkg \
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg \
-target /

This installs the headers back to the default location of previous macOS builds, e.g. /usr/local.

Sincerely,

JJB

P.S. Can't wait for you to come back and visit UIUC in Sp'19

Roger Koenker

unread,
Dec 18, 2018, 3:07:49 PM12/18/18
to Balamuta, James Joseph, R-SIG-Mac
James,

Many thanks, all is well now. Look forward to seeing you in April.

Roger


> On Dec 18, 2018, at 5:40 PM, Balamuta, James Joseph <bala...@illinois.edu> wrote:
>
> Roger,
>
> Due to macOS Mojave shift where system headers are located, you'll need to run:
>
> sudo installer -pkg \
> /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg \
> -target /
>
> This installs the headers back to the default location of previous macOS builds, e.g. /usr/local.
>
> Sincerely,
>
> JJB
>
> P.S. Can't wait for you to come back and visit UIUC in Sp'19
>
> On 12/18/18, 11:31 AM, "R-SIG-Mac on behalf of Roger Koenker" <r-sig-ma...@r-project.org on behalf of rkoe...@illinois.edu> wrote:
>
Reply all
Reply to author
Forward
0 new messages