Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 498842

Summary: app-text/tesseract-3.02-r1 uses wrong path for media-libs/leptonica headers
Product: Gentoo Linux Reporter: sean dreilinger <sean-gentoo>
Component: Current packagesAssignee: Thomas Kahle (RETIRED) <tomka>
Status: RESOLVED NEEDINFO    
Severity: normal CC: chutzpah, proxy-maint, sean-gentoo, themgt, tomka
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: fix leptonica include path

Description sean dreilinger 2014-01-21 20:43:58 UTC
tesseract-3.02-r1 fails to compile when it depends on media-libs/leptonica.

the tesseract build process can't locate necessary header files from the media-libs/leptonica package.

i'm attaching a patch which modifies LIBLEPT_HEADERSDIR and resolves the issue on my system.

Reproducible: Always

Steps to Reproduce:
1. emerge =media-libs/leptonica-1.69
2. echo "app-text/tesseract jpeg png tiff" >> /etc/portage/package.use
3. emerge =tesseract-3.02-r1
4. observe failure
Actual Results:  
emerge dies with:

libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/classify -I.. -O3 -DNDEBUG -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/cutil -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/ccutil -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/ccstruct -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/dict -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/image -I/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/viewer -I/usr/local/include/liblept -I/usr/include/leptonica -O2 -march=core2 -pipe -fomit-frame-pointer -c /var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/classify/xform2d.cpp  -fPIC -DPIC -o .libs/xform2d.o
/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/classify/trainingsampleset.cpp: In member function ‘void tesseract::TrainingSampleSet::DeleteOutliers(const tesseract::IntFeatureSpace&, bool)’:
/var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/classify/trainingsampleset.cpp:559:68: error: too many arguments to function ‘PIX* pixaDisplayTiledInRows(PIXA*, l_int32, l_int32, l_int32)’
In file included from /usr/local/include/liblept/allheaders.h:26:0,
                 from /var/tmp/portage/app-text/tesseract-3.02-r1/work/tesseract-3.02.02/classify/trainingsampleset.cpp:17:
/usr/local/include/liblept/leptprotos.h:1075:15: note: declared here
Makefile:431: recipe for target 'trainingsampleset.lo' failed
make[2]: *** [trainingsampleset.lo] Error 1
Makefile:365: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:272: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: app-text/tesseract-3.02-r1::gentoo failed (compile phase):
 *   emake failed


Expected Results:  

>>> Installing (1 of 1) app-text/tesseract-3.02-r1
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

a patch to adjust LIBLEPT_HEADERSDIR resolves this issue in my environment. please consider adding it to the public app-text/tesseract ebuild if solves the same issue for others.
Comment 1 sean dreilinger 2014-01-21 20:45:25 UTC
Created attachment 368384 [details, diff]
fix leptonica include path
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2014-05-13 14:31:53 UTC
I can't reproduce this.  Can you please try again with the new version 3.03_r1?