Re: [Rd] #include_next not found

2019-08-07 Thread Koenker, Roger W
Yes,  this did the trick, thanks very much!  I’m cc’ing r-devel  just for the 
record.


Roger Koenker
r.koen...@ucl.ac.uk
Department of Economics, UCL
London  WC1H 0AX.


On Aug 7, 2019, at 4:55 PM, Steven Dirkse 
mailto:sdir...@gams.com>> wrote:

Roger,

Updating Xcode has the unfortunate side effect of wiping out the std header 
files from /usr/include.  The fix - once you know about it - is mercifully 
easy.  Here's my notes on the subject, recorded only yesterday so I don't waste 
more time the next time.

Xcode 10.3
Aug 2019: we updated to Xcode 10.3. First, we did the update through the App 
Store. Next, we opened Xcode in the App Store and said yes to “Install required 
additional components?” But that's not all! As admin, I did

sudo open 
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

FYI, I needed an additional step to manually patch /usr/include/sys/ucred.h but 
it's not likely you'll need that.

-Steve

On Wed, Aug 7, 2019 at 11:46 AM Koenker, Roger W 
mailto:rkoen...@illinois.edu>> wrote:
Dear All,

Just when I thought I had the plague of gfortran-9 under control, I made the 
tactical error
of allowing my mac mini to “upgrade” to macOS 10.14.6 which apparently also 
upgraded
Xcode to 10.3.  In consequence I’m having difficulty building my packages.  The 
current
symptom is:

/usr/local/clang7/bin/clang 
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   
-I/usr/local/clang7/include/c++/v1  -fPIC  -Wall -g -O2  -c mcmb.c -o mcmb.o
In file included from mcmb.c:11:
/usr/local/clang7/include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file 
not found
#include_next 
  ^

My first thought was I should install Simon’s clang-7.0.0 and gfortran-6.1 
packages
which I dutifully did.  The next thought was to update my ~/.R/Makevars file to:

CC=/usr/local/clang7/bin/clang
CXX=/usr/local/clang7/bin/clang++
LDFLAGS=-L/usr/local/clang7/lib
CPPFLAGS=-I/usr/local/clang7/include/c++/v1
FC=/usr/local/gfortran/bin/gfortran
FLIBS=-L/usr/local/gfortran/lib -lgfortran

Further googling has left me unenlightened…  oh, and I’m running
R version 3.6.1 (2019-07-05) -- "Action of the Toes"

Roger Koenker
r.koen...@ucl.ac.uk
Department of Economics, UCL
London  WC1H 0AX.


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


--
Steven Dirkse, Ph.D.
GAMS Development Corp.
office: 202.342.0180



[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] #include_next not found

2019-08-07 Thread Roy Mendelssohn - NOAA Federal via R-devel
Hi Roger:

This came up in the r-sig-mac list.  Try removing the CPPFLAGS.   Updates to 
Xcode appear to erase the headers where you are pointing to.  The CRAN flags 
that Simon uses  point elsewhere. Look at the r-sig-mac under topic "Xcode 10.3 
and header flles".

HTH,

-Roy


> On Aug 7, 2019, at 8:46 AM, Koenker, Roger W  wrote:
> 
> Dear All,
> 
> Just when I thought I had the plague of gfortran-9 under control, I made the 
> tactical error
> of allowing my mac mini to “upgrade” to macOS 10.14.6 which apparently also 
> upgraded
> Xcode to 10.3.  In consequence I’m having difficulty building my packages.  
> The current
> symptom is:
> 
> /usr/local/clang7/bin/clang 
> -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   
> -I/usr/local/clang7/include/c++/v1  -fPIC  -Wall -g -O2  -c mcmb.c -o mcmb.o
> In file included from mcmb.c:11:
> /usr/local/clang7/include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file 
> not found
> #include_next 
>  ^
> 
> My first thought was I should install Simon’s clang-7.0.0 and gfortran-6.1 
> packages
> which I dutifully did.  The next thought was to update my ~/.R/Makevars file 
> to:
> 
> CC=/usr/local/clang7/bin/clang
> CXX=/usr/local/clang7/bin/clang++
> LDFLAGS=-L/usr/local/clang7/lib
> CPPFLAGS=-I/usr/local/clang7/include/c++/v1
> FC=/usr/local/gfortran/bin/gfortran
> FLIBS=-L/usr/local/gfortran/lib -lgfortran
> 
> Further googling has left me unenlightened…  oh, and I’m running
> R version 3.6.1 (2019-07-05) -- "Action of the Toes"
> 
> Roger Koenker
> r.koen...@ucl.ac.uk
> Department of Economics, UCL
> London  WC1H 0AX.
> 
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

**
"The contents of this message do not reflect any position of the U.S. 
Government or NOAA."
**
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] #include_next not found

2019-08-07 Thread Koenker, Roger W
Dear All,

Just when I thought I had the plague of gfortran-9 under control, I made the 
tactical error
of allowing my mac mini to “upgrade” to macOS 10.14.6 which apparently also 
upgraded
Xcode to 10.3.  In consequence I’m having difficulty building my packages.  The 
current
symptom is:

/usr/local/clang7/bin/clang 
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   
-I/usr/local/clang7/include/c++/v1  -fPIC  -Wall -g -O2  -c mcmb.c -o mcmb.o
In file included from mcmb.c:11:
/usr/local/clang7/include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file 
not found
#include_next 
  ^

My first thought was I should install Simon’s clang-7.0.0 and gfortran-6.1 
packages
which I dutifully did.  The next thought was to update my ~/.R/Makevars file to:

CC=/usr/local/clang7/bin/clang
CXX=/usr/local/clang7/bin/clang++
LDFLAGS=-L/usr/local/clang7/lib
CPPFLAGS=-I/usr/local/clang7/include/c++/v1
FC=/usr/local/gfortran/bin/gfortran
FLIBS=-L/usr/local/gfortran/lib -lgfortran

Further googling has left me unenlightened…  oh, and I’m running
R version 3.6.1 (2019-07-05) -- "Action of the Toes"

Roger Koenker
r.koen...@ucl.ac.uk
Department of Economics, UCL
London  WC1H 0AX.


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] NextMethod() and argument laziness

2019-08-07 Thread Davis Vaughan
Hi all, I'd like to ask if the following behavior is a bug. To me it
certainly feels surprising, at the very least. In this example, I would
like to call NextMethod() from my `child` object, have `cols` be left
untouched, and then substitute(cols) in the parent method. It works when
you use a `parent` object (as expected), but I would have also expected to
get `mpg` back when calling it from the `child` method.

my_generic <- function(x, cols) {
  UseMethod("my_generic")
}
my_generic.parent <- function(x, cols) {
  substitute(cols)
}
my_generic.child <- function(x, cols) {
  NextMethod()
}
obj_parent <- structure(mtcars, class = c("parent", class(mtcars)))
obj_child <- structure(obj_parent, class = c("child", class(obj_parent)))

my_generic(obj_parent, mpg)
#> mpg

my_generic(obj_child, mpg)
#> cols

Thanks,
Davis

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel