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

fix(r): Ensure CXX_STD is set everywhere #1706

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

paleolimbot
Copy link
Member

Upon submitting adbcpostgresql to CRAN, there is now a build error for R 4.1 on Windows, which uses C++14 as its default standard if unspecified. This gives:

g++ -std=gnu++14  -I"D:/RCompile/recent/R-4.2.3/include" -DNDEBUG -I../src -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO    -I"d:/rtools42/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c connection.cc -o connection.o
In file included from connection.cc:37:
result_helper.h:37:8: error: 'optional' in namespace 'std' does not name a template type
   37 |   std::optional<double> ParseDouble() const {
      |        ^~~~~~~~
result_helper.h:37:3: note: 'std::optional' is only available from C++17 onwards

https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/adbcpostgresql-00install.html

@github-actions github-actions bot added this to the ADBC Libraries 1.0.0 milestone Apr 3, 2024
@paleolimbot paleolimbot changed the title fix(r): Ensure CXX_STD is set everywhere fix(r): Ensure CXX_STD is set everywhere Apr 3, 2024
@lidavidm lidavidm merged commit a35fae0 into apache:main Apr 3, 2024
22 of 23 checks passed
@paleolimbot paleolimbot deleted the r-postgres-cxxstd branch April 5, 2024 13:41
cocoa-xu pushed a commit to cocoa-xu/arrow-adbc that referenced this pull request Apr 12, 2024
Upon submitting adbcpostgresql to CRAN, there is now a build error for R
4.1 on Windows, which uses C++14 as its default standard if unspecified.
This gives:

```
g++ -std=gnu++14  -I"D:/RCompile/recent/R-4.2.3/include" -DNDEBUG -I../src -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO    -I"d:/rtools42/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c connection.cc -o connection.o
In file included from connection.cc:37:
result_helper.h:37:8: error: 'optional' in namespace 'std' does not name a template type
   37 |   std::optional<double> ParseDouble() const {
      |        ^~~~~~~~
result_helper.h:37:3: note: 'std::optional' is only available from C++17 onwards
```


https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/adbcpostgresql-00install.html
paleolimbot added a commit to paleolimbot/arrow-adbc that referenced this pull request Apr 15, 2024
Upon submitting adbcpostgresql to CRAN, there is now a build error for R
4.1 on Windows, which uses C++14 as its default standard if unspecified.
This gives:

```
g++ -std=gnu++14  -I"D:/RCompile/recent/R-4.2.3/include" -DNDEBUG -I../src -DADBC_EXPORT="" -D__USE_MINGW_ANSI_STDIO    -I"d:/rtools42/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c connection.cc -o connection.o
In file included from connection.cc:37:
result_helper.h:37:8: error: 'optional' in namespace 'std' does not name a template type
   37 |   std::optional<double> ParseDouble() const {
      |        ^~~~~~~~
result_helper.h:37:3: note: 'std::optional' is only available from C++17 onwards
```


https://www.r-project.org/nosvn/R.check/r-oldrel-windows-x86_64/adbcpostgresql-00install.html
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

Successfully merging this pull request may close these issues.

2 participants