Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is R 4.0 necessary? #56

Closed
renkun-ken opened this issue Feb 19, 2021 · 6 comments
Closed

Is R 4.0 necessary? #56

renkun-ken opened this issue Feb 19, 2021 · 6 comments

Comments

@renkun-ken
Copy link
Contributor

renkun-ken commented Feb 19, 2021

It DESCRIPTION it says

Depends:
    R (>= 4.0.0)

I checked the dependencies, none of the packages we depend on requires R >= 4.0.

I wonder which part of the package requires R 4.0? It would be nice if we could also support R 3.6 perhaps?

@renkun-ken
Copy link
Contributor Author

From the dependencies, it looks like we only need R >= 3.2.0 (required by https://github.com/r-lib/systemfonts/blob/master/DESCRIPTION#L36). I tried on a machine with R 3.6.1 and everything seems to work properly.

@nx10
Copy link
Owner

nx10 commented Feb 19, 2021

The reason for R 4.0 is the updated C++ compiler under Windows. Belle depends on the C++17 standard which is only available in Rtools40 on windows.

I am quite busy at the moment, but will evaluate how much work it is to Backport Belle to C++14 soon.

@renkun-ken
Copy link
Contributor Author

I see, looks like it is a Windows-only issue. I'm curious if it is possible to require different versions of R on different platforms as it seems to work properly on Linux and macOS without such problem.

@nx10
Copy link
Owner

nx10 commented Feb 19, 2021

Yes this is a windows only issue. I think the only way (other than backporting) would be to conditionally disable parts of the code during compile time depending on compiler features. (Disable webserver functionality for windows with R < 4.0)

@renkun-ken
Copy link
Contributor Author

Yes this is a windows only issue. I think the only way (other than backporting) would be to conditionally disable parts of the code during compile time depending on compiler features. (Disable webserver functionality for windows with R < 4.0)

I think this makes good sense.

@nx10
Copy link
Owner

nx10 commented Feb 19, 2021

I just experimented with backporting Belle:

It turned out that windows R < 4.0 uses GCC 4.9 and actually only supports C++11 without having users manually edit a file in their home directory.

So I backported to C++11 which was easier then expected, but compiling Boost/Beast led to "internal compiler errors" with GCC 4.9. This is known and will not be fixed.

I have now set the minimum R version to >= 3.2 in the DESCRIPTION (5bccb5a). For windows users the installation will fail for anything < 4.0, but now Linux and macOS users can install it for earlier versions. We will have to see whether CRAN allows this in the next release, but I am optimistic, as we do specify C++17 in the SystemRequirements field.

@nx10 nx10 closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants