pb install on redhat PKG_CHECK_MODULES(LEPTONICA

312 views
Skip to first unread message

Jean-Christophe Penalva

unread,
Apr 25, 2017, 4:44:55 AM4/25/17
to tesseract-ocr
  Hello,

  i try to compile the new version of Tesseract (v4.0x) on a redhat from source. I've already compile and install the libleptonica, and now i've a pb during the configure stage of tesseract :

export CFLAGS=-I...../leptonica/1.74.1/include
export CPPFLAGS=-I......../leptonica/1.74.1/include
export LDFLAGS=-L......./leptonica/1.74.1/lib

./configure --prefix=......./tesseract/4.0 --with-extra-includes=......./leptonica/1.74.1/include --with-extra-libraries=......../leptonica/1.74.1/lib
...
....
checking for long long int... yes
checking for off_t... yes
checking for mbstate_t... yes
./configure: line 16347: syntax error near unexpected token `LEPTONICA,'
./configure: line 16347: `PKG_CHECK_MODULES(LEPTONICA, lept >= 1.74, have_lept=true, have_lept=false)'

I search for a this message ... but nothing. Is it possible to install tesseract from sources (and from sources of leptonica too) ?

ShreeDevi Kumar

unread,
Apr 25, 2017, 7:56:29 AM4/25/17
to tesser...@googlegroups.com
I built both from source yesterday.

Try the following for building tesseract


/autogen.sh
./configure
LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make
sudo make install
sudo ldconfig
As given in compiling page on wiki
- excuse the brevity, sent from mobile

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/041d7e95-7af2-4faa-80c7-2844c587b6ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Christophe Penalva

unread,
Apr 25, 2017, 8:16:37 AM4/25/17
to tesseract-ocr
  Hello,

  i've read the doc, but this does'nt work for me.

  after the autogen.sh i have the error on leptonica.

  Any idea ?
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

Zdenko Podobný

unread,
Apr 25, 2017, 1:16:55 PM4/25/17
to tesser...@googlegroups.com
It seems like problem with pkg-config. Do you have it installed?

Zdenko

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Jean-Christophe Penalva

unread,
Apr 25, 2017, 4:51:04 PM4/25/17
to tesseract-ocr
pkgconfig-0.23-9.1.el6.x86_64

Zdenko

Jean-Christophe Penalva

unread,
Apr 25, 2017, 4:59:55 PM4/25/17
to tesseract-ocr
  and in the lib directory of the installed libleptonica, there are these files :
-rw-r--r-- 1  15994844 Apr 25 10:03 liblept.a
-rwxr-xr-x 1       999 Apr 25 10:03 liblept.la
lrwxrwxrwx 1        16 Apr 25 10:03 liblept.so -> liblept.so.5.0.1
lrwxrwxrwx 1        16 Apr 25 10:03 liblept.so.5 -> liblept.so.5.0.1
-rwxr-xr-x 1   9533600 Apr 25 10:03 liblept.so.5.0.1
drwxrwxr-x 2      4096 Apr 25 10:03 pkgconfig

Zdenko Podobný

unread,
Apr 26, 2017, 9:26:39 AM4/26/17
to tesser...@googlegroups.com
IMHO you need to set PKG_CONFIG_PATH to your custom location of leptonica, so pkg-config is able to find lept.pc.

Zdenko

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Jean-Christophe Penalva

unread,
Apr 26, 2017, 10:57:46 AM4/26/17
to tesseract-ocr
  i've already the PKG_CONFIG_PATH ok !!

env | grep PKG
PKG_CONFIG_PATH=/...../leptonica/1.74.1/lib/pkgconfig

and pkg-config is running well :
pkg-config --cflags --libs lept
-I/....../leptonica/1.74.1/include/leptonica  -L/...../leptonica/1.74.1/lib -llept

Zdenko

Jean-Christophe Penalva

unread,
May 2, 2017, 5:03:34 PM5/2/17
to tesseract-ocr
  Finally, i use the cmake.

  mkdir build
  cd build
  ccmake ..
  make

  And no more problems ! 

Azen7

unread,
Jul 18, 2017, 1:47:50 AM7/18/17
to tesseract-ocr
I just building tesseract4.0 in CentOS5.5  and with solved a lot of problem ....final i run ./configure   and  have the same problem like you ...

checking for off_t... yes
checking for mbstate_t... yes
./configure: line 17743: syntax error near unexpected token `LEPTONICA,'
./configure: line 17743: `PKG_CHECK_MODULES(LEPTONICA, lept >= 1.74, have_lept=true, have_lept=false)'


and i check the things like you....
[root@marineap tesseract-ocr]# pkg-config --cflags --libs lept
-I/usr/local/include/leptonica  -L/usr/local/lib -llept  

[root@marineap build]# echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig::/my/additional/config:/usr/local/lib/pkgconfig/

it's all contain lept

could you tell me ..Tell me how you installed it in detail...
i have spent a lot of time in it...it make me feel a liitle bad...

在 2017年5月3日星期三 UTC+8上午5:03:34,Jean-Christophe Penalva写道:
Reply all
Reply to author
Forward
0 new messages