On Fri, Aug 05, 2022 at 09:03:56AM +0200, Antoine Jacoutot wrote:
> On Wed, Aug 03, 2022 at 09:13:25AM -0600, Ingo Feinerer wrote:
> > CVSROOT:    /cvs
> > Module name:        ports
> > Changes by: [email protected]        2022/08/03 09:13:25
> > 
> > Modified files:
> >     math/R         : Makefile distinfo 
> >     math/R/pkg     : PLIST 
> >     math/rstudio   : Makefile 
> >     math/rstudio/patches: 
> >                           patch-src_cpp_core_r_util_REnvironmentPosix_cpp 
> > 
> > Log message:
> > Update to R 4.2.1
> > 
> > ok tb@
> 
> This broke math/rstudio:
> 

> /exopi-obj/pobj/rstudio-1.3.959/rstudio-1.3.959/src/cpp/r/session/RSession.cpp:438:11:
>  error: use of undeclared identifier 'Rf_countContexts'
>    return Rf_countContexts(CTXT_BROWSER, 1) > 0;
>           ^
> 1 error generated.
> ninja: build stopped: subcommand failed.

Looks like "support compilation with r-devel" should fix this.
https://github.com/rstudio/rstudio/commit/872e2806f74e922a25e0f9586faa6624883728ca

Have a build running.

Index: patches/patch-src_cpp_r_session_RSession_cpp
===================================================================
RCS file: patches/patch-src_cpp_r_session_RSession_cpp
diff -N patches/patch-src_cpp_r_session_RSession_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_cpp_r_session_RSession_cpp        5 Aug 2022 07:15:22 
-0000
@@ -0,0 +1,17 @@
+Backport 
https://github.com/rstudio/rstudio/commit/872e2806f74e922a25e0f9586faa6624883728ca
+to fix build with newer R.
+
+Index: src/cpp/r/session/RSession.cpp
+--- src/cpp/r/session/RSession.cpp.orig
++++ src/cpp/r/session/RSession.cpp
+@@ -67,6 +67,10 @@
+ 
+ #include <gsl/gsl>
+ 
++extern "C" {
++int Rf_countContexts(int, int);
++}
++
+ #define CTXT_BROWSER 16
+ 
+ // get rid of windows TRUE and FALSE definitions

Reply via email to