Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build with GCC 7 #66

Open
marillat opened this issue Dec 19, 2017 · 3 comments
Open

Fail to build with GCC 7 #66

marillat opened this issue Dec 19, 2017 · 3 comments

Comments

@marillat
Copy link

Here I try to build the latest git snapshot 0ba6e25

Build for debian unstable amd64 with tesseract 4.00~git2174-3b62badd-5

cd "/src/vobsub2srt-1.0~pre7+20171219/build/src" && /usr/lib/ccache/c++  -DINSTALL_PREFIX=\"/usr\" -I"/src/vobsub2srt-1.0~pre7+20171219/mplayer"  -ansi -pedantic -Wall -Wextra -Wno-long-long   -o CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o -c "/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++"
In file included from /usr/include/c++/7/cinttypes:35:0,
                 from /usr/include/tesseract/host.h:30,
                 from /usr/include/tesseract/serialis.h:26,
                 from /usr/include/tesseract/baseapi.h:32,
                 from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^~~~~
In file included from /usr/include/tesseract/apitypes.h:23:0,
                 from /usr/include/tesseract/baseapi.h:27,
                 from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/tesseract/publictypes.h:33:1: error: 'constexpr' does not name a type
 constexpr int kPointsPerInch = 72;
 ^~~~~~~~~
/usr/include/tesseract/publictypes.h:33:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:38:1: error: 'constexpr' does not name a type
 constexpr int kMinCredibleResolution = 70;
 ^~~~~~~~~
/usr/include/tesseract/publictypes.h:38:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:40:1: error: 'constexpr' does not name a type
 constexpr int kMaxCredibleResolution = 2400;
 ^~~~~~~~~
/usr/include/tesseract/publictypes.h:40:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
/usr/include/tesseract/publictypes.h:45:1: error: 'constexpr' does not name a type
 constexpr int kResolutionEstimationFactor = 10;
 ^~~~~~~~~
/usr/include/tesseract/publictypes.h:45:1: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11
In file included from /usr/include/tesseract/ltrresultiterator.h:26:0,
                 from /usr/include/tesseract/resultiterator.h:26,
                 from /usr/include/tesseract/baseapi.h:31,
                 from /src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:27:
/usr/include/tesseract/unichar.h:164:10: error: 'string' does not name a type; did you mean 'stdin'?
   static string UTF32ToUTF8(const std::vector<char32>& str32);
          ^~~~~~
          stdin
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++: In function 'int main(int, char**)':
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:218:3: error: 'TessBaseAPI' has not been declared
   TessBaseAPI::SimpleInit(tess_path, tess_lang, false); // TODO params
   ^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:220:5: error: 'TessBaseAPI' has not been declared
     TessBaseAPI::SetVariable("tessedit_char_blacklist", blacklist.c_str());
     ^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:275:20: error: 'TessBaseAPI' has not been declared
       char *text = TessBaseAPI::TesseractRect(image, 1, stride, 0, 0, width, height);
                    ^~~~~~~~~~~
/src/vobsub2srt-1.0~pre7+20171219/src/vobsub2srt.c++:314:3: error: 'TessBaseAPI' has not been declared
   TessBaseAPI::End();
   ^~~~~~~~~~~
src/CMakeFiles/vobsub2srt.dir/build.make:65: recipe for target 'src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o' failed
make[2]: *** [src/CMakeFiles/vobsub2srt.dir/vobsub2srt.c++.o] Error 1
@Seegras
Copy link

Seegras commented Feb 23, 2018

Same as #67 ?

@Seegras
Copy link

Seegras commented Feb 23, 2018

I just managed to build on debian unstable, with;
git checkout autotools
./bootstrap
./configure CXXFLAGS=-std=gnu++11
make

@matiasw
Copy link

matiasw commented Apr 26, 2021

I just managed to build on debian unstable, with;
git checkout autotools
./bootstrap
./configure CXXFLAGS=-std=gnu++11
make

I did this on WSL Kali (Debian-like), and got:

/usr/bin/ld: src/vobsub2srt-vobsub2srt.o: in function main': vobsub2srt.c++:(.text+0xa2e): undefined reference to tesseract::TessBaseAPI::TessBaseAPI()'
/usr/bin/ld: vobsub2srt.c++:(.text+0xab3): undefined reference to tesseract::TessBaseAPI::SetVariable(char const*, char const*)' /usr/bin/ld: vobsub2srt.c++:(.text+0xe32): undefined reference to tesseract::TessBaseAPI::TesseractRect(unsigned char const*, int, int, int, int, int, int)'
/usr/bin/ld: vobsub2srt.c++:(.text+0x11db): undefined reference to tesseract::TessBaseAPI::End()' /usr/bin/ld: vobsub2srt.c++:(.text+0x1280): undefined reference to tesseract::TessBaseAPI::~TessBaseAPI()'
/usr/bin/ld: vobsub2srt.c++:(.text+0x13f1): undefined reference to tesseract::TessBaseAPI::~TessBaseAPI()' /usr/bin/ld: src/vobsub2srt-vobsub2srt.o: in function tesseract::TessBaseAPI::Init(char const*, char const*)':
vobsub2srt.c++:(.text.ZN9tesseract11TessBaseAPI4InitEPKcS2[ZN9tesseract11TessBaseAPI4InitEPKcS2]+0x3f): undefined reference to `tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector const*, GenericVector const*, bool)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:476: vobsub2srt] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants