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

Error: C++20 standard requested but CXX20 is not defined #32

Closed
martin-g opened this issue Jun 29, 2023 · 8 comments
Closed

Error: C++20 standard requested but CXX20 is not defined #32

martin-g opened this issue Jun 29, 2023 · 8 comments

Comments

@martin-g
Copy link

martin-g commented Jun 29, 2023

Hello,

The build of NanoMethViz at https://bioconductor.org/checkResults/3.18/bioc-LATEST/NanoMethViz/kunpeng2-install.html (Linux ARM64) fails with:

Error: C++20 standard requested but CXX20 is not defined

It seems this is the only Bioconductor package that requires CXX20.

I have looked around and found that it actually requires CXX17 - https://github.com/Shians/NanoMethViz/blob/master/DESCRIPTION#L82, done with b5bedf6

Assuming that the code here in Github is newer than at Bioconductor Git repo (https://code.bioconductor.org/browse/NanoMethViz/blob/devel/DESCRIPTION#L77, CXX20) I'd like to request for an update of the Bioc repo, so that the build of NanoMethViz is fixed.

Thank you!

@Shians
Copy link
Owner

Shians commented Jul 11, 2023

Thank you very much for letting me know, I just pushed the fix to BioC devel.

@Shians Shians closed this as completed Jul 11, 2023
@sachingadakh
Copy link

@martin-g Hello I am facing the same issue. Has it resolved for you?

@martin-g
Copy link
Author

@martin-g
Copy link
Author

Oops, I noticed after sending my previous message that the link is for Bioconductor 3.18!

https://bioconductor.org/checkResults/3.19/bioc-LATEST/NanoMethViz/kunpeng2-install.html - 3.19 still fails the same way!

@Shians Could you please take a new look ?

@Shians
Copy link
Owner

Shians commented Apr 22, 2024

Thanks for letting me know, how do you actually get to that page? I usually keep an eye on the build status from clicking the badge on the devel site. https://bioconductor.org/checkResults/devel/bioc-LATEST/NanoMethViz/, but it doesn't include the Linux build.

I'll roll it back to C++17 again, but C++20 has been available for 3-4 years now, I'd like to figure out why it's still not properly supported on that particular build machine, or perhaps I've missed something.

@martin-g
Copy link
Author

The Linux ARM64 machine is an experimental "guest builder" at Bioconductor. It is not maintained by the Bioc core team but by a community user (me).
It seems the builder has been excluded from the build farm few days ago:

I've contacted the Bioc core team why it has been excluded. I guess it is because of the update to R 4.4 beta that happened last week. I was a bit slow with it and maybe this caused some problems ...

About C++20: the system uses by default GNU compilers version 10.3.1. I will change it to use ver. 12. I guess this will resolve the issue! I'll keep you posted!

@martin-g
Copy link
Author

martin-g commented Apr 22, 2024

About C++20: the system uses by default GNU compilers version 10.3.1. I will change it to use ver. 12. I guess this will resolve the issue! I'll keep you posted!

It was an error in ~/.R/Makevars!
There I had entries like:

CXX20: g++
CXX20FLAGS: -g -O2
CXX20PICFLAGS: -fPIC
CXX20STD: -std=gnu++20

but the delimiter must have been =, i.e.

CXX20 = g++
CXX20FLAGS = -g -O2
CXX20PICFLAGS = -fPIC
CXX20STD = -std=gnu++20

All is fine now, even with GCC 10:

* installing to library ‘/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library’
* installing *source* package ‘NanoMethViz’ ...
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 10.3.1’
using C++20
g++ -std=gnu++20 -I"/home/biocbuild/R/R-beta-2024-04-15_r86425/include" -DNDEBUG  -I'/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library/Rcpp/include' -I/usr/local/include    -fPIC  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++20 -I"/home/biocbuild/R/R-beta-2024-04-15_r86425/include" -DNDEBUG  -I'/home/biocbuild/R/R-beta-2024-04-15_r86425/site-library/Rcpp/include' -I/usr/local/include    -fPIC  -g -O2  -c convert_methy_to_dss.cpp -o convert_methy_to_dss.o
...

You can revert your last commit that changed C++20 to C++17 in the DESCRIPTION file!

@sachingadakh
Copy link

Hello Everyone; thanks for addressing this issue again. I seriously don't know how, but when I attempted to install the NanoMethViz on the command line Linux Ubuntu, it got installed somehow without any warnings so far, and it is reflected in the R studio as well.
Concerning the earlier suggestion by Martin-S, I tried to work around with ~/.R/Makevars but didn't find any such file in my R studio or R, in Linux, but anyhow, attempting to install via the command line worked for me.
Thank you again

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

3 participants