Hi, I've been working on getting ocropus and gscan2pdf to install on my Gentoo system. One thing I discovered along the way is a weird build error during the compilation phase of app-text/tesseract-2.04-r1. It seems to happen when media-libs/leptonica (a.k.a. dev-libs/leptonlib) is installed; see layman overlays ext-devlibs, seden, sunrise for these packages. Please also see https://bugs.gentoo.org/show_bug.cgi?id=185810#c65 . When leptonica is installed (as far back as media-libs/leptonica-1.62) compilation of tesseract-2.04-r1 fails like so: ======== leptonica_pageseg.cpp: In static member function 'static bool LeptonicaPageSeg::GetHalftoneMask(Pix*, Pix**, Boxa**, Pixa**, bool)': leptonica_pageseg.cpp:69: error: 'int32' was not declared in this scope leptonica_pageseg.cpp:69: error: expected ';' before 'debug' leptonica_pageseg.cpp:73: error: 'debug' was not declared in this scope leptonica_pageseg.cpp: In static member function 'static bool LeptonicaPageSeg::GetTextlineMask(Pix*, Pix**, Pix**, Boxa**, Pixa**, bool)': leptonica_pageseg.cpp:139: error: 'int32' was not declared in this scope leptonica_pageseg.cpp:139: error: expected ';' before 'debug' leptonica_pageseg.cpp:143: error: 'debug' was not declared in this scope leptonica_pageseg.cpp: In static member function 'static bool LeptonicaPageSeg::GetTextblockMask(Pix*, Pix**, Boxa**, Pixa**, bool)': leptonica_pageseg.cpp:211: error: 'int32' was not declared in this scope leptonica_pageseg.cpp:211: error: expected ';' before 'debug' leptonica_pageseg.cpp:220: error: 'debug' was not declared in this scope leptonica_pageseg.cpp: In static member function 'static bool LeptonicaPageSeg::GetAllRegions(Pix*, Pix**, Pix**, Pix**, bool)': leptonica_pageseg.cpp:273: error: 'int32' was not declared in this scope leptonica_pageseg.cpp:273: error: expected ';' before 'w' leptonica_pageseg.cpp:274: error: 'w' was not declared in this scope leptonica_pageseg.cpp:274: error: 'h' was not declared in this scope leptonica_pageseg.cpp:275: error: expected ';' before 'debug' leptonica_pageseg.cpp:288: error: 'debug' was not declared in this scope leptonica_pageseg.cpp:293: error: 'debug' was not declared in this scope leptonica_pageseg.cpp:298: error: 'debug' was not declared in this scope leptonica_pageseg.cpp:302: error: 'debug' was not declared in this scope leptonica_pageseg.cpp:311: error: 'debug' was not declared in this scope leptonica_pageseg.cpp:320: error: 'debug' was not declared in this scope /usr/include/liblept/leptprotos.h:553: error: too few arguments to function 'PIX* pixRenderRandomCmapPtaa(PIX*, PTAA*, l_int32, l_int32, l_int32)' leptonica_pageseg.cpp:322: error: at this point in file leptonica_pageseg.cpp:332: error: 'debug' was not declared in this scope ======== I have updated the ebuild to tesseract-2.04-r2 with blockers for leptonica and leptonlib from the layman overlays. I'll attach the new ebuild next. HTH. Clemmitt Reproducible: Always
Created attachment 293465 [details] app-text/tesseract-2.04-r2.ebuild
Comment on attachment 293465 [details] app-text/tesseract-2.04-r2.ebuild Er, so the only thing that changes is that one blocks the other? --- tesseract-2.04-r1.ebuild 2010-11-23 15:08:27.000000000 +0100 +++ - 2011-11-23 16:59:55.713312729 +0100 @@ -27,7 +27,11 @@ KEYWORDS="alpha amd64 ~arm ~mips ppc ppc64 sparc x86" IUSE="examples tiff linguas_de linguas_eu linguas_es linguas_fr linguas_it linguas_nl linguas_pt_BR linguas_vi" -DEPEND="tiff? ( media-libs/tiff )" +# Block media-libs/leptonica to fix compile error for tesseract-2.04 caused +# by weird conflict with leptonica +DEPEND="tiff? ( media-libs/tiff ) + !dev-libs/leptonlib + !media-libs/leptonica" RDEPEND="${DEPEND}" # NOTES:
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire failing build log for tesseract.
Emerging tesseract fails for me too. I have not tested app-text/tesseract-2.04-r2.ebuild, but succeeded with unmerging first leptonica, emerging tesseract, re-emerging leptonica. This is just for test of course, but hope it helps.
I have unkeyworded tesseract-3.01. It builds fine with media-libs/leptonica-1.68 - no complaint. But tesseract-3.01 is still keyworded.
*** Bug 556438 has been marked as a duplicate of this bug. ***
build.log and emerge --info on the duplicate bug 556438
We should get rid of this old ebuild as soon as possible. Please test 3.04.00-r2 which is being stabilized in bug 557584.
Cleaning old bugs, this should be fixed with current stable ebuilds (3.04.00 was stabilized more than a year ago). Don't hesitate to reopen if the bug still happens for you of course