Closed GoogleCodeExporter closed 9 years ago
It's a shame this wasn't merged in at the time. I'm trying to get Tesjeract
(Java
JNI bindings) working for Linux and it's going well but having to link
statically is
proving problematic. That aside, shared libraries and autotools is just a good
idea
in general. I've attempted to apply and fix up the patch but it's not much fun
and
I'm not an autotools expert. I'd appreciate it if someone with better knowledge
could have a go and, more importantly, if any such work could be merged before
the
3.00 release.
Original comment by JerseyChewi@gmail.com
on 8 Nov 2009 at 10:48
I couldn't quite get my head around the patch so I decided to just take the
stuff
from SVN and work the rest out myself. It builds fine under Linux but I wanted
to do
better than only targeting one OS so I gave it a try in Cygwin. Although the
static
libraries built on the first attempt, the shared ones required more work
because
Windows cannot have any unresolved symbols in its DLLs. I had to use the -no-
undefined flag in order to get it to create any shared libraries at all but
eventually, I hit a wall.
There is a cyclic dependency between ccmain and textord. These therefore cannot
be
built as shared libraries on Windows. I think someone with a better
understanding of
tesseract should resolve this. This wasn't a problem for the previous patch
because
the cyclic dependency didn't exist then.
I didn't include any stuff for libtesseract_full because it appears that this
had
already been removed. I'm not sure what the plan is here.
I didn't cater for leptonlib either since I don't know anything about it. I
gather
this will be the last release of tesseract that has it as an optional
dependency so
I'd rather tackle it when it's mandatory.
I doubt this stuff will work for VC++ but that's what the vcproj files are for,
right? I have no experience with VC++ so I can't test it. I'm not particularly
bothered about Windows in general but it would be nice for it to work in Cygwin
so
some help with the cyclic dependency issue would be appreciated.
I kept the EXTRA_DIST lines as they were since it makes no difference to the
build.
Do we really want those vcproj files in there though? Maybe if VC++ works, I
guess.
Rather than create one big confusing patch, I thought it would be easier to
send
this up as a tarball with some instructions.
1) Delete the old autotools files.
# find \( -name "Makefile*" -o -name "configure*" \) -delete
# rm -r *.m4 config
2) For some reason, the callcpp.cpp file and callcpp.h files were in different
libraries. libtool wasn't too happy about this. Surely it makes more sense to
keep
them together?
# mv ccstruct/callcpp.cpp cutil/callcpp.cpp
3) The standard name for the autotools config file is config.h so it's probably
best
to stick to this.
# sed -i "s/config_auto\.h/config.h/g" */*.cpp */*.h
4) Unpack the tarball.
# tar zxf tesseract-autotools.tar.gz
4) Do the autotools magic.
# libtoolize -c
# aclocal
# automake -a -c
# autoconf
I realise that the repository hasn't been touched since August so it looks as
though
development may have stalled. Still, I've put a lot of time into this and you'd
be
doing both the distribution packagers and the application developers a big
favour if
you could take a look. Thanks. :)
Original comment by JerseyChewi@gmail.com
on 20 Nov 2009 at 9:45
Missed some files by mistake.
Original comment by JerseyChewi@gmail.com
on 29 Nov 2009 at 4:46
Attachments:
I just couldn't get the latest SVN to work with Tesjeract and after much
digging and
banging my head against the wall, I threw in the towel and dropped back to
2.04.
I've given it the same treatment. The original patch used libtool convenience
libraries and thus only the installed "full" and "training" libraries. I didn't
feel
that this was the way to go since all of the libraries were installed before. I
couldn't get it to properly link "full" any other way though so I just dropped
it.
This still doesn't work in Cygwin, again because of the cyclic dependency. I
guess
using convenience libraries sidesteps the problem. A patch was needed to undo
another cyclic dependency regarding CertaintyScale. That is included.
Original comment by JerseyChewi@gmail.com
on 19 Dec 2009 at 5:37
Attachments:
Original comment by joregan
on 30 Sep 2010 at 12:47
Original issue reported on code.google.com by
davs...@gmail.com
on 28 Nov 2008 at 8:17