building tesseract on windows using cygwin

304 weergaven
Naar het eerste ongelezen bericht

Simon Eigeldinger

ongelezen,
20 jul 2015, 12:18:2020-07-2015
aan tesser...@googlegroups.com
Hi all,

just tried to compile tesseract on windows using cygwin from the git repo.

this is what i got.
looks pretty fine until we reach make.
though i post the full stuff.
i think i haven't forgotten any dependencies.

maybe someone could have a look at this?
thanks.

$ ./autogen.sh --prefix=/home/Besitzer/tesseractbin

Running aclocal
Running libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
Running autoheader
Running automake --add-missing --copy
configure.ac:65: installing 'config/missing'
api/Makefile.am: installing 'config/depcomp'
Running autoconf

All done.
To build the software now, do something like:

$ ./configure [--enable-debug] [...other options]

$ ./configure --prefix=/home/Besitzer/tesseractbin
--disable-tessdata-prefix --
disable-shared

Using git revision: 3.04.00-14-g5414087
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking --enable-graphics argument... yes
checking --enable-embedded argument... no
checking --enable-opencl argument... no
checking --enable-visibility argument... no
checking --enable-multiple-libraries argument... no
checking whether to use tessdata-prefix... no
checking whether to enable debugging... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-cygwin file names to i686-pc-cygwin
format... fu
nc_convert_file_noop
checking how to convert i686-pc-cygwin file names to toolchain format...
func_co
nvert_file_noop
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object
files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive
import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries...
func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe)
supports shared
libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe)
supports shared
libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe)
supports shared
libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking if compiling with clang... no
checking whether compiler supports C++11... yes
checking for snprintf... yes
checking for library containing sem_init... none required
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking whether #! works in shell scripts... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for getline... yes
checking for wchar_t... yes
checking for long long int... yes
checking for mbstate_t... yes
checking for leptonica... yes
checking for pixCreate in -llept... yes
checking leptonica version >= 1.71... yes
checking unicode/uchar.h usability... yes
checking unicode/uchar.h presence... yes
checking for unicode/uchar.h... yes
checking pango-1.0/pango/pango-features.h usability... yes
checking pango-1.0/pango/pango-features.h presence... yes
checking for pango-1.0/pango/pango-features.h... yes
checking cairo/cairo-version.h usability... yes
checking cairo/cairo-version.h presence... yes
checking for cairo/cairo-version.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tesseract.pc
config.status: creating api/Makefile
config.status: creating ccmain/Makefile
config.status: creating opencl/Makefile
config.status: creating ccstruct/Makefile
config.status: creating ccutil/Makefile
config.status: creating classify/Makefile
config.status: creating cube/Makefile
config.status: creating cutil/Makefile
config.status: creating dict/Makefile
config.status: creating neural_networks/runtime/Makefile
config.status: creating textord/Makefile
config.status: creating viewer/Makefile
config.status: creating wordrec/Makefile
config.status: creating tessdata/Makefile
config.status: creating tessdata/configs/Makefile
config.status: creating tessdata/tessconfigs/Makefile
config.status: creating testing/Makefile
config.status: creating java/Makefile
config.status: creating java/com/Makefile
config.status: creating java/com/google/Makefile
config.status: creating java/com/google/scrollview/Makefile
config.status: creating java/com/google/scrollview/events/Makefile
config.status: creating java/com/google/scrollview/ui/Makefile
config.status: creating doc/Makefile
config.status: creating training/Makefile
config.status: creating config_auto.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration is done.
You can now build and install tesseract by running:

$ make
$ sudo make install

Training tools can be build and installed (after building of tesseract)
with:

$ make training
$ sudo make training-install


$ make

make all-recursive
make[1]: Entering directory '/home/Besitzer/tesseractsrc'
Making all in ccutil
make[2]: Entering directory '/home/Besitzer/tesseractsrc/ccutil'
make[3]: Entering directory '/home/Besitzer/tesseractsrc/ccutil'
depbase=`echo ambigs.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I.. -O2
-DNDEBUG -I../vs2008/port -DWINDLLNAME=\"libtesseract\"
-I/usr/include/leptoni
ca -D_REENTRANT -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib
-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/i
nclude -I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libpng16
-I/usr/include/freetype2 -I/usr/include/libpng16 -std=gnu++11 -MT
ambigs.lo -
MD -MP -MF $depbase.Tpo -c -o ambigs.lo ambigs.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -DNDEBUG
-I../vs2008/port -D
WINDLLNAME=\"libtesseract\" -I/usr/include/leptonica -D_REENTRANT
-I/usr/include
/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/ca
iro -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/freetype2 -I/usr
/include/libpng16 -std=gnu++11 -MT ambigs.lo -MD -MP -MF
.deps/ambigs.Tpo -c amb
igs.cpp -o ambigs.o
ambigs.cpp:31:22: fatal error: strtok_r.h: No such file or directory
#include "strtok_r.h"
^
compilation terminated.
Makefile:568: recipe for target 'ambigs.lo' failed
make[3]: *** [ambigs.lo] Error 1
make[3]: Leaving directory '/home/Besitzer/tesseractsrc/ccutil'
Makefile:610: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/Besitzer/tesseractsrc/ccutil'
Makefile:465: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/Besitzer/tesseractsrc'
Makefile:373: recipe for target 'all' failed
make: *** [all] Error 2

zdenko podobny

ongelezen,
20 jul 2015, 14:39:0920-07-2015
aan tesser...@googlegroups.com
should be fixed - pull updates from git repo...

Zdenko



--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/55AD1E1D.4010006%40vol.at.
For more options, visit https://groups.google.com/d/optout.

ShreeDevi Kumar

ongelezen,
21 jul 2015, 00:44:0921-07-2015
aan tesser...@googlegroups.com


Zdenko,

How is this update tagged? Is there a version number with it for future ref.

- sent from my phone. excuse the brevity.

zdenko podobny

ongelezen,
21 jul 2015, 01:44:3021-07-2015
aan tesser...@googlegroups.com
I do not understand - this is standard fix/commit as any other. Why it should be tagged???

Zdenko

ShreeDevi Kumar

ongelezen,
21 jul 2015, 04:29:3321-07-2015
aan tesser...@googlegroups.com

Maybe tag is the wrong word.

I wanted to know if someone wanted to download a 3.04.00 version that works with Cygwin how would they access it.

- sent from my phone. excuse the brevity

zdenko podobny

ongelezen,
21 jul 2015, 06:46:0621-07-2015
aan tesser...@googlegroups.com
git pull ;-) or download master from github.com...

Zdenko

Jim O'Regan

ongelezen,
21 jul 2015, 07:41:0621-07-2015
aan tesser...@googlegroups.com
On 21 July 2015 at 06:43, zdenko podobny <zde...@gmail.com> wrote:
> I do not understand - this is standard fix/commit as any other. Why it
> should be tagged???

I think the question could be rephrased as "Is a bugfix that
re-enables compilation on Cygwin not significant enough to justify
tagging it as a bugfix release (e.g., 3.04.01)?"

I think it is, but it's your call.

--
<Sefam> Are any of the mentors around?
<jimregan> yes, they're the ones trolling you

Jeff Breidenbach

ongelezen,
21 jul 2015, 15:22:2421-07-2015
aan tesser...@googlegroups.com
Not to mention the data corruption problem on stdout. Maybe wait another 
week or two for anything else to come up, and then declare 3.04.01? 

(Just to be clear, it doesn't matter from Debian's perspective; the
stdout fix has already been patched there.)

Simon Eigeldinger

ongelezen,
21 jul 2015, 17:18:1721-07-2015
aan tesser...@googlegroups.com
Hi,

i hope it worked.
here's a binary to test for people who want to see if everything works fine:
http://domasofan.spdns.eu/tesseract/

There are some files over there.
they are all self extracting archives and you can extract them all in
the wanted directory. the subdirectories will be created automatically.
so if it wants to replace something it should be granted to do so.
especially the tessdata directory.

here's what all those files do:

tesseract-core-win-git-20150721.exe
around 3.7 mb.
the core tesseract program without the trained data data.

tesseract-eng-deu-win-git-20150721.exe
around 13.4 mb.
german and english data files.

tesseract-all-langs-win-git-20150721.exe
around 351.7 mb.
all the data files for tesseract which it can use at the moment.


Let's see if it works.
had no time currently to test but will do in the office tomorrow.



greetings,
simon
--
Simon Eigeldinger
Follow me on Twitter: http://www.twitter.com/domasofan/
E-Mail: simon.ei...@vol.at
MSN: simon_ei...@hotmail.com
ICQ: 121823966
Jabber: doma...@andrelouis.com

zdenko podobny

ongelezen,
22 jul 2015, 01:29:0622-07-2015
aan tesser...@googlegroups.com
did you managed to build training tools?

Zdenko

Simon Eigeldinger

ongelezen,
22 jul 2015, 11:32:4922-07-2015
aan tesser...@googlegroups.com
Hi,

maybe the current git is broken.

at least it looks like:


$ cd tesseractsrc

$ ./autogen.sh --prefix=/home/Besitzer/tesseractbin
Running aclocal
Running libtoolize
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
libtoolize: copying file 'config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
Running autoheader
Running automake --add-missing --copy
configure.ac:65: installing 'config/missing'
api/Makefile.am: installing 'config/depcomp'
Running autoconf

All done.
To build the software now, do something like:

$ ./configure [--enable-debug] [...other options]


$ ./configure --prefix=/home/Besitzer/tesseractbin
--disable-tessdata-prefix --
disable-shared

Using git revision: 3.05.00dev-1-gffbe610
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking --enable-graphics argument... yes
checking --enable-embedded argument... no
checking --enable-opencl argument... no
checking --enable-visibility argument... no
checking --enable-multiple-libraries argument... no
checking whether to use tessdata-prefix... no
checking whether to enable debugging... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/fgrep
checking for non-GNU ld... /cygdrive/c/Programme/AMD APP/bin/x86/ld
checking if the linker (/cygdrive/c/Programme/AMD APP/bin/x86/ld) is GNU
ld... n
o
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-cygwin file names to i686-pc-cygwin
format... fu
nc_convert_file_noop
checking how to convert i686-pc-cygwin file names to toolchain format...
func_co
nvert_file_noop
checking for /cygdrive/c/Programme/AMD APP/bin/x86/ld option to reload
object fi
les... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive
import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries...
func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from object... failed
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... no
checking for objdir... .libs
checking for cc option to produce PIC... -DDLL_EXPORT -DPIC
checking if cc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if cc static flag works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/cygdrive/c/Programme/AMD
APP/bin/x86/ld) suppor
ts shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking whether the g++ linker (/cygdrive/c/Programme/AMD
APP/bin/x86/ld) suppo
rts shared libraries... no
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/cygdrive/c/Programme/AMD
APP/bin/x86/ld) suppo
rts shared libraries... no
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking if compiling with clang... no
checking whether compiler supports C++11... yes
checking for snprintf... yes
checking for library containing sem_init... none required
checking for ANSI C header files... no
configure: error: conditional "AMDEP" was never defined.
Usually this means the macro was only invoked conditionally.

Besitzer@simon ~/tesseractsrc
$ make
make: *** No targets specified and no makefile found. Stop.

Besitzer@simon ~/tesseractsrc
$ make install
make: Nothing to be done for 'install'.

Besitzer@simon ~/tesseractsrc
$ make training
make: Nothing to be done for 'training'.

Besitzer@simon ~/tesseractsrc
$ make training-install
make: *** No rule to make target 'training-install'. Stop.

Besitzer@simon ~/tesseractsrc
$

ShreeDevi Kumar

ongelezen,
22 jul 2015, 12:32:3022-07-2015
aan tesser...@googlegroups.com

https://code.google.com/p/tesseract-ocr/issues/detail?id=1288

Please see the latest comment on the above link

- sent from my phone. excuse the brevity and typos.

zdenko podobny

ongelezen,
22 jul 2015, 12:50:3322-07-2015
aan tesser...@googlegroups.com

No. That is configure.ac error. I have it today and i thought i fixed it... anyway if you try dev code  you should expect it does not work ;-)

Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten