You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leptonica 1.83 moved a number of struct definitions into "private" headers, notably Pix and Box et al.
This results in a build failure:
tesserocr.cpp: In function ‘PyObject* __pyx_f_9tesserocr__pix_to_image(Pix*)’:
tesserocr.cpp:6685:26: error: invalid use of incomplete type ‘struct Pix’
6685 | __pyx_t_1 = __pyx_v_pix->informat;
| ^~
cdef extern from "leptonica/allheaders.h" nogil:
pass
cdef extern from "leptonica/pix_internal.h" nogil:
struct Pix:
I haven't made this a PR with the suggested change because it will presumably need to be conditionally done based on the result of a version test, but the above fix does seem to work.
The text was updated successfully, but these errors were encountered:
There already is a version check on the tesseract version passed as compile-time environment variables that yields different cpp code based on some cython macro checks, you should be able to apply the same concept for leptonica version-specific changes.
Leptonica 1.83 moved a number of
struct
definitions into "private" headers, notablyPix
andBox
et al.This results in a build failure:
which requires the inclusion of the header
leptonica/pix_internal.h
to overcome. This can be done with a supplementalcdef extern from
statement as detailed in https://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#referencing-c-header-files @tesseract.pxd
I haven't made this a PR with the suggested change because it will presumably need to be conditionally done based on the result of a version test, but the above fix does seem to work.
The text was updated successfully, but these errors were encountered: