ropensci / tokenizers

Fast, Consistent Tokenization of Natural Language Text
https://docs.ropensci.org/tokenizers
Other
184 stars 25 forks source link

Installation Error #55

Closed rlumor closed 7 years ago

rlumor commented 7 years ago

install.packages("/cambrian_vol1/users/R/r_packages_install/tokenizers_0.1.4.tar.gz", repos=NULL, type="source") Installing package into ‘/cambrian_vol1/users/R/R_LIBRARY’ (as ‘lib’ is unspecified)

lmullen commented 7 years ago

Please provide the session info and the version of your compiler.

On Fri, Jul 7, 2017 at 12:06 PM rlumor notifications@github.com wrote:

install.packages("/cambrian_vol1/users/R/r_packages_install/tokenizers_0.1.4.tar.gz", repos=NULL, type="source") Installing package into ‘/cambrian_vol1/users/R/R_LIBRARY’ (as ‘lib’ is unspecified)

  • installing source package ‘tokenizers’ ... package ‘tokenizers’ successfully unpacked and MD5 sums checked libs g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o g++ -m64 -std=c++0x -I/usr/include/R -DNDEBUG -I/usr/local/include -I"/usr/lib64/R/library/Rcpp/include" -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c shingle_ngrams.cpp -o shingle_ngrams.o shingle_ngrams.cpp: In function ‘Rcpp::CharacterVector generate_ngrams_internal(Rcpp::CharacterVector, uint32_t, uint32_t, std::tr1::unordered_set<std::basic_string<char, std::char_traits, std::allocator >, std::tr1::hash<std::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > >&, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > >

    &, std::string)’: shingle_ngrams.cpp:28: error: expected initializer before ‘:’ token shingle_ngrams.cpp:35: error: expected primary-expression before ‘ngram_out_len’ shingle_ngrams.cpp:35: error: expected ‘)’ before ‘ngram_out_len’ shingle_ngrams.cpp:35: error: ‘ngram_out_len’ was not declared in this scope shingle_ngrams.cpp:36: error: ‘ngram_out_len’ was not declared in this scope shingle_ngrams.cpp:44: error: ‘len’ was not declared in this scope shingle_ngrams.cpp: In function ‘Rcpp::ListOf<Rcpp::Vector<16, Rcpp::PreserveStorage> > generate_ngrams_batch(Rcpp::ListOf<const Rcpp::Vector<16, Rcpp::PreserveStorage> >, uint32_t, uint32_t, Rcpp::CharacterVector, Rcpp::String)’: shingle_ngrams.cpp:80: error: expected initializer before ‘:’ token shingle_ngrams.cpp:83: error: expected primary-expression before ‘for’ shingle_ngrams.cpp:83: error: expected ‘;’ before ‘for’ shingle_ngrams.cpp:83: error: expected primary-expression before ‘for’ shingle_ngrams.cpp:83: error: expected ‘)’ before ‘for’ make: *** [shingle_ngrams.o] Error 1 ERROR: compilation failed for package ‘tokenizers’

  • removing ‘/cambrian_vol1/users/R/R_LIBRARY/tokenizers’ Warning message: In install.packages("/cambrian_vol1/users/R/r_packages_install/tokenizers_0.1.4.tar.gz", : installation of package ‘/cambrian_vol1/users/R/r_packages_install/tokenizers_0.1.4.tar.gz’ had non-zero exit status

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ropensci/tokenizers/issues/55, or mute the thread https://github.com/notifications/unsubscribe-auth/AALNeE2rc946S_TwIg9qAOZcWt1G8skVks5sLld0gaJpZM4ORIxX .

-- Lincoln Mullen Assistant Professor, Department of History & Art History George Mason University

rlumor commented 7 years ago

sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux Server release 6.8 (Santiago)

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

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

lmullen commented 7 years ago

The problem is almost certainly that you have an old version of gcc that comes with RHEL/CentOS 6. You can either upgrade your gcc or you can install the development version of this package from GitHub. The development version removes the requirement for C++11.