Closed pvo93 closed 2 years ago
I think there may be an issue with your installation of libtesseract in /usr/local/biotools/bsi/ver2
. Which version is this?
It's 5.0.0-alpha-2-2-1224. I had problems trying to compile 4.1.1.
[m015733@dudley]/usr/local/biotools/bsi/ver2/lib: ls -l libtesseract. -rw-r--r-- 1 wa03872 rcode 196086110 Mar 16 09:19 libtesseract.a -rwxr-xr-x 1 wa03872 rcode 1101 Mar 16 09:19 libtesseract.la lrwxrwxrwx 1 wa03872 rcode 21 Mar 16 09:19 libtesseract.so -> libtesseract.so.5.0.0 lrwxrwxrwx 1 wa03872 rcode 21 Mar 16 09:19 libtesseract.so.5 -> libtesseract.so.5.0.0 -rwxr-xr-x 1 wa03872 rcode 63307408 Mar 16 09:19 libtesseract.so.5.0.0*
I haven't tested the R package with 5.x. What problems did you have with 4.1? Do you not have the option to install tesseract-devel
from EPEL?
I install and maintain our R packages, but I don't have root access so I typically compile from source. I was able to compile tesseract 4.1.1, but I get the following error when I try to install the R package. I verified the existence of the header file.
install.packages("tesseract") Installing package into â/home/m015733/R/x86_64-pc-linux-gnu-library/4.0â (as âlibâ is unspecified) trying URL 'https://cran.rstudio.com/src/contrib/tesseract_4.1.tar.gz' Content type 'application/x-gzip' length 447439 bytes (436 KB)
downloaded 436 KB
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated. make: *** [/home/biotools/r/R-4.0.3/lib64/R/etc/Makeconf:181: RcppExports.o] Error 1 ERROR: compilation failed for package âtesseractâ
The downloaded source packages are in â/local1/tmp/Rtmp8QaFlz/downloaded_packagesâ Warning message: In install.packages("tesseract") : installation of package âtesseractâ had non-zero exit status
system("ls -l /usr/local/biotools/bsi/ver2/include/leptonica") total 588 -rw-r--r-- 1 wa03872 rcode 259877 Mar 16 10:35 allheaders.h . . .
Looks like you should be compiling with -I/usr/local/biotools/bsi/ver2/include
?
I'm having trouble compiling the tesseract R package on our research Linux servers. Before starting R, I set CXX11CPP as follows.
export CXX11CPP='g++ -E -std=gnu++17'
However, R seems to ignore it and default to gnu++11. I'm using gcc 8.3.1.
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
[Previously saved workspace restored]
Using PKG_LIBS=-L/usr/local/biotools/bsi/ver2/lib -ltesseract -lcurl
Using CXX11CPP: g++ -E -std=gnu++11 ** libs rm -f tesseract.so RcppExports.o tesseract.o g++ -std=gnu++11 -I"/home/biotools/r/R-4.0.3/lib64/R/include" -DNDEBUG -I/usr/local/biotools/bsi/ver2/include -I/usr/local/biotools/bsi/ver2/include/leptonica -I'/home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include' -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++11 -I"/home/biotools/r/R-4.0.3/lib64/R/include" -DNDEBUG -I/usr/local/biotools/bsi/ver2/include -I/usr/local/biotools/bsi/ver2/include/leptonica -I'/home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include' -I/usr/local/include -fvisibility=hidden -fpic -g -O2 -c tesseract.cpp -o tesseract.o In file included from /usr/local/biotools/bsi/ver2/include/tesseract/genericvector.h:23, from tesseract.cpp:2: /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h: In member function âbool tesseract::TFile::DeSerialize(std::vector
~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:107:31: error: âis_same_vâ is not a member of âstdâ } else if constexpr (std::is_same_v<T, std::string>) { ^~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:107:31: note: suggested alternative: âis_sameâ } else if constexpr (std::is_same_v<T, std::string>) { ^~~~~ is_same /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:107:42: error: expected primary-expression before â,â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:107:55: error: expected primary-expression before â>â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:107:56: error: expected primary-expression before â)â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:116:15: warning: âif constexprâ only available with -std=c++17 or -std=gnu++17 } else if constexpr (std::is_class_v~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:116:31: error: âis_class_vâ is not a member of âstdâ } else if constexpr (std::is_class_v~~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:116:31: note: suggested alternative: âis_classâ } else if constexpr (std::is_class_v~~~~~ is_class /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:116:43: error: expected primary-expression before â>â token } else if constexpr (std::is_class_v~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:147:31: error: âis_same_vâ is not a member of âstdâ } else if constexpr (std::is_same_v<T, std::string>) { ^~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:147:31: note: suggested alternative: âis_sameâ } else if constexpr (std::is_same_v<T, std::string>) { ^~~~~ is_same /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:147:42: error: expected primary-expression before â,â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:147:55: error: expected primary-expression before â>â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:147:56: error: expected primary-expression before â)â token } else if constexpr (std::is_same_v<T, std::string>) { ^ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:154:15: warning: âif constexprâ only available with -std=c++17 or -std=gnu++17 } else if constexpr (std::is_class_v~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:154:31: error: âis_class_vâ is not a member of âstdâ } else if constexpr (std::is_class_v~~~~~ /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:154:31: note: suggested alternative: âis_classâ } else if constexpr (std::is_class_v~~~~~ is_class /usr/local/biotools/bsi/ver2/include/tesseract/serialis.h:154:43: error: expected primary-expression before â>â token } else if constexpr (std::is_class_v~~tesseract.cpp: In function âRcpp::List tesseract_config()â: tesseract.cpp:23:49: error: use of deleted function âtesseract::TessBaseAPI::TessBaseAPI(const tesseract::TessBaseAPI&)â tesseract::TessBaseAPI api = make_analyze_api(); ^ In file included from tesseract_types.h:1, from tesseract.cpp:1: /usr/local/biotools/bsi/ver2/include/tesseract/baseapi.h:82:3: note: declared here TessBaseAPI(TessBaseAPI const &) = delete; ^~~tesseract.cpp: In function âTessPtr tesseract_engine_internal(Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::CharacterVector)â: tesseract.cpp:33:3: error: âGenericVectorâ was not declared in this scope GenericVector~~~~ tesseract.cpp:33:3: note: suggested alternatives: In file included from tesseract.cpp:2: /usr/local/biotools/bsi/ver2/include/tesseract/genericvector.h:39:7: note: âtesseract::GenericVectorâ class GenericVector { ^~~~~ In file included from /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp/Vector.h:62, from /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp.h:40, from tesseract_types.h:7, from tesseract.cpp:1: /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp/vector/instantiation.h:36:28: note: âRcpp::GenericVectorâ typedef Vector~~~~ tesseract.cpp:33:17: error: âSTRINGâ was not declared in this scope GenericVector~tesseract.cpp:33:17: note: suggested alternative: âSINGâ GenericVector~SING tesseract.cpp:33:25: error: âparamsâ was not declared in this scope GenericVector~tesseract.cpp:33:33: error: âvaluesâ was not declared in this scope GenericVector~tesseract.cpp:33:33: note: suggested alternative: âvallocâ GenericVector~valloc tesseract.cpp: In function âRcpp::LogicalVector validate_params(Rcpp::CharacterVector)â: tesseract.cpp:79:3: error: âSTRINGâ was not declared in this scope STRING str; ^~tesseract.cpp:79:3: note: suggested alternative: âSINGâ STRING str; ^~SING tesseract.cpp:80:49: error: use of deleted function âtesseract::TessBaseAPI::TessBaseAPI(const tesseract::TessBaseAPI&)â tesseract::TessBaseAPI api = make_analyze_api(); ^ In file included from tesseract_types.h:1, from tesseract.cpp:1: /usr/local/biotools/bsi/ver2/include/tesseract/baseapi.h:82:3: note: declared here TessBaseAPI(TessBaseAPI const &) = delete; ^~~tesseract.cpp:83:53: error: âstrâ was not declared in this scope out[i] = api.GetVariableAsString(params.at(i), &str); ^~~ tesseract.cpp:83:53: note: suggested alternative: âstdâ out[i] = api.GetVariableAsString(params.at(i), &str); ^~~ std tesseract.cpp: In function âRcpp::List engine_info_internal(TessPtr)â: tesseract.cpp:90:3: error: âGenericVectorâ was not declared in this scope GenericVector~~~~ tesseract.cpp:90:3: note: suggested alternatives: In file included from tesseract.cpp:2: /usr/local/biotools/bsi/ver2/include/tesseract/genericvector.h:39:7: note: âtesseract::GenericVectorâ class GenericVector { ^~~~~ In file included from /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp/Vector.h:62, from /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp.h:40, from tesseract_types.h:7, from tesseract.cpp:1: /home/biotools/rpackages/R-4.0.3-2020-12-15/Rcpp/include/Rcpp/vector/instantiation.h:36:28: note: âRcpp::GenericVectorâ typedef Vector~~~~ tesseract.cpp:90:17: error: âSTRINGâ was not declared in this scope GenericVector~tesseract.cpp:90:17: note: suggested alternative: âSINGâ GenericVector~SING tesseract.cpp:90:25: error: âlangsâ was not declared in this scope GenericVector~~tesseract.cpp: In function âRcpp::CharacterVector get_param_values(TessPtr, Rcpp::CharacterVector)â: tesseract.cpp:118:3: error: âSTRINGâ was not declared in this scope STRING str; ^~tesseract.cpp:118:3: note: suggested alternative: âSINGâ STRING str; ^~SING tesseract.cpp:122:54: error: âstrâ was not declared in this scope out[i] = api->GetVariableAsString(params.at(i), &str) ? Rcpp::String(str.c_str()) : NA_STRING; ^~~ tesseract.cpp:122:54: note: suggested alternative: âptrâ out[i] = api->GetVariableAsString(params.at(i), &str) ? Rcpp::String(str.c_str()) : NA_STRING; ^~~ ptr make: *** [/home/biotools/r/R-4.0.3/lib64/R/etc/Makeconf:181: tesseract.o] Error 1 ERROR: compilation failed for package âtesseractâThe downloaded source packages are in â/local1/tmp/RtmpBVBRk6/downloaded_packagesâ Warning message: In install.packages("tesseract") : installation of package âtesseractâ had non-zero exit status