ChristopheVersieux / tesseract-android-tools

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

Unable to build #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Windows 7: follow readme instructions to build

What is the expected output? What do you see instead?
I've followed the readme at http://code.google.com/p/tesseract-android-tools 
the best I can, and I've gotten a good start, as libjpeg is compiling. After 
that, it fails.

I get:
=============================
make: *** No rule to make target `//cygdrive/c/android-ndk/tesseract-android-too
ls-1.00/jni/com_googlecode_leptonica_android/stdio/open_memstream.c', needed by
`/cygdrive/c/android-ndk/tesseract-android-tools-1.00/obj/local/armeabi/objs/lep
t//cygdrive/c/android-ndk/tesseract-android-tools-1.00/jni/com_googlecode_lepton
ica_android/stdio/open_memstream.o'.  Stop.
=============================

What version of the product are you using? On what operating system?
I'm using the latest (1.00) on Windows 7

Please provide any additional information below.
I'm not experienced with makefiles and it's been a long time since I've used 
UNIX tools, so any help is greatly appreciated.

Original issue reported on code.google.com by waterroc...@gmail.com on 30 Mar 2011 at 2:20

GoogleCodeExporter commented 8 years ago
Update: I had a nested folder issue from the tar. I'm still getting an error, 
but I think it's related to the double-path in the error (with 
.../obj/lept//cygdrive/c in it. I don't know why it would be generating a path 
with "//" in it, in the middle of "leptonica"

Here's the latest error:

$ ndk-build
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/c/android-ndk/tesseract-android-too
ls-1.00/leptonlib-1.66/src/adaptmap.c', needed by `/cygdrive/c/android-ndk/tesse
ract-android-tools-1.00/obj/local/armeabi/objs/lept//cygdrive/c/android-ndk/tess
eract-android-tools-1.00/leptonlib-1.66/src/adaptmap.o'.  Stop.

Original comment by waterroc...@gmail.com on 30 Mar 2011 at 4:08

GoogleCodeExporter commented 8 years ago
Hi, I am also getting a similar error. Mine looks like this:

Install        : libjpeg.so => 
/home/tomas/Downloads/tesseract-android-tools-1.00/libs/armeabi
Install        : liblept.so => 
/home/tomas/Downloads/tesseract-android-tools-1.00/libs/armeabi
make: *** No rule to make target 
`//home/tomas/Downloads/tesseract-ocr/ccutil/ocrshell.cpp', needed by 
`/home/tomas/Downloads/tesseract-android-tools-1.00/obj/local/armeabi/objs/tess/
/home/tomas/Downloads/tesseract-ocr/ccutil/ocrshell.o'.  Stop.

I also get the double / in the paths.

Original comment by ttinoco5...@gmail.com on 2 Apr 2011 at 4:58

GoogleCodeExporter commented 8 years ago
Update: I found that this error was occurring because ocrshell.cpp was not a 
file in my tesseract package. This was in fact true for a lot of the files 
described in the tesseract Android.mk file. I have tesseract 3.01 and it is 
very different than tesseract 3.00. I changed the Android.mk file to reflect 
the contents of my tesseract distribution and then ndk-build run successfully.

Original comment by ttinoco5...@gmail.com on 4 Apr 2011 at 8:28

GoogleCodeExporter commented 8 years ago
Thanks for the tip there, I'll keep that in mind. Unfortunately, it's Leptonica 
1.66 that isn't building for me. There is no file list in that Android.mk, just 
a *.c wildcard to find all the source files.

Original comment by waterroc...@gmail.com on 5 Apr 2011 at 3:38

GoogleCodeExporter commented 8 years ago
Well, I got some time to set up a VBox image with Ubuntu running. I set up the 
Android SDK and NDK, tested hello-jni.

Following the README, everything builds perfectly. I can now copy the libs 
folder back to Win7, and I think I'm in good shape (Eclipse builds the project).

Now I can start learning... :)

Original comment by waterroc...@gmail.com on 10 Apr 2011 at 4:41

GoogleCodeExporter commented 8 years ago
I believe it could be windows related - potentially linked to paths as I didn't 
have success building on Windows Vista either with the same error.

I also went VBox with Ubuntu which worked fine for building it.

Original comment by leedst...@gmail.com on 1 May 2011 at 10:08

GoogleCodeExporter commented 8 years ago
I can't build Leptonica either. 

I managed to build it on a Mac but they need me to be able to do so on Windows 
using Cygwin and I'm getting lots of "undefined reference to..." messages.

I temporarily solved the "//" by using the function subst but still I'm unable 
to build it.

Does anyone have any idea? Has anyone been able to successfully build it on 
Windows?

Original comment by bamp...@gmail.com on 3 May 2011 at 8:23

GoogleCodeExporter commented 8 years ago
does anyone find a solution for windows ?

