Open superbonaci opened 1 month ago
Leptonica is located here:
% brew list leptonica
/opt/homebrew/Cellar/leptonica/1.84.1/bin/convertfilestopdf
/opt/homebrew/Cellar/leptonica/1.84.1/bin/convertfilestops
/opt/homebrew/Cellar/leptonica/1.84.1/bin/convertformat
/opt/homebrew/Cellar/leptonica/1.84.1/bin/convertsegfilestopdf
/opt/homebrew/Cellar/leptonica/1.84.1/bin/convertsegfilestops
/opt/homebrew/Cellar/leptonica/1.84.1/bin/converttopdf
/opt/homebrew/Cellar/leptonica/1.84.1/bin/converttops
/opt/homebrew/Cellar/leptonica/1.84.1/bin/fileinfo
/opt/homebrew/Cellar/leptonica/1.84.1/bin/imagetops
/opt/homebrew/Cellar/leptonica/1.84.1/bin/xtractprotos
/opt/homebrew/Cellar/leptonica/1.84.1/include/leptonica/ (36 files)
/opt/homebrew/Cellar/leptonica/1.84.1/lib/libleptonica.6.dylib
/opt/homebrew/Cellar/leptonica/1.84.1/lib/cmake/ (2 files)
/opt/homebrew/Cellar/leptonica/1.84.1/lib/pkgconfig/lept.pc
/opt/homebrew/Cellar/leptonica/1.84.1/lib/ (2 other files)
build.command
has to include:
#!/bin/bash
cd `dirname $0`
# Set the include and library paths for Leptonica
export CFLAGS="-I/opt/homebrew/Cellar/leptonica/1.84.1/include"
export LDFLAGS="-L/opt/homebrew/Cellar/leptonica/1.84.1/lib"
BLD_FLAGS="-std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_REMOTERY -DNO_GZIP -DDISABLE_RUST"
[[ $1 = "OCR" ]] && BLD_FLAGS="$BLD_FLAGS -DENABLE_OCR"
# Explicitly add Leptonica include path
BLD_INCLUDE="-I../src/ -I../src/lib_ccx -I../src/lib_hash -I../src/thirdparty/libpng -I../src/thirdparty -I../src/thirdparty/protobuf-c -I../src/thirdparty/zlib -I../src/thirdparty/freetype/include -I/opt/homebrew/Cellar/leptonica/1.84.1/include `pkg-config --cflags --silence-errors gpac`"
[[ $1 = "OCR" ]] && BLD_INCLUDE="$BLD_INCLUDE `pkg-config --cflags --silence-errors tesseract`"
SRC_CCX="$(find ../src/lib_ccx -name '*.c')"
Seems to work now.
Latest commit https://github.com/CCExtractor/ccextractor/commit/f12f12b9165c83d59e6ec43876ae8701dd354cf6
This works well, no messages:
Compiling with OCR works but with errors: