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

Actions CI failing for cmake #3573

Closed
Shreeshrii opened this issue Sep 23, 2021 · 7 comments
Closed

Actions CI failing for cmake #3573

Shreeshrii opened this issue Sep 23, 2021 · 7 comments
Assignees
Milestone

Comments

@Shreeshrii
Copy link
Collaborator

Actions CI failing for cmake for last 4 days

Last successful run

First failed run

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
CMake Error at CMakeLists.txt:348 (find_package):
  Could not find a package configuration file provided by "Leptonica"
-- Configuring incomplete, errors occurred!
See also "/home/runner/work/tesseract/tesseract/build/CMakeFiles/CMakeOutput.log".
  (requested version 1.74) with any of the following names:

    LeptonicaConfig.cmake
    leptonica-config.cmake

  Add the installation prefix of "Leptonica" to CMAKE_PREFIX_PATH or set
  "Leptonica_DIR" to a directory containing one of the above files.  If
  "Leptonica" provides a separate development package or SDK, be sure it has
  been installed.


Error: Process completed with exit code 1.
@zdenop
Copy link
Contributor

zdenop commented Sep 23, 2021

AFAIK the latest leptonica (1.82) should be used as there are needed fixes for cmake

@stweil stweil added this to the 5.0.0 milestone Sep 24, 2021
@zdenop
Copy link
Contributor

zdenop commented Sep 25, 2021

I solved this. But it is failing on Mac and I can not test it why...

@Shreeshrii
Copy link
Collaborator Author

Shreeshrii commented Oct 2, 2021

Thanks @zdenop

On macos it is failing with the following while building the basicapitest
Failing Run on MacOS

I tried to see whether it is possible to DISABLE curl while building tesseract but that didn't work either.

Run export "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build/inst/lib/pkgconfig/:$PKG_CONFIG_PATH"
  export "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build/inst/lib/pkgconfig/:$PKG_CONFIG_PATH"
  cd test
  g++-11 -o basicapitest testing/basicapitest.cpp "-I$GITHUB_WORKSPACE/build/inst/include" "-L$GITHUB_WORKSPACE/build/inst/lib" `pkg-config --cflags --libs tesseract lept ` -pthread -std=c++11
  ./basicapitest
  shell: /bin/bash -e {0}
ld: warning: directory not found for option '-Linst/lib'
Undefined symbols for architecture x86_64:
  "_curl_easy_cleanup", referenced from:
      __ZN9tesseract11TessBaseAPI20ProcessPagesInternalEPKcS2_iPNS_18TessResultRendererE in libtesseract.a(baseapi.cpp.o)
  "_curl_easy_init", referenced from:
      __ZN9tesseract11TessBaseAPI20ProcessPagesInternalEPKcS2_iPNS_18TessResultRendererE in libtesseract.a(baseapi.cpp.o)
  "_curl_easy_perform", referenced from:
      __ZN9tesseract11TessBaseAPI20ProcessPagesInternalEPKcS2_iPNS_18TessResultRendererE in libtesseract.a(baseapi.cpp.o)
  "_curl_easy_setopt", referenced from:
      __ZN9tesseract11TessBaseAPI20ProcessPagesInternalEPKcS2_iPNS_18TessResultRendererE in libtesseract.a(baseapi.cpp.o)
  "_curl_easy_strerror", referenced from:
      __ZN9tesseract11TessBaseAPI20ProcessPagesInternalEPKcS2_iPNS_18TessResultRendererE in libtesseract.a(baseapi.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Error: Process completed with exit code 1.

@Shreeshrii
Copy link
Collaborator Author

Actions CI environment for macos has curl preinstalled, hence -lcurl needed to be added for macos for the build of basicapitest.

See https://github.com/Shreeshrii/tesseract/actions/runs/1298540885 for working run.

@Shreeshrii
Copy link
Collaborator Author

PR #3589 fixes this.

@zdenop
Copy link
Contributor

zdenop commented Oct 2, 2021

I have a feeling ;-) that generating tesseract.pc is not perfect. I suggest to use/prefer cmake function in cmake chain. Unfortunately I have not time to dig in it.

@Shreeshrii
Copy link
Collaborator Author

Actions CI for cmake is working now. Successful log.

I suggest to use/prefer cmake function in cmake chain

I'll leave it for cmake experts to fix. I am closing this issue as CI is working now.

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

No branches or pull requests

4 participants