i also have this compilo error on cygwin :

$ ndk-build
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/c/android-ndk/tesseract-android-too
ls-1.00/leptonlib-1.66/src/adaptmap.c', needed by `/cygdrive/c/android-ndk/tesse
ract-android-tools-1.00/obj/local/armeabi/objs/lept//cygdrive/c/android-ndk/tess
eract-android-tools-1.00/leptonlib-1.66/src/adaptmap.o'.  Stop.

Original comment by enregist...@gmail.com on 4 May 2011 at 1:45

GoogleCodeExporter commented 8 years ago
Ndk-build, I had the same error occurs.
And I have solved this.

'sudo ndk-build'

I do not know why.
If the administrator mode, but you can.

I've tested the Mac.

Original comment by doo...@gmail.com on 11 Aug 2011 at 3:09

GoogleCodeExporter commented 8 years ago
I have the same error :
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target `//cygdrive/c/android-ndk/tesseract-android-too
ls-1.00/jni/com_googlecode_leptonica_android/stdio/open_memstream.c', needed by
`/cygdrive/c/android-ndk/tesseract-android-tools-1.00/obj/local/armeabi/objs/lep
t//cygdrive/c/android-ndk/tesseract-android-tools-1.00/jni/com_googlecode_lepton
ica_android/stdio/open_memstream.o'.  Stop.

who can share the  generated files such as  lept.so and tess.so,thanks very 
much 

Original comment by wangzhon...@gmail.com on 15 Aug 2011 at 6:33

GoogleCodeExporter commented 8 years ago
I have the same issue. can anyone tell me how to solve this isseue ?

http://stackoverflow.com/q/7334040/614807

Original comment by htc.virt...@gmail.com on 8 Sep 2011 at 10:33

GoogleCodeExporter commented 8 years ago
I am having the same issue. Has anybody got the solution. Please help me.. Its 
urgent..

Original comment by komal.g....@gmail.com on 22 Sep 2011 at 8:57

GoogleCodeExporter commented 8 years ago
I had the same problem.
but finally I solved when try again on ubuntu.

Original comment by i...@s46.net on 5 Oct 2011 at 8:07

GoogleCodeExporter commented 8 years ago
Compiling on Ubuntu worked for me as well.

Original comment by dber...@gmail.com on 5 Oct 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Hi, I did an ugly workaround, changing Android.mk files, I put my answer on 
stackoverflow:

http://stackoverflow.com/q/7334040/614807

If anyone need help, contact-me.

Original comment by ricardoc...@gmail.com on 5 Oct 2011 at 7:15

GoogleCodeExporter commented 8 years ago
Hi,
I think, I finally figured out why compilation fails:
$(call my-dir) doesn't return an absolute path, but a path relative to your 
current directory. 
You need to edit the files "jni/com_googlecode_leptonica_android/Android.mk" 
and "jni/com_googlecode_tesseract_android/Android.mk". In there change the 
first line from "REAL_LOCAL_PATH := $(call my-dir)" to "REAL_LOCAL_PATH := 
<absolute path to tesseract-android-tools>/$(call my-dir)".

