Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 391457 - app-text/tesseract-2.04-r1 with media-libs/leptonica - leptonica_pageseg.cpp:69:3: error: ‘int32’ was not declared in this scope
Summary: app-text/tesseract-2.04-r1 with media-libs/leptonica - leptonica_pageseg.cpp:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
: 556438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-23 01:02 UTC by Clemmitt M. Sigler
Modified: 2017-01-25 13:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-text/tesseract-2.04-r2.ebuild (tesseract-2.04-r2.ebuild,2.74 KB, text/plain)
2011-11-23 01:03 UTC, Clemmitt M. Sigler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clemmitt M. Sigler 2011-11-23 01:02:47 UTC
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
Comment 1 Clemmitt M. Sigler 2011-11-23 01:03:29 UTC
Created attachment 293465 [details]
app-text/tesseract-2.04-r2.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-23 16:00:38 UTC
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:
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-23 16:01:10 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire failing build log for tesseract.
Comment 4 lalebarde 2012-11-08 08:50:26 UTC
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.
Comment 5 lalebarde 2012-11-08 08:58:47 UTC
I have unkeyworded tesseract-3.01. It builds fine with media-libs/leptonica-1.68 - no complaint. But tesseract-3.01 is still keyworded.
Comment 6 Brian Evans (RETIRED) gentoo-dev 2015-08-03 19:26:47 UTC
*** Bug 556438 has been marked as a duplicate of this bug. ***
Comment 7 Brian Evans (RETIRED) gentoo-dev 2015-08-03 19:28:40 UTC
build.log and emerge --info on the duplicate bug 556438
Comment 8 Thomas Kahle (RETIRED) gentoo-dev 2015-08-20 06:36:19 UTC
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.
Comment 9 Bernard Cafarelli gentoo-dev 2017-01-25 13:07:56 UTC
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