-
Notifications
You must be signed in to change notification settings - Fork 19
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: compilation failed for package ‘gridtext’ #22
Comments
I admit, my cursory review of the commit history didn't turn up anything "obvious" - but I also have no idea what I'm looking for! Haha. Maybe something in the error message below could give you an idea? Oddly enough, my existing installed
Output from install.packages("gridtext"), click to expand
sessionInfo(): sessionInfo() output, click to expand
|
As far as I can see, all your problems arise from inside Rcpp code. So maybe something changed there. I'm just using their published API. |
Ah that's a fair point - I'll check the Rcpp Github issues to look for something similar posted. I did notice that your cpp code had not changed (that I could tell) so it would make sense if something happened inside Rcpp. |
From what I could grok from a large number of only slightly- or possibly-related threads, both on Github and their rcpp-devel mailing list, it seems like an issue where header include order could be causing a problem. Lots of examples of "no matching function for call" - but nothing I can debug as I'm not a C++ programmer. Also, I was wrong earlier: I didn't actually get it to install previously, I asked our linux admin to install it. I remember he said it was hard to install. ;) I ran Next steps: Does this package really require GCC-5.3 or higher? I feel like this is somewhat limiting for a package dependency. Maybe not for laptops/workstations, but for servers it's kind of heavy. |
GCC 5.3 was released in December 2015. It's not high on my priority list to support older versions. If somebody figures out what needs to be done to provide support I'm happy to consider PRs, but I'm not going to hunt down issues that can be solved by simply upgrading to a more recent system. |
Yeah I understand that logic. ;) Is it true that using a newer GCC also means R itself needs to be compiled with newer GCC, and all R packages reinstalled with the newer GCC? Maybe there's a clever way to link older libraries while using a newer compiler. I will research that on my own. I'm concerned about the number of people on CentOS 7, with default GCC-4.8.5. I can confidently say that none of my work is important enough to ask someone to upgrade their OS. haha |
Not sure. I'm not doing that much C++ anymore these days and the compiler and library inconsistencies have always been annoying me. C++ wasn't really usable before C++14, released in 2014, and even then it's barely usable if we want to be honest. |
I'm also having this trouble on a machine where I don't have the ability to update the OS and get a newer version of C++. So, I pulled the gridtext_0.1.5.tar.gz from cran and looked at the grid-renderer.h file which is referred to in the first line of the error:
So, if I look at line 61 of grid-renderer.h, then that line is listing the arguments to the function called raster_grob: The definition of raster_grob is here:
So, it looks like "gp" should be the last argument of raster_grob(), but it is currently the last argument of the "LogicalVector." And, LogicalVector isn't defined in Rcpp::Vector to have those 3 arguments and so it is throwing this error. If I move the parenthesis to be before the "gp" then it compiles fine on my old machine:
I don't know enough about C++/Rcpp why this error would be skipped in a newer version, and I don't know the consequence of having "gp" not get passed to raster_grob properly. I don't know enough about this package or R development to be able to even test it. I will try this fix and recompile and then see if I can get survminer to work and then report back to here. |
@bandrewfox Good point. I think the code is indeed buggy and the gp argument should be placed outside the |
For bugs wilkelab#22 and wilkelab#7 and wilkelab#11
This issue is related to #7 and #11, and I think happened sometime between version 0.1.1 and current released version 0.1.4.
I was previously able to install version 0.1.1 without problem on CentOS 7.8 for R-3.6.1.
Today recently I was not able to install version 0.1.4 on R-4.1.0, nor R-3.6.1.
I have GCC-4.8.5 which is reported to provide support for C++11:
https://gcc.gnu.org/gcc-4.8/cxx0x_status.html
C++11 was released 2014, however it appears the issue is tied to a specific version requirement for
libstdc++.so.6.0.20
or higher. (I can't verify that version works, but I did try.)It looks like that version is associated with GCC-4.9 in 2016.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
The solution in #11 was to install CentOS
devtoolset-9
which was released November 2019.I really love gridtext/ggtext as it does provide brilliant capability and looks fantastic in data visualizations.
The issue for me, I don't want to include an R package dependency that is a problem for me to install.
I'm more tech-forgiving and persistent than most, I don't want my package to fail at the install step.
So my options are:
I'll post my compile errors in case they help.
The text was updated successfully, but these errors were encountered: