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

The problem for installing #186

Closed
noahsark1117 opened this issue May 4, 2017 · 6 comments
Closed

The problem for installing #186

noahsark1117 opened this issue May 4, 2017 · 6 comments

Comments

@noahsark1117
Copy link

noahsark1117 commented May 4, 2017

I try to install text2vec on rstudio-server, but it shows error massage:

Installing package into ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
URL’https://cran.rstudio.com/src/contrib/text2vec_0.4.0.tar.gz'
Content type 'application/x-gzip' length 3433916 bytes (3.3 MB)
downloaded 3.3 MB

  • installing source package ‘text2vec’ ...
    ** libs
    g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/RcppParallel/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/digest/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c GloveFitter.cpp -o GloveFitter.o
    g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/RcppParallel/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/digest/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c HashCorpus.cpp -o HashCorpus.o
    In file included from Corpus.h:17,
    from HashCorpus.h:17,
    from HashCorpus.cpp:17:
    SparseTripletMatrix.h: In member function ‘SEXPREC* SparseTripletMatrix::get_sparse_triplet_matrix(Rcpp::CharacterVector&, Rcpp::CharacterVector&)’:
    SparseTripletMatrix.h:102: ERROR:expected initializer before ‘:’ token
    SparseTripletMatrix.h:111: ERROR:expected ‘)’ before ‘;’ token
    In file included from HashCorpus.cpp:17:
    HashCorpus.h: In member function ‘void HashCorpus::insert_terms(std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > >&, int)’:
    HashCorpus.h:120: ERROR:expected initializer before ‘:’ token
    HashCorpus.cpp:33: ERROR:expected primary-expression at end of input
    HashCorpus.cpp:33: ERROR:expected ‘;’ at end of input
    HashCorpus.cpp:33: ERROR:expected primary-expression at end of input
    HashCorpus.cpp:33: ERROR:expected ‘)’ at end of input
    HashCorpus.cpp:33: ERROR:expected statement at end of input
    HashCorpus.cpp:33: ERROR:expected ‘}’ at end of input
    In file included from Corpus.h:17,
    from HashCorpus.h:17,
    from HashCorpus.cpp:17:
    SparseTripletMatrix.h: In member function ‘SEXPREC* SparseTripletMatrix::get_sparse_triplet_matrix(Rcpp::CharacterVector&, Rcpp::CharacterVector&) [with T = float]’:
    HashCorpus.h:76: instantiated from here
    SparseTripletMatrix.h: In member function ‘SEXPREC* SparseTripletMatrix::get_sparse_triplet_matrix(Rcpp::CharacterVector&, Rcpp::CharacterVector&) [with T = int]’:
    HashCorpus.h:81: instantiated from here
    make: *** [HashCorpus.o] ERROR 1
    ERROR: compilation failed for package ‘text2vec’
  • removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/text2vec’
    Warning in install.packages :
    installation of package ‘text2vec’ had non-zero exit status
@dselivanov
Copy link
Owner

Please provide sessionInfo and g++ version. I suspect g++ is too old and doesn't have c++11 support.

@noahsark1117
Copy link
Author

noahsark1117 commented May 5, 2017

Thank you for your help!
I check the g++ version and find that is too old. Then I update g++ to 7.1.0
$g++ --version
gcc (GCC) 7.1.0
Copyright © 2017 Free Software Foundation, Inc.

And my R information is:

sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.7 (Final)

locale:
[1] LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C LC_TIME=zh_CN.UTF-8 LC_COLLATE=zh_CN.UTF-8
[5] LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES=zh_CN.UTF-8 LC_PAPER=zh_CN.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.3.2

After update the g++ version, text2vec package also can't be installed, the new problems appear.

  • installing source package ‘text2vec’ ...
    ** libs
    g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/RcppParallel/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/digest/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c GloveFitter.cpp -o GloveFitter.o
    In file included from /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/Module.h:338:0,
    from /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp.h:64,
    from text2vec.h:17,
    from GloveFit.h:17,
    from GloveFitter.cpp:17:
    /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/module/Module_Property.h:103:41: WARN:dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
    ^~~~~
    /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/module/Module_Property.h:161:41: WARN:dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
    g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/RcppParallel/include" -I"/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/digest/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c HashCorpus.cpp -o HashCorpus.o
    In file included from /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/Module.h:338:0,
    from /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp.h:64,
    from SparseTripletMatrix.h:17,
    from Corpus.h:17,
    from HashCorpus.h:17,
    from HashCorpus.cpp:17:
    /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/module/Module_Property.h:103:41: WARN:dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
    ^~~~~
    /home/rstudio/R/x86_64-redhat-linux-gnu-library/3.3/Rcpp/include/Rcpp/module/Module_Property.h:161:41: WARN:dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
    void set(Class* object, SEXP value) throw(std::range_error,Rcpp::not_compatible){
    ^~~~~
    In file included from Corpus.h:17:0,
    from HashCorpus.h:17,
    from HashCorpus.cpp:17:
    SparseTripletMatrix.h: In Function ‘HashCorpus::HashCorpus(uint32_t, uint32_t, uint32_t, uint32_t, int)’:
    SparseTripletMatrix.h:53:7: WARN:‘.SparseTripletMatrix::nnz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    class SparseTripletMatrix {
    ^~~~~~~~~~~~~~~~~~~
    SparseTripletMatrix.h:53:7: WARN:‘.SparseTripletMatrix::nnz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    class SparseTripletMatrix {
    ^~~~~~~~~~~~~~~~~~~
    .......
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    sh: line 1: 17637 ERROR
    (core dumped) '/usr/lib64/R/bin/R' --no-save --slave 2>&1 < '/tmp/RtmptWnhbU/file449c7deb48a7'

most of WARNING is 'dynamic exception specifications are deprecated in C++11 [-Wdeprecated]'

Hope your help. Thanks

@noahsark1117
Copy link
Author

The problem has been solved! After I installed 'Rcpp11' package in R, the 'text2vec' package can be installed.
Thank you for your help, dselivanov.

@amgmails
Copy link

amgmails commented May 6, 2017

Hi everyone, I am a young ivorian statistician having just discovered your R package. I have a problem to install text2vec. I am using an XPS 15 with ubuntu 16.04 LTS with Microsoft Revolution Open 3.3.3 installed. My problem is that i get an error when I try to install the "text2vec" R package on my machine. The error message i get is below :

`* installing source package ‘text2vec’ ...
** package ‘text2vec’ successfully unpacked and MD5 sums checked
** libs
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c GloveFitter.cpp -o GloveFitter.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'GloveFitter.o' failed
make: [GloveFitter.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c HashCorpus.cpp -o HashCorpus.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'HashCorpus.o' failed
make: [HashCorpus.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c LDA_gibbs.cpp -o LDA_gibbs.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'LDA_gibbs.o' failed
make: [LDA_gibbs.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c RcppExports.cpp -o RcppExports.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'RcppExports.o' failed
make: [RcppExports.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c VocabCorpus.cpp -o VocabCorpus.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'VocabCorpus.o' failed
make: [VocabCorpus.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c Vocabulary.cpp -o Vocabulary.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'Vocabulary.o' failed
make: [Vocabulary.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c matrix_utils.cpp -o matrix_utils.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'matrix_utils.o' failed
make: [matrix_utils.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c uint_hash.cpp -o uint_hash.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'uint_hash.o' failed
make: [uint_hash.o] Error 127 (ignored)
I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/RcppParallel/include" -I"/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/digest/include" -c utils.cpp -o utils.o
sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory
/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf:141: recipe for target 'utils.o' failed
make: [utils.o] Error 127 (ignored)
-shared -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -o text2vec.so GloveFitter.o HashCorpus.o LDA_gibbs.o RcppExports.o VocabCorpus.o Vocabulary.o matrix_utils.o uint_hash.o utils.o -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -lR
sh: line 2: -shared: command not found
/usr/lib64/microsoft-r/3.3/lib64/R/share/make/shlib.mk:6: recipe for target 'text2vec.so' failed
make: *** [text2vec.so] Error 127
ERROR: compilation failed for package ‘text2vec’

  • removing ‘/home/maixent/R/x86_64-pc-linux-gnu-library/3.3/text2vec’
    Warning in install.packages :
    installation of package ‘text2vec’ had non-zero exit status`.

This one is the result of a sessionInfo() :
`R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RevoUtilsMath_10.0.0

loaded via a namespace (and not attached):
[1] RevoUtils_10.0.3 tools_3.3.3 `

Thanks in advance for your help.

@dselivanov
Copy link
Owner

Hi @amgmails . Seems like MRO doesn't support modern c++ compiler with c++11 support (after googling I found many similar issues like here and there ). I suggest you to try GNU R instead of MRO.

@dselivanov
Copy link
Owner

@noahsark1117 Seems like not Rcpp11 helped, but reinstallation of Rcpp itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants