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

Add recipe for tesseract #5935

Merged
merged 17 commits into from
Jun 1, 2018
Merged

Add recipe for tesseract #5935

merged 17 commits into from
Jun 1, 2018

Conversation

CurtLH
Copy link
Contributor

@CurtLH CurtLH commented May 23, 2018

Closes #4647

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/tesseract) and found some lint.

Here's what I've got...

For recipes/tesseract:

  • Failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint . from the recipe directory.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/tesseract) and found some lint.

Here's what I've got...

For recipes/tesseract:

  • Recipe with the same name exists in bioconda: please discuss with @conda-forge/bioconda-recipes.

@CurtLH
Copy link
Contributor Author

CurtLH commented May 23, 2018

@conda-forge/staged-recipes -- can you provide any guidance on how to handle recipes that are in bioconda but not conda-forge? Is this something where a recipe will never be merged if it's already in bioconda?

@CurtLH
Copy link
Contributor Author

CurtLH commented May 23, 2018

This recipe for tesseract was largely inspired by the existing bioconda recipe in bioconda.

This recipe for leptonica was largely inspired by the existing bioconda recipe in bioconda.

@scopatz
Copy link
Member

scopatz commented May 23, 2018

Is this something where a recipe will never be merged if it's already in bioconda?

Actually many bioconda recipes are in conda-forge and there is no problem duplicating packages here.

@scopatz
Copy link
Member

scopatz commented May 23, 2018

I don't know that I agree with what the linter is doing here. Perhaps @conda-forge/bioconda-recipes can shed some light.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/leptonica, recipes/tesseract) and found some lint.

Here's what I've got...

For recipes/leptonica:

  • Recipe with the same name exists in bioconda: please discuss with @conda-forge/bioconda-recipes.

For recipes/tesseract:

  • Recipe with the same name exists in bioconda: please discuss with @conda-forge/bioconda-recipes.

@CurtLH CurtLH force-pushed the tesseract branch 16 times, most recently from 81c3017 to 34b4f1c Compare May 25, 2018 03:02
- zlib
- jpeg
- libpng
- libtiff
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These likely all need to be in host as well. C/C++ code compiles libraries that link to libraries. So they have to be around during the build for the linking part to occur. They also need to be included at run time with matching versions (we take care of that for you under the hood). This differs from Python where they just need to be around whenever an import line calls for them. Hope that helps.

- libwebp
run:
- zlib
- jpeg
Copy link
Member

@jakirkham jakirkham May 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this needs jpeg and openjpeg. So would add both to host and run.

Should add this based on the following lines from the log.

-- Looking for include file openjpeg-2.0/openjpeg.h
-- Looking for include file openjpeg-2.0/openjpeg.h - not found
-- Looking for include file openjpeg-2.1/openjpeg.h
-- Looking for include file openjpeg-2.1/openjpeg.h - not found
-- Looking for include file openjpeg-2.2/openjpeg.h
-- Looking for include file openjpeg-2.2/openjpeg.h - not found
-- Looking for include file openjpeg-2.3/openjpeg.h
-- Looking for include file openjpeg-2.3/openjpeg.h - not found

ref: https://circleci.com/gh/conda-forge/staged-recipes/27445

build:
- {{ compiler('c') }}
host:
- cmake
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is using pkg-config as well. Currently it is reaching for the system copy, but we can provide our own (on macOS too). So please add it here.

Based on these log lines.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23") 

ref: https://circleci.com/gh/conda-forge/staged-recipes/27445

- {{ compiler('c') }}
host:
- cmake
- gcc # [linux]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is handled by the compiler portion above. So it can be dropped.

host:
- cmake
- gcc # [linux]
- libwebp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in run as well.

requirements:
host:
- gcc # [linux]
- llvm # [osx]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as you nicely did above, please add...

  build:
    - {{ compiler('c') }}

Then drop both gcc and llvm from here.

- zlib
- leptonica
run:
- libgcc # [linux]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is automatically added by the compiler syntax noted above. So we don't need to add it explicitly. IOW please go ahead and drop this.

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

Thanks for triggering the build @scopatz!

I'm not very (or at all) experienced in debugging these types of recipes, but it looks like this has something to do with why it failed:

./configure: line 17577: syntax error near unexpected token `LEPTONICA,'
./configure: line 17577: `PKG_CHECK_MODULES(LEPTONICA, lept >= 1.74, have_lept=true, have_lept=false)'

Do you have any thoughts on what to do?

@scopatz
Copy link
Member

scopatz commented Jun 1, 2018

Did you push up an empty commit to trigger a rebuild? Also I think you need to wait for the leotonica package to actually appear on anaconda.org

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

Leptonica is now in Anaconda cloud, and I just pushed an empty commit, but still the same error.

@mbargull
Copy link
Member

mbargull commented Jun 1, 2018

Probably just needs pkg-config as a build dependency, see tesseract-ocr/tesseract#941.

- jpeg
- libtiff
- automake
- autoconf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

automake and autoconf should go into requirements/build, if possible.

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

This one is ready for review @conda-forge/staged-recipes!

@scopatz scopatz merged commit 35f4532 into conda-forge:master Jun 1, 2018
@CurtLH CurtLH deleted the tesseract branch June 1, 2018 22:16
@isuruf
Copy link
Member

isuruf commented Jun 1, 2018

Can you fix these warnings,

WARNING (tesseract,bin/tesseract): Needed DSO lib/libwebp.so.7 found in ['libwebp']
WARNING (tesseract,bin/tesseract): .. but ['libwebp'] not in reqs/run, i.e. it is overlinked (likely) or a missing dependency (less likely)
WARNING (tesseract,bin/tesseract): Needed DSO lib/liblzma.so.5 found in ['xz']
WARNING (tesseract,bin/tesseract): .. but ['xz'] not in reqs/run, i.e. it is overlinked (likely) or a missing dependency (less likely)
WARNING (tesseract,bin/tesseract): Needed DSO lib/libopenjp2.so.7 found in ['openjpeg']
WARNING (tesseract,bin/tesseract): .. but ['openjpeg'] not in reqs/run, i.e. it is overlinked (likely) or a missing dependency (less likely)
WARNING (tesseract,bin/tesseract): Needed DSO lib/libgif.so.7 found in ['giflib']
WARNING (tesseract,bin/tesseract): .. but ['giflib'] not in reqs/run, i.e. it is overlinked (likely) or a missing dependency (less likely)

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

Thanks for catching that @isuruf. Would this be the right way to fix this issue?

  1. Wait to tesseract feedstock to be created
  2. Fork tesseract feedstock
  3. Add libwebp, xz, openjpeg, and giflib under run:requirements
  4. Increment build number to 1
  5. Merge fork into master

@scopatz
Copy link
Member

scopatz commented Jun 1, 2018

Yes, exactly. But you should issue a PR into the feedstock from your fork.

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

That's what I meant. Will do. Thank you for your help!

@scopatz
Copy link
Member

scopatz commented Jun 1, 2018

Thanks!

@isuruf
Copy link
Member

isuruf commented Jun 1, 2018

Remember to do a conda smithy rerender after adding the requirements.

@isuruf
Copy link
Member

isuruf commented Jun 1, 2018

You'll also want to do this for leptonica. See https://travis-ci.org/conda-forge/leptonica-feedstock/jobs/386797659#L1862-L1865

@CurtLH
Copy link
Contributor Author

CurtLH commented Jun 1, 2018

Will do. Thanks for spotting that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants