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

Not able to install 5.0.0 on ubuntu-trusty #10

Open
robertleelittleiii opened this issue Jul 16, 2020 · 9 comments
Open

Not able to install 5.0.0 on ubuntu-trusty #10

robertleelittleiii opened this issue Jul 16, 2020 · 9 comments

Comments

@robertleelittleiii
Copy link

I added the PPA, but when I do an apt-get install tesseract-ocr, I still get the 4.1.1 version.

apt-cache policy tesseract-ocr
tesseract-ocr:
Installed: 4.1.1+git4247-97079fa3-1ppa1trusty1
Candidate: 4.1.1+git4247-97079fa3-1ppa1
trusty1
Version table:
*** 4.1.1+git4247-97079fa3-1ppa1~trusty1 0
500 http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
3.03.02-3 0
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

@stweil
Copy link
Contributor

stweil commented Jul 16, 2020

Did you run apt update?

@robertleelittleiii
Copy link
Author

Yes.

@AlexanderP
Copy link
Owner

Hi.
Tesseract version 5.0.0 not building on Ubuntu 14.04 :(

@robertleelittleiii
Copy link
Author

Thanks, I just figured that out. Any idea what the issue is? Is it possible??

@AlexanderP
Copy link
Owner

@stweil
Is it possible to fix this build error?

libtool: compile:  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -O2 -DNDEBUG -I./include -I./include -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-chopper.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-chopper.Tpo -c src/wordrec/chopper.cpp  -fPIC -DPIC -o src/wordrec/.libs/libtesseract_la-chopper.o
libtool: compile:  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -O2 -DNDEBUG -I./include -I./include -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-chopper.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-chopper.Tpo -c src/wordrec/chopper.cpp -fPIE -o src/wordrec/libtesseract_la-chopper.o >/dev/null 2>&1
mv -f src/wordrec/.deps/libtesseract_la-chopper.Tpo src/wordrec/.deps/libtesseract_la-chopper.Plo
/bin/bash ./libtool  --tag=CXX   --mode=compile x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -O2 -DNDEBUG -I./include -I./include   -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec  -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica     -fopenmp -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-drawfx.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-drawfx.Tpo -c -o src/wordrec/libtesseract_la-drawfx.lo `test -f 'src/wordrec/drawfx.cpp' || echo './'`src/wordrec/drawfx.cpp
libtool: compile:  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -O2 -DNDEBUG -I./include -I./include -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-drawfx.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-drawfx.Tpo -c src/wordrec/drawfx.cpp  -fPIC -DPIC -o src/wordrec/.libs/libtesseract_la-drawfx.o
libtool: compile:  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -O2 -DNDEBUG -I./include -I./include -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-drawfx.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-drawfx.Tpo -c src/wordrec/drawfx.cpp -fPIE -o src/wordrec/libtesseract_la-drawfx.o >/dev/null 2>&1
mv -f src/wordrec/.deps/libtesseract_la-drawfx.Tpo src/wordrec/.deps/libtesseract_la-drawfx.Plo
/bin/bash ./libtool  --tag=CXX   --mode=compile x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -O2 -DNDEBUG -I./include -I./include   -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec  -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica     -fopenmp -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-findseam.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-findseam.Tpo -c -o src/wordrec/libtesseract_la-findseam.lo `test -f 'src/wordrec/findseam.cpp' || echo './'`src/wordrec/findseam.cpp
libtool: compile:  x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -O2 -DNDEBUG -I./include -I./include -I./src/arch -I./src/ccmain -I./src/ccstruct -I./src/ccutil -I./src/classify -I./src/cutil -I./src/dict -I./src/lstm -I./src/opencl -I./src/textord -I./src/training -I./src/viewer -I./src/wordrec -D_FORTIFY_SOURCE=2 -I/usr/include/leptonica -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -g -fPIC -DTESSDATA_PREFIX=/usr/share/tesseract-ocr/5 -std=c++11 -MT src/wordrec/libtesseract_la-findseam.lo -MD -MP -MF src/wordrec/.deps/libtesseract_la-findseam.Tpo -c src/wordrec/findseam.cpp  -fPIC -DPIC -o src/wordrec/.libs/libtesseract_la-findseam.o
In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0,
                 from /usr/include/c++/4.8/algorithm:62,
                 from ./include/tesseract/genericvector.h:22,
                 from ./src/ccstruct/blobs.h:29,
                 from ./src/ccstruct/seam.h:29,
                 from src/wordrec/findseam.h:25,
                 from src/wordrec/findseam.cpp:21:
/usr/include/c++/4.8/functional: In instantiation of '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {tesseract::KDPtrPairDec<float, SEAM>}]':
./include/tesseract/genericvector.h:860:7:   required from 'void GenericVector<T>::clear() [with T = tesseract::KDPtrPairDec<float, SEAM>]'
./include/tesseract/genericvector.h:673:9:   required from 'GenericVector<T>::~GenericVector() [with T = tesseract::KDPtrPairDec<float, SEAM>]'
./src/ccutil/genericheap.h:58:7:   required from here
/usr/include/c++/4.8/functional:2471:71: error: no matching function for call to 'tesseract::KDPtrPairDec<float, SEAM>::KDPtrPairDec(tesseract::KDPtrPairDec<float, SEAM>)'
       return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
                                                                       ^
/usr/include/c++/4.8/functional:2471:71: note: candidates are:
In file included from src/wordrec/findseam.h:27:0,
                 from src/wordrec/findseam.cpp:21:
./src/ccutil/kdpair.h:167:3: note: tesseract::KDPtrPairDec<Key, Data>::KDPtrPairDec(tesseract::KDPtrPairDec<Key, Data>&) [with Key = float; Data = SEAM]
   KDPtrPairDec(KDPtrPairDec& src) : KDPtrPair<Key, Data>(src) {}
   ^
./src/ccutil/kdpair.h:167:3: note:   no known conversion for argument 1 from 'tesseract::KDPtrPairDec<float, SEAM>' to 'tesseract::KDPtrPairDec<float, SEAM>&'
./src/ccutil/kdpair.h:166:3: note: tesseract::KDPtrPairDec<Key, Data>::KDPtrPairDec(Key, Data*) [with Key = float; Data = SEAM]
   KDPtrPairDec(Key k, Data* d) : KDPtrPair<Key, Data>(k, d) {}
   ^
./src/ccutil/kdpair.h:166:3: note:   candidate expects 2 arguments, 1 provided
./src/ccutil/kdpair.h:165:3: note: tesseract::KDPtrPairDec<Key, Data>::KDPtrPairDec() [with Key = float; Data = SEAM]
   KDPtrPairDec() : KDPtrPair<Key, Data>() {}
   ^
./src/ccutil/kdpair.h:165:3: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0,
                 from /usr/include/c++/4.8/algorithm:62,
                 from ./include/tesseract/genericvector.h:22,
                 from ./src/ccstruct/blobs.h:29,
                 from ./src/ccstruct/seam.h:29,
                 from src/wordrec/findseam.h:25,
                 from src/wordrec/findseam.cpp:21:
/usr/include/c++/4.8/functional:2471:71: error: return-statement with a value, in function returning 'void' [-fpermissive]
       return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
                                                                       ^
/usr/include/c++/4.8/functional: In instantiation of '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {tesseract::KDPtrPairInc<float, SEAM>}]':
./include/tesseract/genericvector.h:860:7:   required from 'void GenericVector<T>::clear() [with T = tesseract::KDPtrPairInc<float, SEAM>]'
./include/tesseract/genericvector.h:673:9:   required from 'GenericVector<T>::~GenericVector() [with T = tesseract::KDPtrPairInc<float, SEAM>]'
./src/ccutil/genericheap.h:58:7:   required from here
/usr/include/c++/4.8/functional:2471:71: error: no matching function for call to 'tesseract::KDPtrPairInc<float, SEAM>::KDPtrPairInc(tesseract::KDPtrPairInc<float, SEAM>)'
/usr/include/c++/4.8/functional:2471:71: note: candidates are:
In file included from src/wordrec/findseam.h:27:0,
                 from src/wordrec/findseam.cpp:21:
./src/ccutil/kdpair.h:150:3: note: tesseract::KDPtrPairInc<Key, Data>::KDPtrPairInc(tesseract::KDPtrPairInc<Key, Data>&) [with Key = float; Data = SEAM]
   KDPtrPairInc(KDPtrPairInc& src) : KDPtrPair<Key, Data>(src) {}
   ^
./src/ccutil/kdpair.h:150:3: note:   no known conversion for argument 1 from 'tesseract::KDPtrPairInc<float, SEAM>' to 'tesseract::KDPtrPairInc<float, SEAM>&'
./src/ccutil/kdpair.h:149:3: note: tesseract::KDPtrPairInc<Key, Data>::KDPtrPairInc(Key, Data*) [with Key = float; Data = SEAM]
   KDPtrPairInc(Key k, Data* d) : KDPtrPair<Key, Data>(k, d) {}
   ^
./src/ccutil/kdpair.h:149:3: note:   candidate expects 2 arguments, 1 provided
./src/ccutil/kdpair.h:148:3: note: tesseract::KDPtrPairInc<Key, Data>::KDPtrPairInc() [with Key = float; Data = SEAM]
   KDPtrPairInc() : KDPtrPair<Key, Data>() {}
   ^
./src/ccutil/kdpair.h:148:3: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0,
                 from /usr/include/c++/4.8/algorithm:62,
                 from ./include/tesseract/genericvector.h:22,
                 from ./src/ccstruct/blobs.h:29,
                 from ./src/ccstruct/seam.h:29,
                 from src/wordrec/findseam.h:25,
                 from src/wordrec/findseam.cpp:21:
/usr/include/c++/4.8/functional:2471:71: error: return-statement with a value, in function returning 'void' [-fpermissive]
       return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
                                                                       ^
make[4]: *** [src/wordrec/libtesseract_la-findseam.lo] Error 1

@stweil
Copy link
Contributor

stweil commented Jul 19, 2020

It might be possible to fix that (perhaps a backported newer GNU compiler or clang has better C++11 compatibility and works), but I don't think that we should spend time on old releases which are no longer supported. Ubuntu 14.04.6 LTS was supported until April 2019.

@robertleelittleiii
Copy link
Author

Thanks for the feedback. I was able to install Gcc-5 and G++-5 on Ubuntu and got it to compile and install.

Installing gcc 5 on ubuntu 14.04:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5

I had to manually sym link g++-5 to g++, but after I did that it compiled without any issue.

@stweil
Copy link
Contributor

stweil commented Jul 20, 2020

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
I had to manually sym link g++-5 to g++, but after I did that it compiled without any issue.

That's not needed if you explicitly add the compiler during the configuration: ./configure CXX=g++-5 ...

@robertleelittleiii
Copy link
Author

Good point. Thanks again for your help!

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