AmitGorvadiya / tesseract-ocr

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

Cannot compile 2.04 nor svn version on linux #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

for 2.04 sources:
1. untargz
2. cd into dir
3. ./configure
4. make

What is the expected output? What do you see instead?
I expect make successfull.
I get: 
g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT svutil.o -MD -MP -MF
.deps/svutil.Tpo -c -o svutil.o svutil.cpp
svutil.cpp: In static member function `static void SVSync::StartProcess(const
   char*, const char*)':
svutil.cpp:75: `fork' undeclared (first use this function)
svutil.cpp:75: (Each undeclared identifier is reported only once for each
   function it appears in.)
svutil.cpp:105: `execvp' undeclared (first use this function)
svutil.cpp: In member function `void SVNetwork::Close()':
svutil.cpp:248: `close' undeclared (first use this function)
svutil.cpp: In constructor `SVNetwork::SVNetwork(const char*, int)':
svutil.cpp:336: `sleep' undeclared (first use this function)
make[3]: *** [svutil.o] Error 1
make[3]: Leaving directory `/storage/kits/tesseract-2.04/viewer'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/storage/kits/tesseract-2.04/viewer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/storage/kits/tesseract-2.04'
make: *** [all] Error 2

**************

for SVN version:

1. svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/
tesseract-ocr-read-only
2. cd tesseract-ocr-read-only
3. ./runautoconf
4. ./configure
5. make

What is the expected output? What do you see instead?

source='makerow.cpp' object='makerow.o' libtool=no \
        depfile='.deps/makerow.Po' tmpdepfile='.deps/makerow.TPo' \
        depmode=gcc3 /bin/sh ../config/depcomp \
        g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil
-I../image -I../viewer -I../ccmain -I../wordrec -I../api -I../cutil
-I../classify -I../dict   -g -O2 -c -o makerow.o `test -f 'makerow.cpp' ||
echo './'`makerow.cpp
makerow.cpp: In function `void compute_block_xheight(TO_BLOCK*, float,
   tesseract::Tesseract*)':
makerow.cpp:1334: warning: passing `float' for argument passing 3 of `void
   compute_row_xheight(TO_ROW*, float, int, tesseract::Tesseract*)'
makerow.cpp:1334: warning: argument to `int' from `float'
makerow.cpp: In function `void assign_blobs_to_rows(TO_BLOCK*, float*, int,
   unsigned char, unsigned char, unsigned char)':
makerow.cpp:2443: warning: passing `float' for argument 2 of `void
   ScrollView::SetCursor(int, int)'
makerow.cpp:2476: warning: passing `float' for argument 2 of `void
   ScrollView::DrawTo(int, int)'
../wordrec/matrix.h: In constructor `GENERIC_MATRIX<T>::GENERIC_MATRIX(int)
   [with T = BLOB_CHOICE_LIST*]':
../wordrec/matrix.h:84:   instantiated from here
../wordrec/matrix.h:44: invalid conversion from `int' to `BLOB_CHOICE_LIST*'
../wordrec/matrix.h:44:   initializing argument 3 of `void
   GENERIC_MATRIX<T>::put(int, int, T) [with T = BLOB_CHOICE_LIST*]'
make[3]: *** [makerow.o] Error 1
make[3]: Leaving directory `/storage/kits/tesseract-svn/textord'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/storage/kits/tesseract-svn/textord'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/storage/kits/tesseract-svn'
make: *** [all] Error 2

***********************************

What version of the product are you using? On what operating system?

2.04/svn version checked out about 30 min ago on Linux Impuls 2.4.36.2 #1
SMP Thu Jul 2 11:40:44 EEST 2009 i686 i686 i386 GNU/Linux

Please provide any additional information below.

[root@Impuls /]# make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-linux-gnu
[root@Impuls /]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Original issue reported on code.google.com by ciuly....@gmail.com on 20 Aug 2009 at 9:04

GoogleCodeExporter commented 9 years ago
note that adding
#include <sys/types.h>
#include <unistd.h>
to the svutil.cpp file at the end of the non-win include list, solved the 
problem
with 2.04

Original comment by ciuly....@gmail.com on 20 Aug 2009 at 9:36

GoogleCodeExporter commented 9 years ago
Fixed in svn for 3.00.

Original comment by theraysm...@gmail.com on 20 Aug 2009 at 10:40