raffaeldantas / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
1 stars 0 forks source link

Unable to compile latest repository under ubuntu 14.04 #1307

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Downloading latest repository code
2. compiling under ubuntu 14.04
3.

What is the expected output? What do you see instead?
expect it to compile clean

What version of the product are you using? On what operating system?
Trying to compile the latest git source 
currently have 3.03 installed, info about gcc and g++ compilers also listed 
below 

dell14-04@dell1404-OptiPlex-330:~$ tesseract -v
tesseract 3.03
 leptonica-1.71
  libjpeg 8d : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8
----------------------------------
dell14-04@dell1404-OptiPlex-330:~$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' 
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs 
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.8 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls 
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap 
--enable-plugin --with-system-zlib --disable-browser-plugin 
--enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu 
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
dell14-04@dell1404-OptiPlex-330:~$ 
--------------------------------
dell14-04@dell1404-OptiPlex-330:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' 
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs 
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.8 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls 
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug 
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap 
--enable-plugin --with-system-zlib --disable-browser-plugin 
--enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic 
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu 
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
dell14-04@dell1404-OptiPlex-330:~$ 
-----------------------------------------

Please provide any additional information below.

Downloaded source a couple of days ago 

git clone https://code.google.com/p/tesseract-ocr

and updated today by the following:

dell14-04@dell1404-OptiPlex-330:~$ cd tesseract-ocr/
dell14-04@dell1404-OptiPlex-330:~/tesseract-ocr$ git remote update 
Fetching origin
remote: Counting objects: 5, done.
Unpacking objects: 100% (5/5), done.
From https://code.google.com/p/tesseract-ocr
   541e06c..ff87944  master     -> origin/master
dell14-04@dell1404-OptiPlex-330:~/tesseract-ocr$

the autogen.log, configure.log and make.log are attached.

Error is at :
mv -f .deps/tesseract-tesseractmain.Tpo .deps/tesseract-tesseractmain.Po
/bin/bash ../libtool  --tag=CXX   --mode=link g++  -std=c++11   -o tesseract 
tesseract-tesseractmain.o libtesseract.la   -lrt -llept -lpthread 
libtool: link: g++ -std=c++11 -o .libs/tesseract tesseract-tesseractmain.o  
./.libs/libtesseract.so -lrt -llept -lpthread
./.libs/libtesseract.so: undefined reference to `l_generateCIDataForPdf'
./.libs/libtesseract.so: undefined reference to `l_CIDataDestroy'
collect2: error: ld returned 1 exit status
make[2]: *** [tesseract] Error 1
make[2]: Leaving directory `/home/dell14-04/tesseract-ocr/api'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dell14-04/tesseract-ocr'
make: *** [all] Error 2

Original issue reported on code.google.com by shreeshrii on 9 Sep 2014 at 3:26

Attachments:

GoogleCodeExporter commented 9 years ago
I can not reproduce it.

Original comment by zde...@gmail.com on 9 Sep 2014 at 9:03

GoogleCodeExporter commented 9 years ago
This error comes from Leptonica 1.70. Tesseract now requires Leptonica 1.71.
Leptonica 1.71 can be installed manually (but not so easily) and will ship with 
Ubuntu for their 14.10 release scheduled for October 23 of this year.

Original comment by breidenb...@gmail.com on 10 Sep 2014 at 8:11

GoogleCodeExporter commented 9 years ago
Thanks to Zdenko for pointing out that this could be because of an older 
version of leptonica also being on the system. That was indeed the case:

/usr/lib/liblept.a
/usr/lib/liblept.so
/usr/lib/liblept.so.4.0.1
/usr/lib/liblept.so.4

/usr/share/doc/libleptonica-dev
/usr/share/doc/liblept4

/usr/local/lib/liblept.so.4.0.2
/usr/local/lib/liblept.a
/usr/local/lib/liblept.la
/usr/local/lib/liblept.so
/usr/local/lib/liblept.so.4

Though, I would have thought that the program would pick up /usr/local/ before 
/usr/
Anyway, after deletion of the old version, the build went ok.

Appreciate your help.

Original comment by shreeshrii on 11 Sep 2014 at 12:54

GoogleCodeExporter commented 9 years ago
and for us novices with the same problem, how do i delete the 1.70 version?

I installed it with sudo apt-get install libleptonica-dev

Original comment by SirOsisO...@gmail.com on 23 Sep 2014 at 5:55

GoogleCodeExporter commented 9 years ago
Srirangaji had written:

"using ubuntu software centre I have removed leptonica -version progs:i386 
1.70.1-1 (uninstalled completely."

Please give that a try and then install the new version.

Original comment by shreeshrii on 23 Sep 2014 at 6:11

GoogleCodeExporter commented 9 years ago
I am facing the same error. I tried compiling with leptonica 1.71 and 1.72.

Original comment by sushruts...@gmail.com on 28 May 2015 at 8:46

GoogleCodeExporter commented 9 years ago
I have the same problem when compiling in Ubuntu 14.04.
The error is:
libtool: link: g++ -std=c++11 -o .libs/tesseract tesseract-tesseractmain.o  
./.libs/libtesseract.so -lrt -llept -lpthread
 ./.libs/libtesseract.so: undefined reference to `l_generateCIDataForPdf'
 ./.libs/libtesseract.so: undefined reference to `l_CIDataDestroy'

tesseract -v
tesseract 3.03
 leptonica-1.72
  libjpeg 8d (libjpeg-turbo 1.3.0) : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8

I basically follow the instruction in 
https://realpython.com/blog/python/setting-up-a-simple-ocr-server/

Please help.

Original comment by kingsf...@gmail.com on 2 Jul 2015 at 3:41