Hi,
I'm trying to build ocropus with leptonica (I've previously built it OK, but
only using --without-leptonica amongst other options).
I have downloaded leptonica-1.58 and successfully built it, with the install
in /usr/local/
However the ocropus configure check doesn't find leptonica. I see
checking /usr/local/include/leptonica/allheaders.h usability... no
checking /usr/local/include/leptonica/allheaders.h presence... no
checking for /usr/local/include/leptonica/allheaders.h... no
checking /usr/local/include/liblept/allheaders.h usability... yes
checking /usr/local/include/liblept/allheaders.h presence... no
configure: WARNING: /usr/local/include/liblept/allheaders.h: accepted by the
compiler, rejected by the preprocessor!
configure: WARNING: /usr/local/include/liblept/allheaders.h: proceeding with
the compiler's result
checking for /usr/local/include/liblept/allheaders.h... yes
checking for pixCreate in -llept... no
configure: error: leptonica not found! Choose --without-leptonica if you don't
want to use it.
Looking more closely at the config.log, I see:
configure:7143: checking for pixCreate in -llept
configure:7178: g++ -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib
-L/usr/local/include/liblept/../../lib conftest.cpp -llept -ltesseract_full
-lpthread -liulib -ltiff -ljpeg -lpng -lz >&5
/usr/local/lib/liblept.a(gifio.o): In function `pixWriteStreamGif':
gifio.c:(.text+0x1c9): undefined reference to `MakeMapObject'
gifio.c:(.text+0x279): undefined reference to `EGifOpenFileHandle'
gifio.c:(.text+0x2b6): undefined reference to `EGifPutScreenDesc'
gifio.c:(.text+0x2d1): undefined reference to `FreeMapObject'
gifio.c:(.text+0x2d9): undefined reference to `EGifCloseFile'
gifio.c:(.text+0x33e): undefined reference to `FreeMapObject'
gifio.c:(.text+0x3e4): undefined reference to `FreeMapObject'
gifio.c:(.text+0x404): undefined reference to `EGifPutImageDesc'
gifio.c:(.text+0x41b): undefined reference to `EGifCloseFile'
gifio.c:(.text+0x52f): undefined reference to `EGifPutLine'
gifio.c:(.text+0x564): undefined reference to `EGifCloseFile'
gifio.c:(.text+0x5be): undefined reference to `FreeMapObject'
gifio.c:(.text+0x61c): undefined reference to `EGifCloseFile'
gifio.c:(.text+0x64b): undefined reference to `EGifCloseFile'
gifio.c:(.text+0x67a): undefined reference to `EGifCloseFile'
/usr/local/lib/liblept.a(gifio.o): In function `pixReadStreamGif':
gifio.c:(.text+0x6cb): undefined reference to `DGifOpenFileHandle'
gifio.c:(.text+0x6df): undefined reference to `DGifSlurp'
gifio.c:(.text+0x878): undefined reference to `DGifCloseFile'
gifio.c:(.text+0x884): undefined reference to `DGifCloseFile'
gifio.c:(.text+0x9d4): undefined reference to `DGifCloseFile'
gifio.c:(.text+0xa06): undefined reference to `DGifCloseFile'
gifio.c:(.text+0xa34): undefined reference to `DGifCloseFile'
/usr/local/lib/liblept.a(gifio.o):gifio.c:(.text+0xa63): more undefined
references to `DGifCloseFile' follow
collect2: ld returned 1 exit status
I'm guessing that is caused by leptonica linking against a GIF
library, which isn't also being linked by the ocropus configure
check.
As a hack, I used this:
--- configure.ac (revision 1305)
+++ configure.ac (working copy)
@@ -115,6 +115,9 @@
AC_CHECK_LIB(tiff, TIFFOpen,,
AC_MSG_ERROR([no TIFFOpen; please install libtiff4-dev or equivalent]))
+# --- libgif (optional) ---
+AC_CHECK_LIB(gif, DGifCloseFile,,)
+
AC_LANG_CPLUSPLUS
# --- iulib (required) ---
(I am seeing some failures with "make check" but they don't seem to
vary when I enable leptonica, so probably unrelated).
The check is a bit ugly - it would probably be cleaner to do something
like test if leptonica will work without GIF, then try adding -lgif if we
actually need it. But I'm no longer very comfortable with autoconf
(switched to cmake, recommended) so that is probably beyond me
to get right.
Thoughts? Suggestions?
Brad
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---