I am trying to compile Tesseract so I can run it on IBMi 7.3 (AS400, iSeries, System/i) which has a Power PC architecture. I haven't done any C compiling with makefiles for decades so I found and am following these instruction (with thanks) and am compiling Leptonica (1.80) as a prerequisite. After some problem solving I have managed to do ./configure
which seemed to work okay. Then I tried make
which didn't but I read somewhere to try gmake
which does quite a lot but it produces errors:
CC webpanimiostub.lo
CC writefile.lo
CC zlibmem.lo
CC zlibmemstub.lo
CCLD liblept.la
ar: 0707-126 adaptmap.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 affine.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
ar: 0707-126 affinecompose.o is not valid with the current object file mode.
So I'm wondering if I should worry about those messages (there are well over 100 of them)?
After all those it says:
ar: 0707-126 zlibmemstub.o is not valid with the current object file mode.
Use the -X option to specify the desired object mode.
gmake[2]: *** [Makefile:545: liblept.la] Error 179
gmake[2]: Leaving directory '/home/mydir/leptonica-1.80.0/src'
gmake[1]: *** [Makefile:522: all-recursive] Error 1
gmake[1]: Leaving directory '/home/mydir/leptonica-1.80.0'
gmake: *** [Makefile:406: all] Error 2
Lines 544 and 545 of src/Makefile say:
liblept.la: $(liblept_la_OBJECTS) $(liblept_la_DEPENDENCIES) $(EXTRA_liblept_la_DEPENDENCIES)
$(AM_V_CCLD)$(liblept_la_LINK) -rpath $(libdir) $(liblept_la_OBJECTS) $(liblept_la_LIBADD) $(LIBS)
I have trawled the net in vain to find any clues so any help much appreciated, Mark.
Looking at https://github.com/openssl/openssl/issues/5659#issuecomment-375022992 and Compiling pcre 8.32 on AIX 6.1 64 bit for AIX, it looks like you might need to specify OBJECT_MODE=64
and AR="ar -X64"
.