mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-15 13:35:30 +00:00
[BUG] Error in ./configure enabling hardsubx on Mac #541
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vr8hub on GitHub (Jan 8, 2020).
Originally assigned to: @canihavesomecoffee on GitHub.
CCExtractor version (using the --version parameter preferably) : 0.88 (I cloned the repository immediately before attempting this)
In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):
My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):
Necessary information
NoneVideo links (replace text below with your links)
None.
Additional information
I'm trying to compile on Mac (OSX Mojave 10.14.6) with hardsubx support. It took me a while to determine that it's not automatically enabled (the compile guide makes no mention of it but it's in the standard help). I searched the git log and found an issue from 2017 that said that hardsubx was enabled for the Mac, so I'm operating under the assumption that it is available for the Mac. The
docs/HARDSUBX.txtdon't make mention of the Mac specifically one way or the other, so that may be a bad assumption.I confirmed that all of the required libraries (tesseract, leptonica, ffmpeg) were available, then did an
./autogen.shand./configure --enable-hardsubx --enable-ocr. I'm getting an error on the configure (showing a couple of lines of context):Line 6768 is:
I ran
pkg-config --libs-only-l --silence-errors tesseractmanually and receiveI'm not conversant enough in autotools to know what the problem is, but it appears that the configure test is not anticipating that type of return.
Is this a problem in the configure or with the return of the pkg-config? The indicated pre-configure tests to confirm that tesseract and leptonica were installed all worked, and the configure found the tesseract library.
@cfsmp3 commented on GitHub (Jan 25, 2020):
@vr8hub Seems fixed in current master, feel free to reopen if you still have problems.
@vr8hub commented on GitHub (Feb 15, 2020):
Sorry, I've just now been able to get back to this.
I did a
git pulland tried it again and received the exact same error. I then completely deleted the local repository, did agit cloneto start over, and tried it again, with the same result.The error is on the same line as before, and that line is the same in the configure script as before. So not sure what changed in master, but it doesn't seem to have made its way to the Mac folder.
@vr8hub commented on GitHub (Feb 16, 2020):
I don't have a Linux VM handy, so I don't know what the above
pkg-configcommand returns there. But in playing with this on the Mac, it appears that the leading dash on the return (-ltesseract -lcurl, see above) is the problem, and that's a problem because it isn't quoted and so looks like an option.So it looks like just quoting the output will work:
I tried this manually, and it returned a 1. I then changed "tesseract" to "abc" to test for a non-existent library, and it returned a 0. So I think it's working, if I understand what the test is trying to do.
I don't know if quoting will work on Linux, but it appears that configure.ac is already different for Linux and Mac, so maybe it's OK even if it doesn't work there.
@vr8hub commented on GitHub (Feb 16, 2020):
As near as I can tell, this works from a compile perspective. I ran
The Makefile includes the references to the hardsubx modules. Then a subsequent
generates several hardsubx
.ofiles in src/lib_ccx, so it looked like the make worked as well. So I thought the ccextractor would work.But, a subsequent invocation still says that
-hardsubxis not understood.I first tried something very simple, e.g.
./ccextractor -hardsubx <filename>, then I tried the sample composite command on the Google Summer of Code page for hardsubx.Both just return this:
I looked at the Makefile, and the hardsubx files (
ccextractor-hardsubx.o, -hardsubx-classifier.o, -hardsubx_decoder.o, -hardsubx_imgops.o, -hardsubx_utility.o) are all mentioned in the final gcc command that produces the executable.There are no other ccextractor executables on my system. I am invoking it with
./ccextractorto ensure I'm getting the one just built in the Mac directory.I'm at a loss as to what else to check.
@cfsmp3 commented on GitHub (Feb 16, 2020):
Just edit src/lib_ccx/parms.c and add
#define ENABLE_HARDSUBX
near the top of the file (before the first #ifdef ENABLE_HARDSUBX )
That will force ccextractor to accept the parameter and/or give us an idea about what's going on there.
@vr8hub commented on GitHub (Feb 16, 2020):
That worked. So I went looking at Makefile and discovered that
am__append_4had a#in front of the enable. I then ran anotherconfigure, which got rid of the comment. Ergo, I ranmake clean, but apparently did not precede it with another./configure. My apologies for the noise. ([Edit] But I had to have, otherwise I wouldn't have known the quoting worked. Hmmm. I don't know what happened. Bottom line, the problem was a commented out am__append_4, and anotherconfigurefixed that. But I don't know why it was commented out in the first place.)That leaves us with the above quoting works, at least for the Mac. Since I don't know what the return from the command on Linux is, I don't know if that's a good overall solution or not, but it at least gets me working for now. Thank you for your help, and I again apologize for the noise on the executable.
@johan456789 commented on GitHub (Jul 20, 2020):
I'm also having this problem on mac. So I first run
./autogen.shand then quote the part in line 6768 ofconfigure.Then run
This runs with no error.
But
./ccextractor --hardsubxstill doesn't recognize--hardsubx.What can I do now?
@cfsmp3 commented on GitHub (Jul 20, 2020):
After running configure did you actually run make && make install ?
@johan456789 commented on GitHub (Jul 21, 2020):
No I only ran
make ENABLE_HARDSUBX=yes ENABLE_OCR=yes.So if I run
I would get this error in the end:
@cfsmp3 commented on GitHub (Jul 21, 2020):
configure by itself is not enough.
Anyway it seems like make itself was successful, so probably you have a working binary in the build directory, even if install failed for some reason.
@johan456789 commented on GitHub (Jul 21, 2020):
Thanks for the help, but no, the output binary still doesn't recognize
--hardsubx.The same error
@vr8hub commented on GitHub (Jul 21, 2020):
No idea what the install problem is—that’s a separate issue.
But you have to run both configure and make with the ENABLEs. You’ve only done one or the other.
@johan456789 commented on GitHub (Jul 21, 2020):
What are the commands you run?
I tried this and it still doesn't work. I suppose I'm running both here?
@vr8hub commented on GitHub (Jul 21, 2020):
Yes, you are in that instance, your earlier one didn’t.
Did you look at the config log to confirm it really was enabled?
Did you look at the make log and ensure everything was linked in correctly?
Did you ensure you’re running the right executable?
(Sorry to ask obvious questions, but the obvious ones are usually my problem.)
I’m not at the computer where I got this working, and it’s been several months, but I originally created the issue and can confirm it does work.
@johan456789 commented on GitHub (Jul 21, 2020):
Looks like they are not enabled as in
configure.log:makeoutputs no error, some warnings though.Yes, I gave the full path.
No worries. It'd be great to pinpoint the problem.
@vr8hub commented on GitHub (Jul 21, 2020):
Unfortunately, you're the only one with your files, so you're going to have to follow the chain all the way through. I had to do the same thing; it's how I found the issue to start with.
Does your config.log show the right flags passed to it at the top?
Does your config.out show the two libraries that are required? (One of them is tesseract something, which I only remember because Marvel; I don't remember the other one)
Did your Makefile get the correct flags, i.e. if everything worked, then the makefile should have gotten the -DENABLE_HARDSUB (and corresponding OCR) in it. See the Makefile.am for what to look for.
Capture the make output; does that output have the right link flags in it?
And so on.
I don't need answers to the questions. :) I'm just giving you questions to help you with your debugging process.
@cottuli commented on GitHub (Mar 21, 2021):
@johan456789 the parameter you need to use is -hardsubx not --hardsubx.