[R-pkg-devel] Virtual C++ functions

2023-11-16 Thread Michael Meyer via R-package-devel
Thanks for all replies. I think the idea of a callback and link to 
RcppXPtrUtils is pointing me in the right direction.
Michael Meyer
[[alternative HTML version deleted]]

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


[R-pkg-devel] Can -mmacosx-version-min be raised to 10.15 ?

2023-11-16 Thread Dirk Eddelbuettel


Hi Simon,

We use C++20 'inside' our library and C++17 in the API. Part of our C++17 use
is now expanding to std::filesystem whose availability is dependent on the
implementation. 

The compiler tells us (in a compilation using -mmacosx-version-min=10.14)
that the features we want are only available with 10.15.

Would we be allowed to use this value of '10.15' on CRAN?

Thanks as always,  Dirk


[1] 
https://github.com/TileDB-Inc/TileDB/actions/runs/6882271269/job/18720444943?pr=4518#step:7:185

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] Can -mmacosx-version-min be raised to 10.15 ?

2023-11-16 Thread Simon Urbanek
Dirk,

can you clarify where the flags come from? The current CRAN builds 
(big-sur-x86_64 and big-sur-arm64) use

export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
export MACOSX_DEPLOYMENT_TARGET=11.0

so the lowest target is 11.0 and it is no longer forced it in the flags (so 
that users can more easily choose their desired targets).

Cheers,
Simon



> On 17/11/2023, at 2:57 AM, Dirk Eddelbuettel  wrote:
> 
> 
> Hi Simon,
> 
> We use C++20 'inside' our library and C++17 in the API. Part of our C++17 use
> is now expanding to std::filesystem whose availability is dependent on the
> implementation. 
> 
> The compiler tells us (in a compilation using -mmacosx-version-min=10.14)
> that the features we want are only available with 10.15.
> 
> Would we be allowed to use this value of '10.15' on CRAN?
> 
> Thanks as always,  Dirk
> 
> 
> [1] 
> https://github.com/TileDB-Inc/TileDB/actions/runs/6882271269/job/18720444943?pr=4518#step:7:185
> 
> -- 
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 

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


Re: [R-pkg-devel] Can -mmacosx-version-min be raised to 10.15 ?

2023-11-16 Thread Dirk Eddelbuettel


Simon,

On 17 November 2023 at 09:35, Simon Urbanek wrote:
| can you clarify where the flags come from? The current CRAN builds 
(big-sur-x86_64 and big-sur-arm64) use
| 
| export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
| export MACOSX_DEPLOYMENT_TARGET=11.0
| 
| so the lowest target is 11.0 and it is no longer forced it in the flags (so 
that users can more easily choose their desired targets).

Beautiful, solves our issue.  Was that announced at some point? If so, where?

For reference the R-on-macOS FAQ I consulted still talks about 10.13 at
https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages

  CC = clang -mmacosx-version-min=10.13
  CXX = clang++ -mmacosx-version-min=10.13 -std=gnu++14
  FC = gfortran -mmacosx-version-min=10.13
  OBJC = clang -mmacosx-version-min=10.13
  OBJCXX = clang++ -mmacosx-version-min=10.13

so someone may want to refresh this. It is what I consulted as relevant info.

Thanks, Dirk

| 
| Cheers,
| Simon
| 
| 
| 
| > On 17/11/2023, at 2:57 AM, Dirk Eddelbuettel  wrote:
| > 
| > 
| > Hi Simon,
| > 
| > We use C++20 'inside' our library and C++17 in the API. Part of our C++17 
use
| > is now expanding to std::filesystem whose availability is dependent on the
| > implementation. 
| > 
| > The compiler tells us (in a compilation using -mmacosx-version-min=10.14)
| > that the features we want are only available with 10.15.
| > 
| > Would we be allowed to use this value of '10.15' on CRAN?
| > 
| > Thanks as always,  Dirk
| > 
| > 
| > [1] 
https://github.com/TileDB-Inc/TileDB/actions/runs/6882271269/job/18720444943?pr=4518#step:7:185
| > 
| > -- 
| > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| > 
| > __
| > R-package-devel@r-project.org mailing list
| > https://stat.ethz.ch/mailman/listinfo/r-package-devel
| > 
| 

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] Can -mmacosx-version-min be raised to 10.15 ?

