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

small PR to use cpp11 #66

Closed
wants to merge 20 commits into from
Closed

Conversation

pachadotdev
Copy link
Contributor

@pachadotdev pachadotdev commented Aug 3, 2024

this PR here does not introduce breakage, but it works under the assumption that we have tesseract >= 5
the real change here is src/ + DESCRIPTION
the rest is roxygen changes and modifications to pass all checks with devtools

@pachadotdev
Copy link
Contributor Author

the modification to the CI pipeline is to avoid this:

/usr/include/tesseract/baseapi.h:228:7: note:   candidate expects 10 arguments, 8 provided
tesseract.cpp: In function ‘cpp11::logicals validate_params(cpp11::strings)’:
tesseract.cpp:91:74: error: cannot convert ‘std::string*’ {aka ‘std::__cxx11::basic_string<char>*’} to ‘STRING*’
   91 |     out[i] = api->GetVariableAsString(std::string(params.at(i)).c_str(), &str);
      |                                                                          ^~~~
      |                                                                          |
      |                                                                          std::string* {aka std::__cxx11::basic_string<char>*}

this is the opposite of the problem I had with Rcpp in the cluster, it shows the same with Tesseract 5 and this error with cpp11 happens on Ubuntu with Tesseract 4 installed

I shall try to write a code that works with v4 and v5 later

@pachadotdev
Copy link
Contributor Author

Hi @jeroen
this PR works well with tesseract 4 and 5, this is my solution to install tesseract on Mac and Windows laptops today that had Tesseract 4. I made sure it works with Tesseract 5 on Linux, that is what I have on my laptop.

@pachadotdev
Copy link
Contributor Author

@jeroen I went back to the original CI script and it works, but it also works if I install Tesseract 5 to test with Ubuntu

@pachadotdev
Copy link
Contributor Author

hi @jeroen
The CI now works well with Tesseract 4 and 5 on Ubuntu.
I am using my fork in the Niagara cluster, for which I have to run "rsync -av --update" from my laptop provided that the cluster has a very restricted internet connection, and it works well there :)

@pachadotdev pachadotdev deleted the cpp11 branch September 23, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant