twolodzko / extraDistr

Additional univariate and multivariate distributions
49 stars 11 forks source link

Error while compiling in Linux #2

Closed lgaliano closed 7 years ago

lgaliano commented 7 years ago

Found issues compiling while trying to use both the CRAN as well as the github latest version. I was wondering if you had any suggestions?

  • installing source package ‘extraDistr’ ... package ‘extraDistr’ successfully unpacked and MD5 sums checked libs g++ -std=c++0x -I/usr/local/thirdparty/R/R-3.2.3/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o g++ -std=c++0x -I/usr/local/thirdparty/R/R-3.2.3/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -c bernoulli-distribution.cpp -o bernoulli-distribution.o g++ -std=c++0x -I/usr/local/thirdparty/R/R-3.2.3/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -c beta-binomial-distribution.cpp -o beta-binomial-distribution.o In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/functional:58, from /opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include/RcppCommon.h:61, from /opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include/Rcpp.h:27, from beta-binomial-distribution.cpp:1: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple: In constructor ‘std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = std::_Head_base<0ul, long int, false>, long unsigned int _Idx = 0ul, _Head = int]’: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long int, long int, long unsigned int _Idx = 0ul, _Head = int, _Tail = int, int]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:256: instantiated from ‘std::tuple<_Elements>::tuple(std::tuple<_UElements ...>&&) [with _UElements = long int, long int, long int, _Elements = int, int, int]’ beta-binomial-distribution.cpp:196: instantiated from here /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:94: error: cannot convert ‘std::_Head_base<0ul, long int, false>’ to ‘int’ in initialization /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple: In constructor ‘std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = std::_Head_base<1ul, long int, false>, long unsigned int _Idx = 1ul, _Head = int]’: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long int, long unsigned int _Idx = 1ul, _Head = int, _Tail = int]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long int, long int, long unsigned int _Idx = 0ul, _Head = int, _Tail = int, int]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:256: instantiated from ‘std::tuple<_Elements>::tuple(std::tuple<_UElements ...>&&) [with _UElements = long int, long int, long int, _Elements = int, int, int]’ beta-binomial-distribution.cpp:196: instantiated from here /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:94: error: cannot convert ‘std::_Head_base<1ul, long int, false>’ to ‘int’ in initialization /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple: In constructor ‘std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = std::_Head_base<2ul, long int, false>, long unsigned int _Idx = 2ul, _Head = int]’: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long unsigned int _Idx = 2ul, _Head = int, _Tail = ]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long int, long unsigned int _Idx = 1ul, _Head = int, _Tail = int]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:179: instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = long int, long int, long int, long unsigned int _Idx = 0ul, _Head = int, _Tail = int, int]’ /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:256: instantiated from ‘std::tuple<_Elements>::tuple(std::tuple<_UElements ...>&&) [with _UElements = long int, long int, long int, _Elements = int, int, int]’ beta-binomial-distribution.cpp:196: instantiated from here /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/tuple:94: error: cannot convert ‘std::_Head_base<2ul, long int, false>’ to ‘int’ in initialization make: *** [beta-binomial-distribution.o] Error 1 ERROR: compilation failed for package ‘extraDistr’ removing ‘/opt/home/u479871/R/x86_64-pc-linux-gnu-library/3.2/extraDistr’
 sessionInfo()

R version 3.2.3 (2015-12-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] Rcpp_0.12.9 httr_1.2.1 devtools_1.10.0 loaded via a namespace (and not attached): [1] R6_2.2.0 tools_3.2.3 withr_1.0.1 curl_2.3 memoise_1.0.0 git2r_0.13.1 digest_0.6.9

jonrobinson2 commented 7 years ago

I'm seeing the same thing FWIW.

twolodzko commented 7 years ago

@lgaliano thanks for notice! I'll check what is going on. I wasn't able to test it on RedHat, it seems that it must be OS-specific.

@jonrobinson2 do you have this issue also on RedHat or different OS? Could you paste the error logs and sessionInfo() (unless it is exactly the same as above)?

twolodzko commented 7 years ago

@lgaliano and @jonrobinson2 I made a change on github version that should fix it. Could you try installing from github:

devtools::install_github("twolodzko/extraDistr")

I would be grateful for comments if it worked. If not, then for error logs, since at this moment I am unable to test it on RedHat.

Please notice that the github version is in-development, so there are some minor differences between CRAN and github versions.

lgaliano commented 7 years ago

@twolodzko That fixed in on my system, many thanks!

twolodzko commented 7 years ago

@lgaliano great! I'll check few more things and send bug fix to CRAN in next few days. Thanks for notification!

@jonrobinson2 do you have any comments? Does it work for you?

twolodzko commented 7 years ago

@lgaliano and @jonrobinson2 for your information: fixed version is now on CRAN so you can use the non-development version. I'll recommend to switch to CRAN version so you'll be automatically noticed about updates.