If you set the variables TESSERACT_PATH, LEPTONICA_PATH and LIBJPEG_PATH in 
"jni/Android.mk", then make sure to set them to absolute paths, too (at least 
don't use $(call my-dir) to define them).

Note, that I started the ndk-build from "tesseract-android-tools"'s directory.

My environment: OS: (X)Ubuntu 11.10 and NDK: r7

Hope this helps.

P.S.: If you are using the fork tess-two (uses tesseract 3.01 and leptonica 
1.68) (https://github.com/rmtheis/tess-two) you might need to edit build.xml, 
too. Therefore just insert:

<!-- beginning of modification -->
  <path id="android.libraries.src"><path refid="project.libraries.src" /></path>
  <path id="android.libraries.jars"><path refid="project.libraries.jars" /></path>
<!-- end of modification -->

before "</project>" (see: 
http://rmtheis.wordpress.com/2011/08/06/using-tesseract-tools-for-android-to-cre
ate-a-basic-ocr-app/)

Original comment by bjoern.b...@googlemail.com on 15 Nov 2011 at 7:18

GoogleCodeExporter commented 8 years ago
When I call ndk build, it report the error such as
"
D:/jni/test/jni/com_googlecode_leptonica_android/utilities.cpp:102: undefined re
ference to `pixUnsharpMasking'
D:/jni/test/obj/local/armeabi/objs/lept/utilities.o: In function `Java_com_googl
ecode_leptonica_android_Convert_nativeConvertTo8':
D:/jni/test/jni/com_googlecode_leptonica_android/utilities.cpp:86: undefined ref
erence to `pixConvertTo8'
collect2: ld returned 1 exit status
make: *** [/cygdrive/d/jni/test/obj/local/armeabi/liblept.so] Error 1
"
I don't know what can I do for it, can somebody help me?

Original comment by Frank.Su...@gmail.com on 23 Nov 2011 at 7:59

GoogleCodeExporter commented 8 years ago
Thanks,ricardocunha
I solve the problem with the tesseract-android-tools code is revision 6 from 
svn, not the tesseract-android-tools-1.00.tar.gz from Downloads
tesseract-android-tools is revision 6 from svn.

Original comment by Frank.Su...@gmail.com on 23 Nov 2011 at 12:09

GoogleCodeExporter commented 8 years ago
hi all
@ricardocunha
i follow your solution but I get new error can you tell me how fix it

Install        : libjpeg.so => libs/armeabi/libjpeg.so
Compile++ thumb  : lept <= box.cpp
In file included from 
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:17:
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/com
mon.h:22:24: error: allheaders.h: No such file or directory
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp: In function 'jint 
Java_com_googlecode_leptonica_android_Box_nativeCreate(JNIEnv*, _jclass*, jint, 
jint, jint, jint)':
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: 'BOX' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: 'box' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: 'l_int32' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: expected ')' before 'y'
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: expected ')' before 'w'
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: expected ')' before 'h'
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:27: error: 'boxCreate' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp: In function 'void 
Java_com_googlecode_leptonica_android_Box_nativeDestroy(JNIEnv*, _jclass*, 
jint)':
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:35: error: 'BOX' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:35: error: 'box' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:35: error: expected primary-expression before ')' token
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:35: error: expected ';' before 'nativeBox'
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:37: error: 'boxDestroy' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp: In function 'jint 
Java_com_googlecode_leptonica_android_Box_nativeGetX(JNIEnv*, _jclass*, jint)':
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:43: error: 'BOX' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:43: error: 'box' was not declared in this scope
C:/android/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/box
.cpp:43: error: expected primary-expression before ')' token
............ many more error
make: *** 
[/cygdrive/c/android/tesseract-android-tools-1.00/obj/local/armeabi/objs/lept/bo
x.o] Error 1

Original comment by MunyukAu...@gmail.com on 20 Jan 2012 at 11:33

GoogleCodeExporter commented 8 years ago
I have exactly the same problem
I use leptonica 1.68 without problem (I make tests with success)
I use tesseract 3.01 without problme (I make tests with success)
So that means that libjepg, zlib and libpng are Ok

But impossible to compile tesseract-android-tools ;-(

Is it possible to get .so ?

Thanks you

Original comment by serge.un...@gmail.com on 24 Feb 2012 at 1:23

GoogleCodeExporter commented 8 years ago
On OSX, i followed bjoern's solution and it worked

http://code.google.com/p/tesseract-android-tools/issues/detail?id=4#c16

Original comment by yig...@gmail.com on 19 Mar 2012 at 4:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
when I try to build ,I get
=============================================================================
Install        : libjpeg.so => libs/armeabi/libjpeg.so
make: *** No rule to make target 
`/jni/com_googlecode_leptonica_android/stdio/open_memstream.c', needed by 
`obj/local/armeabi/objs/lept/jni/com_googlecode_leptonica_android/stdio/open_mem
stream.o'.  Stop.
=============================================================================
Can anyone please help me with the issue

Original comment by akhila...@gmail.com on 28 May 2012 at 9:38

GoogleCodeExporter commented 8 years ago
@akhila...
it seems that there is problem in mk file.
I tried to build tesseract and able to build.
I mentioned each and every steps on following blog :
http://www.navandroid.blogspot.in/2012/03/how-to-build-and-create-so-file-from.h
tml

Original comment by naveen1...@gmail.com on 28 May 2012 at 9:50

GoogleCodeExporter commented 8 years ago
I also get the following error when running ndk-build:

...
Compile thumb  : lept <= stack.c
Compile thumb  : lept <= textops.c
Compile thumb  : lept <= tiffio.c
Compile thumb  : lept <= tiffiostub.c
Compile thumb  : lept <= utils.c
Compile thumb  : lept <= viewfiles.c
Compile thumb  : lept <= warper.c
Compile thumb  : lept <= watershed.c
Compile thumb  : lept <= writefile.c
Compile thumb  : lept <= zlibmem.c
Compile thumb  : lept <= zlibmemstub.c
make: *** No rule to make target 
`/jni/com_googlecode_leptonica_android/stdio/open_memstream.c', needed by 
`obj/local/armeabi/objs/lept/jni/com_googlecode_leptonica_android/stdio/open_mem
stream.o'.  Stop.

Can anyone please help me? Many thanks !

Original comment by vdisk...@gmail.com on 1 Jun 2012 at 10:20

GoogleCodeExporter commented 8 years ago
Don't have the resources to support cygwin.

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