ruediger / VobSub2SRT

Converts VobSub subtitles (.idx/.srt format) into .srt subtitles.
GNU General Public License v3.0
293 stars 65 forks source link

Compilation fails on Fedora #58

Closed ssbarnea closed 4 years ago

ssbarnea commented 7 years ago
./configure -DBUILD_STATIC=ON
-- Source: /home/ssbarnea/VobSub2SRT
-- Binary: /home/ssbarnea/VobSub2SRT/build
-- Build type: Debug
CMake Warning at CMakeLists.txt:26 (message):
  Building a statically linked version of VobSub2SRT is NOT recommended.  You
  might run into library dependency issues.  Please check the README!

-- Performing Test GIF_GifFileType_UserData
-- Performing Test GIF_GifFileType_UserData - Success
-- Found GIF: /usr/lib64/libgif.so (found version "4")
CMake Warning at CMakeModules/FindTesseract.cmake:56 (message):
  You are using an old Tesseract version.  Support for Tesseract 2 is
  deprecated and will be removed in the future!
Call Stack (most recent call first):
  CMakeLists.txt:66 (find_package)

-- Bash completion path: /usr/share/bash-completion/completions
-- vobsub2srt version: 1.0pre7-7-gd8f6803
-- Debian architecture: amd64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ssbarnea/VobSub2SRT/build

Compile

$ make
make -C build
make[1]: Entering directory '/home/ssbarnea/VobSub2SRT/build'
make[2]: Entering directory '/home/ssbarnea/VobSub2SRT/build'
make[3]: Entering directory '/home/ssbarnea/VobSub2SRT/build'
make[3]: Leaving directory '/home/ssbarnea/VobSub2SRT/build'
[ 50%] Built target mplayer
make[3]: Entering directory '/home/ssbarnea/VobSub2SRT/build'
make[3]: Leaving directory '/home/ssbarnea/VobSub2SRT/build'
make[3]: Entering directory '/home/ssbarnea/VobSub2SRT/build'
[ 60%] Building CXX object src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o
/home/ssbarnea/VobSub2SRT/src/vobsub2srt.c++: In function ‘int main(int, char**)’:
/home/ssbarnea/VobSub2SRT/src/vobsub2srt.c++:218:3: error: ‘TessBaseAPI’ has not been declared
   TessBaseAPI::SimpleInit(tess_path, tess_lang, false); // TODO params
   ^~~~~~~~~~~
/home/ssbarnea/VobSub2SRT/src/vobsub2srt.c++:220:5: error: ‘TessBaseAPI’ has not been declared
     TessBaseAPI::SetVariable("tessedit_char_blacklist", blacklist.c_str());
     ^~~~~~~~~~~
/home/ssbarnea/VobSub2SRT/src/vobsub2srt.c++:275:20: error: ‘TessBaseAPI’ has not been declared
       char *text = TessBaseAPI::TesseractRect(image, 1, stride, 0, 0, width, height);
                    ^~~~~~~~~~~
/home/ssbarnea/VobSub2SRT/src/vobsub2srt.c++:314:3: error: ‘TessBaseAPI’ has not been declared
   TessBaseAPI::End();
   ^~~~~~~~~~~
src/CMakeFiles/vobsub2srt.dir/build.make:62: recipe for target 'src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o' failed
make[3]: *** [src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o] Error 1
make[3]: Leaving directory '/home/ssbarnea/VobSub2SRT/build'
CMakeFiles/Makefile2:172: recipe for target 'src/CMakeFiles/vobsub2srt.dir/all' failed
make[2]: *** [src/CMakeFiles/vobsub2srt.dir/all] Error 2
make[2]: Leaving directory '/home/ssbarnea/VobSub2SRT/build'
Makefile:149: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/ssbarnea/VobSub2SRT/build'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
ruediger commented 7 years ago

See the warnings CMake produces:

  1. BUILD_STATIC is a hack and will lead to issues.
  2. It seems you have an old version of Tesseract. What version of Tesseract are you using? What version of Fedora?
ruediger commented 7 years ago

You could also try the autotools branch. But that will definitely require a Tesseract version 3 or higher

andusvan commented 6 years ago

Fedora has a Tesseract 3 Version, so it works. I run into this error too, because I run the configure before installing tesseract. After I remove the source and unpacked it again, run configure it worked without problems...

Kcchouette commented 4 years ago

It has succeed for me using https://github.com/ruediger/VobSub2SRT/issues/66#issuecomment-367963507 Edit: Using https://github.com/bubonic/VobSub2SRT seems working like a charm without changing branch and using tesseract 4

Kcchouette commented 4 years ago

why did you close the issue @ssbarnea? Do you find a way to fix this issue on this repo?

ssbarnea commented 4 years ago

Ticket was 3 years old, same as my used of VobSub2SRT. Anyone else is welcomed to pursue it.