New issue 122 by davshao: OCRopus does not use libtool libraries, using
libtool can build shared libraries on all common platforms including Cygwin
http://code.google.com/p/ocropus/issues/detail?id=122
What steps will reproduce the problem?
1. Run the ./configure script
2.
3.
What is the expected output? What do you see instead?
Only produces static libraries ending in .a
What version of the product are you using? On what operating system?
OCRopus subversion revision 1305 on Mac OS X, Ubuntu 8.10, and Cygwin on
Windows XP.
Please provide any additional information below.
I have completed patches to all of OpenFst (20080422), leptlib-1.58,
tesseract subversion revision 201, iulib subversion revision 116, and
OCRopus subversion 1305 that allow the building of shared libs (Cygwin
.dlls on Windows XP) using libtool. These are currently under the date
20081124 in the files area. All patches are applied as follows: Say
OCRopus has directory ocropus whose parent directory is for example bbuild.
Place patches in bbuild. Suppose one wishes to install in home
subdirectory busr. Note that the ./configure line including the CPPFLAGS
and LDFLAGS is all on one line, and one might need to add additional
directories on platforms such as Mac OS X using Macports where /opt/local
is the base for installed external packages.
cd ocropus
patch -p1 < ../toautotools_ocropus_1305_20081124.diff
autoreconf --install --force
./configure --prefix=$HOME/busr CPPFLAGS=-I$HOME/busr/include
LDFLAGS=-L$HOME/busr/lib
make
make install
The patches are unusually large because Cygwin does not seem to like old
Makefile.in's from previous developer builds, sometimes downgrading
automake's version to the version used in Makefile.in. At one point I also
had to install libiconv and/or iconv on Cygwin, but that might have been a
false dependency on aspell. I also included all of the patches mentioned
in a previous bug report to fix the paths so that simply setting CPPFLAGS
and LDFLAGS right allows a user to compile OCRopus without worrying about
the other packages.
Enabling shared libs on Cygwin is relatively simple. There is a
AC_LIBTOOL_WIN32_DLL
in configure.ac along with the usual following for all platforms
AC_PROG_LIBTOOL
On all platforms, libraries are declared using in the Makefile.am files
for automake
LTLIBRARIES instead of LIBRARIES
For installed LTLIBRARIES, but not libtool convenience libraries, on Cygwin
pass to LDFLAGS -no-undefined
Curiously on Cygwin the shared library .dlls appear in the form
cyg*-0.dll
in $HOME/busr/bin
perhaps because .dlls should be on the PATH and one would presumably add
$HOME/busr/bin to the PATH to use any of the executables.
Attachments:
toautotools_iulib_116_20081124.diff 99 KB
toautotools_ocropus_1305_20081124.diff 406 KB
toautotools_tesseract-ocr_201_20081124.diff 58.9 KB
toautotools_leptonlib_1.58_20081124.diff 42.1 KB
toautotools_openfst_20080422_20081124.diff 18.1 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 122 by tmbdev: OCRopus does not use libtool libraries,
using libtool can build shared libraries on all common platforms including
Cygwin
http://code.google.com/p/ocropus/issues/detail?id=122
Thanks for the report; we will review and try to get this into 0.4 if there
are no
problems with it.
Comment #2 on issue 122 by tmbdev: OCRopus does not use libtool libraries,
using libtool can build shared libraries on all common platforms including
Cygwin
http://code.google.com/p/ocropus/issues/detail?id=122
(No comment was entered for this change.)
Comment #3 on issue 122 by christian.kofler: OCRopus does not use libtool