ropensci / tokenizers

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

Tokenizers does not compile on RHEL 6.5.7 #16

Closed rsjohnso closed 8 years ago

rsjohnso commented 8 years ago

Downloaded from cran.r-project.org, I'm running on RHEL 6.5.7. I have the following gcc RPM packages installed:

compat-gcc-34-c++-3.4.6-19.el6.x86_64 compat-gcc-34-3.4.6-19.el6.x86_64 gcc-gfortran-4.4.7-4.el6.x86_64 libgcc-4.4.7-4.el6.x86_64 gcc-c++-4.4.7-4.el6.x86_64 libgcc-4.4.7-4.el6.i686 gcc-4.4.7-4.el6.x86_64

When I attempt to install it I get the following output.

sudo R CMD INSTALL tokenizers_0.1.2.tar.gz

  • installing to library ‘/usr/lib64/R/library’
  • 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:30: error: expected initializer before ‘:’ token shingle_ngrams.cpp:37: error: expected primary-expression before ‘ngram_out_len’ shingle_ngrams.cpp:37: error: expected ‘)’ before ‘ngram_out_len’ shingle_ngrams.cpp:37: error: ‘ngram_out_len’ was not declared in this scope shingle_ngrams.cpp:38: error: ‘ngram_out_len’ was not declared in this scope shingle_ngrams.cpp:46: 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:81: error: expected initializer before ‘:’ token shingle_ngrams.cpp:84: error: expected primary-expression before ‘for’ shingle_ngrams.cpp:84: error: expected ‘;’ before ‘for’ shingle_ngrams.cpp:84: error: expected primary-expression before ‘for’ shingle_ngrams.cpp:84: error: expected ‘)’ before ‘for’ make: *\ [shingle_ngrams.o] Error 1 ERROR: compilation failed for package ‘tokenizers’
  • removing ‘/usr/lib64/R/library/tokenizers’
dselivanov commented 8 years ago

gcc 4.4 is too old for c++11. Try something modern, at least 4.7.

rsjohnso commented 8 years ago

Thanks, I realized that and installed 5.1 and it works. 

Scott Johnson Production Eng, Sr Desk: (217) 255-4317 IM: rsjohnso36

  From: Dmitriy Selivanov <notifications@github.com>

To: lmullen/tokenizers tokenizers@noreply.github.com Cc: rsjohnso scottj1@yahoo-inc.com; Author author@noreply.github.com Sent: Thursday, May 12, 2016 12:00 AM Subject: Re: [lmullen/tokenizers] Tokenizers does not compile on RHEL 6.5.7 (#16)

gcc 4.4 is too old for c++11. Try something modern, at least 4.7.— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

lmullen commented 8 years ago

I installed this just fine on CentOS once I installed an updated gcc. I'll close this, but feel free to reopen if necessary.