CUD2V/pccc

Failed to install PCCC to Linux R

Closed this issue · 6 comments

Hi. Thank you very much for developing a wonderful package. While I was able to use it on Mac OS R, I failed to install it into R on the redht linux /gnu. Here is the error message:

In file included from ccc.cpp:6:
pccc.h:43: error: a brace-enclosed initializer is not allowed here before ‘{’ token
pccc.h:43: error: ISO C++ forbids initialization of member ‘empty’
pccc.h:43: error: making ‘empty’ static
pccc.h:43: error: invalid in-class initialization of static data member of non-integral type ‘const std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > >���
make: *** [ccc.o] Error 1
ERROR: compilation failed for package ‘pccc’

  • removing ‘/****/R/x86_64-redhat-linux-gnu-library/3.4/pccc’
    Warning in install.packages :
    installation of package ‘pccc’ had non-zero exit status

If this is not a bug, would you mind assisting me in installing the package? Thank you.0

While we did test building this package on various linux distributions, macOS, and Windows, we didn't test on all of them.

Can you provide more specifics about which version of Red Hat Linux and GCC you are running? CentOS is based on Red Hat - do you know if the problem occurs there?

Also, which R version you are running? We've seen errors with some development versions of R.

If you can provide details, I'll attempt to replicate in our own environment to better troubleshoot he issue.

thanks for the quick response!

I hope the following information helps:
The platform is x86_64-redhat-linux-gnu
Red Hat Enterprise Linux Server release 6.7 (Santiago)
The kernel version is 2.6.32-696.20.1.el6.x86_64.
R version is 3.4.3 (2017-11-30)

Thank you.

Thanks - I'll attempt to get a similar environment setup and do some testing. This will likely take several days.

In my testing, the version of Linux you are running is using gcc 4.4.7, or about 6 years old. That version of GCC doesn't support C++11. There is a small, but unnecessary, bit of code in this package that was written using C++11 syntax. Since that code wasn't necessary, I removed it, and in my testing, now resolves the compiler errors related to "ISO C++ forbids initialization of member"

Please test the change by installing the package directly from out github repo. If you are able to install and everything checks out ok, I can push a new version to CRAN.

Here's the install command (requires devtools to first be installed):

devtools::install_github("CUD2V/pccc")

Yes, I am now able to install the package and it works. Thank you so much!

problem resolved long time ago - guess I forgot to close this issue.