[QUESTION] ccextractor.h:10:10: fatal error: 'leptonica/allheaders.h' file not found with leptonica installed #723

Closed
opened 2026-01-29 16:52:05 +00:00 by claunia · 3 comments
Owner

Originally created by @medikoo on GitHub (Oct 27, 2022).

CCExtractor version: v94

Necessary information

I'm trying to compile ccextractror with hardsubx support on macOS 12.6 (Intel), I'm following instructions at https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD#using-cmake and no matter what I do I approach the fail:

In file included from /Users/medikoo/Projects/ccextractor/src/lib_ccx/ccx_encoders_common.c:10:
/Users/medikoo/Projects/ccextractor/src/ccextractor.h:10:10: fatal error: 'leptonica/allheaders.h' file not found
#include <leptonica/allheaders.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [lib_ccx/CMakeFiles/ccx.dir/ccx_encoders_common.c.o] Error 1
make[1]: *** [lib_ccx/CMakeFiles/ccx.dir/all] Error 2
make: *** [all] Error 2

I definitely have leptonica installed (via brew), and see the mentioned headers file at /usr/local/Cellar/leptonica/1.82.0_1/include/leptonica/allheaders.h. I've attempted to run compilation with PATH="/usr/local/Cellar/leptonica/1.82.0_1/include:$PATH" but it didn't change anything.

Why exactly make command doesn't see this headers file, and what can I do to fix it?

Originally created by @medikoo on GitHub (Oct 27, 2022). CCExtractor version: v94 # Necessary information I'm trying to compile ccextractror with hardsubx support on macOS 12.6 (Intel), I'm following instructions at https://github.com/CCExtractor/ccextractor/blob/master/docs/COMPILATION.MD#using-cmake and no matter what I do I approach the fail: ``` In file included from /Users/medikoo/Projects/ccextractor/src/lib_ccx/ccx_encoders_common.c:10: /Users/medikoo/Projects/ccextractor/src/ccextractor.h:10:10: fatal error: 'leptonica/allheaders.h' file not found #include <leptonica/allheaders.h> ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[2]: *** [lib_ccx/CMakeFiles/ccx.dir/ccx_encoders_common.c.o] Error 1 make[1]: *** [lib_ccx/CMakeFiles/ccx.dir/all] Error 2 make: *** [all] Error 2 ``` I definitely have `leptonica` installed (via brew), and see the mentioned headers file at `/usr/local/Cellar/leptonica/1.82.0_1/include/leptonica/allheaders.h`. I've attempted to run compilation with `PATH="/usr/local/Cellar/leptonica/1.82.0_1/include:$PATH"` but it didn't change anything. Why exactly `make` command doesn't see this headers file, and what can I do to fix it?
Author
Owner

@abhi-kr-2100 commented on GitHub (Nov 24, 2022):

Can you try setting CPATH to $CPATH:/usr/local/Cellar/leptonica/1.82.0_1/include/ and rerunning make:

$ CPATH="$CPATH:/usr/local/Cellar/leptonica/1.82.0_1/include/" make
@abhi-kr-2100 commented on GitHub (Nov 24, 2022): Can you try setting `CPATH` to `$CPATH:/usr/local/Cellar/leptonica/1.82.0_1/include/` and rerunning `make`: ```sh $ CPATH="$CPATH:/usr/local/Cellar/leptonica/1.82.0_1/include/" make ```
Author
Owner

@PunitLodha commented on GitHub (Mar 14, 2023):

Is this still an issue on the latest master?

@PunitLodha commented on GitHub (Mar 14, 2023): Is this still an issue on the latest master?
Author
Owner

@cfsmp3 commented on GitHub (Mar 15, 2023):

I'm closing this because

  • Lack of activity from OP
  • Can't reproduce (I do get an error on Mac, but it's past the header stage - it's linking).
  • I don't think we are actively maintaining Mac to be honest.
@cfsmp3 commented on GitHub (Mar 15, 2023): I'm closing this because - Lack of activity from OP - Can't reproduce (I do get an error on Mac, but it's past the header stage - it's linking). - I don't think we are actively maintaining Mac to be honest.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#723