2023-11-16 Thread Simon Urbanek
Dirk,


> On 17/11/2023, at 10:28 AM, Dirk Eddelbuettel  wrote:
> 
> 
> Simon,
> 
> On 17 November 2023 at 09:35, Simon Urbanek wrote:
> | can you clarify where the flags come from? The current CRAN builds 
> (big-sur-x86_64 and big-sur-arm64) use
> | 
> | export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
> | export MACOSX_DEPLOYMENT_TARGET=11.0
> | 
> | so the lowest target is 11.0 and it is no longer forced it in the flags (so 
> that users can more easily choose their desired targets).
> 
> Beautiful, solves our issue.  Was that announced at some point? If so, where?
> 

I don't see what is there to announce as the packages should be simply using 
flags passed from R and that process did not change.

That said, the binary target for CRAN has been announced on this list as part 
of the big-sur build announcement:
https://stat.ethz.ch/pipermail/r-sig-mac/2023-April/014731.html


> For reference the R-on-macOS FAQ I consulted still talks about 10.13 at
> https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages
> 
>  CC = clang -mmacosx-version-min=10.13
>  CXX = clang++ -mmacosx-version-min=10.13 -std=gnu++14
>  FC = gfortran -mmacosx-version-min=10.13
>  OBJC = clang -mmacosx-version-min=10.13
>  OBJCXX = clang++ -mmacosx-version-min=10.13
> 
> so someone may want to refresh this. It is what I consulted as relevant info.
> 

It says "Look at file /Library/Frameworks/R.framework/Resources/etc/Makeconf" 
so it is just an example that will vary by build. For example big-sur-arm64 
will give you

$ grep -E '^(CC|CXX|FC|OBJC|OBJCXX) ' 
/Library/Frameworks/R.framework/Resources/etc/Makeconf
CC = clang -arch arm64
CXX = clang++ -arch arm64 -std=gnu++14
FC = /opt/R/arm64/bin/gfortran -mtune=native
OBJC = clang -arch arm64
OBJCXX = clang++ -arch arm64

Again, this is just an example, no one should be entering such flags by hand - 
that's why they are in Makeconf so packages can use them without worrying about 
the values (see R-exts 1.2: 
https://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup for 
details).

Cheers,
Simon



> Thanks, Dirk
> 
> | 
> | Cheers,
> | Simon
> | 
> | 
> | 
> | > On 17/11/2023, at 2:57 AM, Dirk Eddelbuettel  wrote:
> | > 
> | > 
> | > Hi Simon,
> | > 
> | > We use C++20 'inside' our library and C++17 in the API. Part of our C++17 
> use
> | > is now expanding to std::filesystem whose availability is dependent on the
> | > implementation. 
> | > 
> | > The compiler tells us (in a compilation using -mmacosx-version-min=10.14)
> | > that the features we want are only available with 10.15.
> | > 
> | > Would we be allowed to use this value of '10.15' on CRAN?
> | > 
> | > Thanks as always,  Dirk
> | > 
> | > 
> | > [1] 
> https://github.com/TileDB-Inc/TileDB/actions/runs/6882271269/job/18720444943?pr=4518#step:7:185
> | > 
> | > -- 
> | > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> | > 
> | > __
> | > R-package-devel@r-project.org mailing list
> | > https://stat.ethz.ch/mailman/listinfo/r-package-devel
> | > 
> | 
> 
> -- 
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
> 

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


Re: [R-pkg-devel] Can -mmacosx-version-min be raised to 10.15 ?

2023-11-16 Thread Dirk Eddelbuettel


Simon,

On 17 November 2023 at 10:43, Simon Urbanek wrote:
| > On 17/11/2023, at 10:28 AM, Dirk Eddelbuettel  wrote:
| > On 17 November 2023 at 09:35, Simon Urbanek wrote:
| > | can you clarify where the flags come from? The current CRAN builds 
(big-sur-x86_64 and big-sur-arm64) use
| > | 
| > | export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
| > | export MACOSX_DEPLOYMENT_TARGET=11.0
| > | 
| > | so the lowest target is 11.0 and it is no longer forced it in the flags 
(so that users can more easily choose their desired targets).
| > 
| > Beautiful, solves our issue.  Was that announced at some point? If so, 
where?
| > 
| 
| I don't see what is there to announce as the packages should be simply using 
flags passed from R and that process did not change.
| 
| That said, the binary target for CRAN has been announced on this list as part 
of the big-sur build announcement:
| https://stat.ethz.ch/pipermail/r-sig-mac/2023-April/014731.html

I don't own or (directly) use macOS hardware so I am not on that list. 
 
| > For reference the R-on-macOS FAQ I consulted still talks about 10.13 at
| > 
https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages
| > 
| >  CC = clang -mmacosx-version-min=10.13
| >  CXX = clang++ -mmacosx-version-min=10.13 -std=gnu++14
| >  FC = gfortran -mmacosx-version-min=10.13
| >  OBJC = clang -mmacosx-version-min=10.13
| >  OBJCXX = clang++ -mmacosx-version-min=10.13
| > 
| > so someone may want to refresh this. It is what I consulted as relevant 
info.
| > 
| 
| It says "Look at file /Library/Frameworks/R.framework/Resources/etc/Makeconf" 
so it is just an example that will vary by build. For example big-sur-arm64 
will give you
| 
| $ grep -E '^(CC|CXX|FC|OBJC|OBJCXX) ' 
/Library/Frameworks/R.framework/Resources/etc/Makeconf
| CC = clang -arch arm64
| CXX = clang++ -arch arm64 -std=gnu++14
| FC = /opt/R/arm64/bin/gfortran -mtune=native
| OBJC = clang -arch arm64
| OBJCXX = clang++ -arch arm64
| 
| Again, this is just an example, no one should be entering such flags by hand 
- that's why they are in Makeconf so packages can use them without worrying 
about the values (see R-exts 1.2: 
https://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup for 
details).

I recommend you spend a moment with for example the (rather handy) search
capability of GitHub to search through the 'cran' organisation mirroring the
repo.  The package I maintain is far from being the only one setting the flag.

https://github.com/search?q=org%3Acran+mmacosx-version-min&type=code

Best, Dirk

| Cheers,
| Simon
| 
| 
| 
| > Thanks, Dirk
| > 
| > | 
| > | Cheers,
| > | Simon
| > | 
| > | 
| > | 
| > | > On 17/11/2023, at 2:57 AM, Dirk Eddelbuettel  wrote:
| > | > 
| > | > 
| > | > Hi Simon,
| > | > 
| > | > We use C++20 'inside' our library and C++17 in the API. Part of our 
C++17 use
| > | > is now expanding to std::filesystem whose availability is dependent on 
the
| > | > implementation. 
| > | > 
| > | > The compiler tells us (in a compilation using 
-mmacosx-version-min=10.14)
| > | > that the features we want are only available with 10.15.
| > | > 
| > | > Would we be allowed to use this value of '10.15' on CRAN?
| > | > 
| > | > Thanks as always,  Dirk
| > | > 
| > | > 
| > | > [1] 
https://github.com/TileDB-Inc/TileDB/actions/runs/6882271269/job/18720444943?pr=4518#step:7:185
| > | > 
| > | > -- 
| > | > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| > | > 
| > | > __
| > | > R-package-devel@r-project.org mailing list
| > | > https://stat.ethz.ch/mailman/listinfo/r-package-devel
| > | > 
| > | 
| > 
| > -- 
| > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
| > 
| 

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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