Issue 120 in ocropus: OCRopus should not redefine user variables. All includes should be fixed to have right path

1 view
Skip to first unread message

codesite...@google.com

unread,
Nov 21, 2008, 4:03:14 PM11/21/08
to ocropus...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 120 by davshao: OCRopus should not redefine user variables. All
includes should be fixed to have right path
http://code.google.com/p/ocropus/issues/detail?id=120

What steps will reproduce the problem?
1. Running ./configure

What is the expected output? What do you see instead?
Setting user variable CPPFLAGS to the base directories where include
headers are located (directories with include as a subdirectory) does not
allow these headers to be found, and setting user variable LDLFAGS to the
base directories where libraries are to be found (directories with lib as a
subdirectory) does not allow these libraries to be found when running the
configure script. OCRopus configure script, from configure.ac, redefines
user variable LDFLAGS.

What version of the product are you using? On what operating system?
OCRopus subversion revision 1305 and before on Mac OS X 10.5 and Cygwin
under Windows XP.

Please provide any additional information below.

According to the GNU automake manual, see for example,
http://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering
one is not supposed to redefine in a configure script user variables such
as LDFLAGS. A user setting CPPFLAGS for headers and LDFLAGS for libs
should just have things work.

The current includes for iulib violate iulib's API as documented at
http://code.google.com/p/iulib/

The includes should be of the form
#include <iulib/imgio.h>
#include <iulib/imglib>
#include <colib/colib.h>

Similar considerations hold for leptonlib whose headers should be included
by
#include <liblept/allheaders>
and for tesseract.

Attached is a patch file that will correct all of the includes in OCRopus
as of subversion revision 1305. The configure.ac script should also be
corrected so that headers are detected using their correct locations. I
will also place this patch in the files section for OCRopus, name
toautotools_path_ocropus_1305_20081121.diff
for now.


Attachments:
toautotools_path_ocropus_1305_20081121.diff 83.4 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

codesite...@google.com

unread,
Nov 21, 2008, 4:08:16 PM11/21/08
to ocropus...@googlegroups.com

Comment #1 on issue 120 by davshao: OCRopus should not redefine user
variables. All includes should be fixed to have right path
http://code.google.com/p/ocropus/issues/detail?id=120

The include path for leptonlib should be
#include <liblept/allheaders.h>
and the configure.ac check should be of the form
AC_CHECK_HEADER([liblept/allheaders.h],,AC_SUBST(nolept,1))
Similarly
AC_CHECK_HEADER([iulib/imgio.h],,
AC_MSG_ERROR([no iulib/imgio.h; please install iulib]))
AC_CHECK_HEADER([tesseract/baseapi.h],,AC_SUBST(notesseract,1))

codesite...@google.com

unread,
Jan 12, 2009, 11:21:43 PM1/12/09
to ocropus...@googlegroups.com
Updates:
Status: Started
Owner: christian.kofler

Comment #2 on issue 120 by tmbdev: OCRopus should not redefine user

variables. All includes should be fixed to have right path
http://code.google.com/p/ocropus/issues/detail?id=120

We're looking into cleaning this up.

codesite...@google.com

unread,
Mar 11, 2009, 7:00:49 AM3/11/09
to ocropus...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Install Milestone-Beta

Comment #3 on issue 120 by christian.kofler: OCRopus should not redefine

user variables. All includes should be fixed to have right path
http://code.google.com/p/ocropus/issues/detail?id=120

(No comment was entered for this change.)

codesite...@google.com

unread,
Jun 14, 2009, 9:24:18 AM6/14/09
to ocropus...@googlegroups.com
Updates:
Labels: FixPatch

Comment #4 on issue 120 by tmb...@gmail.com: OCRopus should not redefine

Reply all
Reply to author
Forward
0 new messages