AmitGorvadiya / tesseract-ocr

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

Cross compiling for ARM problem with ld in /ccmain/Makefile #262

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run configure with the host and target set as arm-linux and CC and CXX
pointing to the correct gcc and g++ cross-compile binaries.
2. Run make

What is the expected output? What do you see instead?
Expected output = successful build
Actual output = error on ld -r -o libtesseract_full.o tesseractfull.o \...

What version of the product are you using? On what operating system?
Tesseract 2.04 - Ubuntu 9.10

Please provide any additional information below.
Adding a variable that changes the ld path from just simply ld to set
/path/to/cross-compile-ld would solve the problem.  As it stands, one needs
to manually edit the ccmain/Makefile line 718 or thereabouts and change ld
to /path/to/cross-compile-ld.

Original issue reported on code.google.com by ben.hay...@gmail.com on 12 Nov 2009 at 10:26

GoogleCodeExporter commented 9 years ago
There must be some way of fixing this.
The aim is to build a static library: listesseract_api.a that has everything in 
it
except tesseractmain.o, so you can link to it to use tesseract.
The only way I found to do it was:
ld -r -o libtesseract_api.o baseapi.o ... lots of tesseract libraries
ar cru libtesseract_api.a libtesseract_api.o
ranlib libtesseract_api.a
This doesn't work if ld is invoked using $(CC) or $(CXX) -Xlinker -r, as it 
tries to
link in the start module and produce a valid executable.
There is no $(LD), so what to do?

Any comments from autoconf/cgg command-line experts welcome.

Original comment by theraysm...@gmail.com on 20 May 2010 at 5:40

GoogleCodeExporter commented 9 years ago
I added libtool support today, which may make this a little easier; it's been a 
while 
since I cross-compiled anything, but AFAIR just using libtool is usually enough.

Original comment by joregan on 26 May 2010 at 11:25

GoogleCodeExporter commented 9 years ago
If libtool support did not fixed this, please create new issue against current 
code

Original comment by zde...@gmail.com on 21 Jul 2012 at 4:42