GitHub Issue #1503

13 views
Skip to first unread message

CCExtractor.org CI Platform

unread,
Mar 16, 2023, 11:22:56 PM3/16/23
to ccextra...@googlegroups.com
[BUG] CMake build system doesn't add tesseract's include directory (non-FHS system) - Apteryks
Link to Issue: https://www.github.com/CCExtractor/ccextractor/issues/1503
Apteryks

Hi,

When build ccextractor on GNU Guix, which is not a file-hierarchy standard (FHS) system, the build system doesn't add the Tesseract include directory, which causes the compilation to fail like in the output reported below.

It seems the build system should also add the tesseract subdirectory under tesseract's include prefix to the include directories: [...] In file included from /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.h:10, from /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.c:2: /gnu/store/v8mc5l62jmq0dx8qgrjjqxrnd1pv2kmr-ffmpeg-3.4.11/include/libavformat/avformat.h:893:21: note: declared here 893 | AVCodecContext *codec; | ^~~~~ /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.c:48:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations] 48 | ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec; | ^~~ In file included from /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.h:10, from /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.c:2: /gnu/store/v8mc5l62jmq0dx8qgrjjqxrnd1pv2kmr-ffmpeg-3.4.11/include/libavformat/avformat.h:893:21: note: declared here 893 | AVCodecContext *codec; | ^~~~~ /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx.c:118:1: warning: control reaches end of non-void function [-Wreturn-type] 118 | } | ^ [ 35%] Building C object lib_ccx/CMakeFiles/ccx.dir/hardsubx_classifier.c.o cd /tmp/guix-build-ccextractor-0.88.drv-0/source/build/lib_ccx && /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin/gcc -DFT2_BUILD_LIBRARY -DGPAC_64_BITS -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_VTT -DVERSION_FILE_PRESENT -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/utf8proc -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/gpacmp4 -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/protobuf-c -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/zvbi -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_hash -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/wrappers -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/libpng -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/zlib -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/freetype/include -I/gnu/store/bm52xpy338afmdkz3k4k5w3zw2j30z15-leptonica-1.80.0/include/leptonica -Wall -g -std=gnu99 -DENABLE_FFMPEG -DENABLE_HARDSUBX -DENABLE_OCR -DENABLE_SHARING -DENABLE_HARDSUBX -DGPAC_CONFIG_LINUX -O2 -g -DNDEBUG -MD -MT lib_ccx/CMakeFiles/ccx.dir/hardsubx_classifier.c.o -MF CMakeFiles/ccx.dir/hardsubx_classifier.c.o.d -o CMakeFiles/ccx.dir/hardsubx_classifier.c.o -c /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx_classifier.c [ 36%] Building C object lib_ccx/CMakeFiles/ccx.dir/hardsubx_decoder.c.o cd /tmp/guix-build-ccextractor-0.88.drv-0/source/build/lib_ccx && /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin/gcc -DFT2_BUILD_LIBRARY -DGPAC_64_BITS -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_VTT -DVERSION_FILE_PRESENT -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/utf8proc -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/gpacmp4 -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/protobuf-c -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/zvbi -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_hash -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/wrappers -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/libpng -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/zlib -I/tmp/guix-build-ccextractor-0.88.drv-0/source/src/freetype/include -I/gnu/store/bm52xpy338afmdkz3k4k5w3zw2j30z15-leptonica-1.80.0/include/leptonica -Wall -g -std=gnu99 -DENABLE_FFMPEG -DENABLE_HARDSUBX -DENABLE_OCR -DENABLE_SHARING -DENABLE_HARDSUBX -DGPAC_CONFIG_LINUX -O2 -g -DNDEBUG -MD -MT lib_ccx/CMakeFiles/ccx.dir/hardsubx_decoder.c.o -MF CMakeFiles/ccx.dir/hardsubx_decoder.c.o.d -o CMakeFiles/ccx.dir/hardsubx_decoder.c.o -c /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx_decoder.c /tmp/guix-build-ccextractor-0.88.drv-0/source/src/lib_ccx/hardsubx_decoder.c:12:10: fatal error: capi.h: No such file or directory 12 | #include "capi.h" | ^~~~~~~~ compilation terminated. make[2]: *** [lib_ccx/CMakeFiles/ccx.dir/build.make:1255: lib_ccx/CMakeFiles/ccx.dir/hardsubx_decoder.c.o] Error 1 make[2]: Leaving directory '/tmp/guix-build-ccextractor-0.88.drv-0/source/build' make[1]: *** [CMakeFiles/Makefile2:129: lib_ccx/CMakeFiles/ccx.dir/all] Error 2 make[1]: Leaving directory '/tmp/guix-build-ccextractor-0.88.drv-0/source/build' make: *** [Makefile:139: all] Error 2 error: in phase 'build': uncaught exception: %exception #<&invoke-error program: "make" arguments: ("-j" "1") exit-status: 2 term-signal: #f stop-signal: #f> phase `build' failed after 46.0 seconds command "make" "-j" "1" failed with status 2 builder for `/gnu/store/rq7pa3r609s88flyrwrz23cp1irq6fy2-ccextractor-0.88.drv' failed with exit code 1 build of /gnu/store/rq7pa3r609s88flyrwrz23cp1irq6fy2-ccextractor-0.88.drv failed View build log at '/var/log/guix/drvs/rq/7pa3r609s88flyrwrz23cp1irq6fy2-ccextractor-0.88.drv'. guix build: error: build of `/gnu/store/rq7pa3r609s88flyrwrz23cp1irq6fy2-ccextractor-0.88.drv' failed

Here's the pkg-config output for the tesseract library (here version 5) and the actual file layout:

$ pkg-config --variable=includedir tesseract /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include maxim@hurd ~/src/guix-master [env]$ find /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/export.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/ocrclass.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/osdetect.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/version.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/unichar.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/baseapi.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/capi.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/pageiterator.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/publictypes.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/ltrresultiterator.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/resultiterator.h /gnu/store/sm32way40wph3j9xrv3vlzhzzllna782-tesseract-ocr-5.3.0/include/tesseract/renderer.h

CCExtractor version: 0.88 to 0.94 (CMake build)

Necessary information

  • Is this a regression (i.e. did it work before)? I think it did (with Autotools vs CMake)
  • What platform did you use? GNU/Linux
  • What were the used arguments? N/A.

Thanks!

Reply all
Reply to author
Forward
0 new messages