farhan678 / tesseract-android-tools

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

The android.git.kernel.org is down. How can we build the tesseract 3.0? #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow the README
2. the "git clone git://android.git.kernel.org/platform/external/jpeg.git 
libjpeg" command fails. 
3. User can't build the tesseract.

Original issue reported on code.google.com by man_...@yahoo.com on 10 Sep 2011 at 4:15

GoogleCodeExporter commented 9 years ago
Temporarily I use

http://code.google.com/p/androido3d/source/browse/android/apps/o3d/project/jni/t
hird_party/libjpeg/?r=6bc15cab44a5f9c13b193bc7397b6ad5eef8397c

code and the Android.mk

Original comment by man_...@yahoo.com on 11 Sep 2011 at 1:09

GoogleCodeExporter commented 9 years ago
you can use the mirror 

https://github.com/android/platform_external_jpeg

Original comment by man...@gmail.com on 14 Sep 2011 at 12:01

GoogleCodeExporter commented 9 years ago
The code and Android.mk from mirror 
site:https://github.com/android/platform_external_jpeg cannot work.

I got the error message from the ndk-build as below:

"C:/OCR/tesseract-android-tools-1.00/external/libjpeg/jmem-ashmem.c:22:27: 
error:
 cutils/ashmem.h: No such file or directory
make: *** [/cygdrive/c/OCR/tesseract-android-tools-1.00/obj/local/armeabi/objs/j
peg/jmem-ashmem.o] Error 1 "

It seems looking for the "cutils/ashmem.h" file, but this file is not included 
in the  files downloaded from mirror site.

Anyone know how to solve this problem?

Original comment by ChunHsia...@gmail.com on 14 Sep 2011 at 3:46

GoogleCodeExporter commented 9 years ago
# libjpeg/Android.mk for tessaract build change 
# comment use of jmem-ashmem.c  
# uncomment use of jmem-android.c

# use ashmem as libjpeg decoder's backing store
#LOCAL_CFLAGS += -DUSE_ANDROID_ASHMEM
#LOCAL_SRC_FILES += \
#   jmem-ashmem.c

# the original android memory manager.
# use sdcard as libjpeg decoder's backing store
LOCAL_SRC_FILES += \
    jmem-android.c

Original comment by dragosla...@gmail.com on 15 Sep 2011 at 7:36

GoogleCodeExporter commented 9 years ago
THx dragoslav.mlakar

but now I got another problem:
"Compile arm    : jpeg <= jmem-android.c
SharedLibrary  : libjpeg.so
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/c/OCR/tesseract-android-tools-1.00/
external/leptonlib-1.66/src/adaptmap.c', needed by `/cygdrive/c/OCR/tesseract-an
droid-tools-1.00/obj/local/armeabi/objs/lept//cygdrive/c/OCR/tesseract-android-t
ools-1.00/external/leptonlib-1.66/src/adaptmap.o'.  Stop."

I run cygwin on my windows 7, it seems the path problem with "//".....don't 
know how to fix it yet.

Any ideas?

Original comment by ChunHsia...@gmail.com on 16 Sep 2011 at 2:40

GoogleCodeExporter commented 9 years ago
copy the files in jni/com_googlecode_leptonica_android external/  to 
external/leptonlib-1.66 folder, inside leptonlib-1.66 run ./configure, wait for 
it and type make, this will take some time.

Original comment by rafaell...@gmail.com on 16 Oct 2011 at 10:04

GoogleCodeExporter commented 9 years ago
rafaell,
I have the same problem as ChunHsia, and tried your fix, with the same results. 
I copied the files and ran .configure and make; here's the output from the 
*second* time I tried it:

detl2v@A5022839 /cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66
$ make
gcc -o endiantest endiantest.c; export ENDIANNESS=-D`./endiantest`; make -f 
Makefile  all-recursive
make[1]: Entering directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66'
Making all in src
make[2]: Entering directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66/src'
make[3]: Entering directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66/src'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66/src'
make[2]: Leaving directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66/src'
make[2]: Entering directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66'
make[2]: Leaving directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66'
make[1]: Leaving directory 
`/cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66'

detl2v@A5022839 /cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66
$ cd ..

detl2v@A5022839 /cygdrive/d/proj/tesseract-tools/external
$ cd ..

detl2v@A5022839 /cygdrive/d/proj/tesseract-tools
$ ndk-build
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target 
`//cygdrive/d/proj/tesseract-tools/external/leptonlib-1.66/src/adaptmap.c', need
ed by 
`/cygdrive/d/proj/tesseract-tools/obj/local/armeabi/objs/lept//cygdrive/d/proj/t
esseract-tools/exter
nal/leptonlib-1.66/src/adaptmap.o'.  Stop.

Ideas?
 /rob

Original comment by RobCranf...@gmail.com on 21 Oct 2011 at 6:16

GoogleCodeExporter commented 9 years ago
See my answer on issue 4, using windows with cygwin or mac, ndk has a little 
problem to compile, try to use a linux distribuition, or change Android.mk 
files for windows or mac, I can send my modified mk files if you need.

Original comment by ricardoc...@gmail.com on 21 Oct 2011 at 6:43

GoogleCodeExporter commented 9 years ago
Yes, alright, it feels like I'm giving in, but indeed, I used my OpenSuSE 11.3 
virtual machine and the Tesseract tools compiled with no problem! Since I'm not 
going to be doing any mods to Tesseract (I hope!) I guess that's an OK solution 
for me - I won't have to go back and forth between systems too often (since I 
still can't get 'shared folders' for work for me under VMWare Player I have to 
move files with a USB stick!).

Thanks!
 /rob

Original comment by RobCranf...@gmail.com on 25 Oct 2011 at 3:08

GoogleCodeExporter commented 9 years ago
Hi,

I tried using the version from the github mirror (
https://github.com/android/platform_external_jpeg) and it is failing to compile 
for me.

I did go ahead and change the Android.mk file to use jmem-android.c.

Here is what the log says as it is failing and a little before:

Compile arm    : jpeg <= jidctred.c
Compile arm    : jpeg <= jquant1.c
Compile arm    : jpeg <= jquant2.c
Compile arm    : jpeg <= jutils.c
Compile arm    : jpeg <= jmemmgr.c
Compile arm    : jpeg <= armv6_idct.S
SharedLibrary  : libjpeg.so
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `alloc_small':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:299: undefined reference to `jpeg_get_small'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:299: undefined reference to `jpeg_get_small'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `jinit_memory_mgr':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:1056: undefined reference to `jpeg_mem_init'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:1059: undefined reference to `jpeg_get_small'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:1062: undefined reference to `jpeg_mem_term'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `free_pool':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:975: undefined reference to `jpeg_free_large'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:989: undefined reference to `jpeg_free_small'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `self_destruct':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:1015: undefined reference to `jpeg_free_small'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:1018: undefined reference to `jpeg_mem_term'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `alloc_large':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:362: undefined reference to `jpeg_get_large'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/obj/local/armeabi/obj
s/jpeg/jmemmgr.o: In function `realize_virt_arrays':
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:619: undefined reference to `jpeg_mem_available'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:672: undefined reference to `jpeg_open_backing_store'
/home/mrbobvilla/Dropbox/Workspace/tesseract-android-tools/jni/../external/libjp
eg/jmemmgr.c:648: undefined reference to `jpeg_open_backing_store'
collect2: ld returned 1 exit status

Does anyone have any idea what the issue is? Months ago I tried compiling when 
android.git.kernel.org was not down and everything went well for me then. I 
tried a clean install now which is appearing to have been a mistake. :) By the 
way I am compiling on an Ubuntu VM. 

Original comment by mrbobvi...@gmail.com on 1 Dec 2011 at 10:07

GoogleCodeExporter commented 9 years ago
Removed libjpeg.

Original comment by alanv@google.com on 11 Sep 2012 at 8:09